Skip to content

Commit

Permalink
Workaround clients not working across versions
Browse files Browse the repository at this point in the history
Pulpcore versions can change plugin apis in slight ways to make the
generated api bindings incompatible. Until this is fixed, we need to
stick to testing with specially generated client bindings for the very
test run.

[noissue]
  • Loading branch information
mdellweg committed Nov 23, 2023
1 parent fb0f447 commit 7facb0a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions templates/github/.github/workflows/scripts/script.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,23 @@ then
sudo rm -rf "./${item}-client"
done
popd
touch bindings_requirements.txt
else
echo "$REPORTED_STATUS" | jq -r '.versions[]|(.package|sub("_"; "-")) + "-client==" + .version' > bindings_requirements.txt
# Sadly: Different pulpcore-versions aren't either...
pushd ../pulp-openapi-generator
for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[]
{%- for plugin in plugins -%}
|select(.component!="{{ plugin.app_label }}")
{%- endfor -%}
.package|sub("-"; "_")')
do
./generate.sh "${item}" python
cmd_prefix pip3 install "/root/pulp-openapi-generator/${item}-client"
sudo rm -rf "./${item}-client"
done
popd
fi

echo "$REPORTED_STATUS" | jq -r '.versions[]|(.package|sub("_"; "-")) + "-client==" + .version' > bindings_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt" < unittest_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/functest_requirements.txt" < functest_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/bindings_requirements.txt" < bindings_requirements.txt
Expand Down

0 comments on commit 7facb0a

Please sign in to comment.