-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade tests #503
Upgrade tests #503
Conversation
Attached issue: https://pulp.plan.io/issues/8719 |
7baf0b2
to
2bb5447
Compare
76e7b4f
to
d3e084b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main challenges:
- how to deal with
additional_plugins
and its old dependencies? - how to deal with external commands or specific versions of the CI scripts?
- how to deal with dependencies? e.g. django
.github/workflows/ci.yml
Outdated
include: | ||
- FROM_BRANCH: 1.4 | ||
FROM_PULPCORE_BRANCH: "3.9" | ||
- FROM_BRANCH: 1.5 | ||
FROM_PULPCORE_BRANCH: "3.10" | ||
- FROM_BRANCH: 1.6 | ||
FROM_PULPCORE_BRANCH: "3.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be built according to template_config.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can be a challenge when we have additional_plugins
, should we declare each additional plugin dependency?
.github/workflows/ci.yml
Outdated
echo "FROM_BRANCH=${{ matrix.FROM_BRANCH }}" >> $GITHUB_ENV | ||
echo "FROM_PULPCORE_BRANCH=${{ matrix.FROM_PULPCORE_BRANCH }}" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can be a challenge when we have additional_plugins
, should we declare each additional plugin dependency?
if [[ "$TEST" == "upgrade" ]]; then | ||
git checkout -b ci_upgrade_test | ||
cp -R .github /tmp/.github | ||
cp -R .ci /tmp/.ci | ||
git checkout $FROM_BRANCH | ||
rm -rf .ci .github | ||
cp -R /tmp/.github . | ||
cp -R /tmp/.ci . | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to checkout old branches, but we need to keep the current CI scripts
sed -i "s/true/false/g" tests/settings.toml | ||
mkdir ~/.config/pulp | ||
cp tests/settings.toml ~/.config/pulp/settings.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so familiar with pulp-cli, but I did this because I wanted to use the CLI to expose we still have data after migration
# Pin pulpcore deps | ||
sed -i "s/~/=/g" requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dealing with dependencies from previous versions is challenging, on this case I did this hack for pinning django
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-api" | ||
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-content" | ||
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-resource-manager" | ||
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-worker@1" | ||
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-worker@2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restarting services
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-worker@2" | ||
|
||
echo "Restarting in 60 seconds" | ||
sleep 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to wait services to start before making requests
echo "Restarting in 60 seconds" | ||
sleep 60 | ||
|
||
pulp status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for verifying if it indeed upgraded to current version
sleep 60 | ||
|
||
pulp status | ||
pulp file content list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for exposing if the migration was successful and we still having data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for pulp_file 1.5 it returned an empty list, I believe it was because of that migration that needed an external command
cd ../pulp-openapi-generator | ||
./generate.sh pulpcore python | ||
pip install ./pulpcore-client | ||
./generate.sh pulp_file python | ||
pip install ./pulp_file-client | ||
./generate.sh pulp_certguard python | ||
pip install ./pulp_certguard-client | ||
cd $REPO_ROOT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to rebuild bindings after upgrading
9f7b6bd
to
eddf1b1
Compare
Required PR: pulp/pulpcore#1337 https://pulp.plan.io/issues/8719 closes #8719
@pulp/core it is ready for review now! |
@pulp/core can I have a review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also looks good. Thanks @fao89 !
https://pulp.plan.io/issues/8719
closes #8719