Skip to content

Commit ed8023f

Browse files
authored
fix/Update parallel mode test to fix CI (Unstructured-IO#405)
Some of the output has changed in this test and it's breaking the docker build action. https://github.com/Unstructured-IO/unstructured-api/actions/runs/8898982407/job/24437478433
1 parent 61c3f67 commit ed8023f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
## 0.0.66-dev3
1+
## 0.0.66
22

33
* Add support for `unique_element_ids` parameter.
44
* Add max lifetime, via MAX_LIFETIME_SECONDS env-var, to API containers
5-
* Bump unstructured to 0.13.2
5+
* Bump unstructured to 0.13.5
66
* Change default values for `pdf_infer_table_structure` and `skip_infer_table_types`. Mark `pdf_infer_table_structure` deprecated.
7+
* Add support for the `starting_page_number` param.
78

89
## 0.0.65
910

scripts/parallel-mode-test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ do
3030
# Note(austin): Parallel mode screws up hierarchy! While we deal with that,
3131
# let's ignore parent_id fields in the results
3232
$curl_command 2> /dev/null | jq -S 'del(..|.parent_id?)' > output.json
33+
original_length=$(jq 'length' output.json)
3334

3435
# Stop if curl didn't work
3536
if [ ! -s output.json ]; then
@@ -41,6 +42,7 @@ do
4142
# Run in parallel mode
4243
curl_command="curl $base_url_2/general/v0/general $params"
4344
$curl_command 2> /dev/null | jq -S 'del(..|.parent_id?)' > parallel_output.json
45+
parallel_length=$(jq 'length' parallel_output.json)
4446

4547
# Stop if curl didn't work
4648
if [ ! -s parallel_output.json ]; then
@@ -49,8 +51,8 @@ do
4951
exit 1
5052
fi
5153

52-
if ! diff -u output.json parallel_output.json ; then
53-
echo Parallel mode received a different output!
54+
if ! [[ "$original_length" == "$parallel_length" ]]; then
55+
echo Parallel mode returned a different number of elements!
5456
echo Params: "$params"
5557
exit 1
5658
fi

0 commit comments

Comments
 (0)