-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fixed PRC not getting removed when modifying repositories #1185
Fixed PRC not getting removed when modifying repositories #1185
Conversation
d01e1af
to
2b6fc72
Compare
2b6fc72
to
338bdbc
Compare
338bdbc
to
1b584f9
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.
I only have some small suggestions. Even without the everything appears to work.
I manually tested the following:
workon pulp_cli
alias pulp='pulp -p oci-env'
NAME='package_removal_test'
alias http='http --auth admin:password '
PULP_URL='http://localhost:5001'
pulp status
http get ${PULP_URL}/pulp/api/v3/status/
pulp deb repository create --name="${NAME}"
pulp deb content upload --file='../neovim_0.3.4-3_amd64.deb' --distribution='my-dist' --component='my-component' --repository="${NAME}"
pulp deb content upload --file='../odin_1.0_ppc64.deb' --distribution='my-dist' --component='my-component' --repository="${NAME}"
pulp deb repository create --name="${NAME}2"
pulp deb content upload --file='../neovim_0.3.4-3_amd64.deb' --distribution='my-dist2' --component='my-component2' --repository="${NAME}2"
pulp deb publication create --repository=${NAME}
pulp deb distribution create --name=${NAME} --base-path=${NAME} --repository=${NAME}
REPOSITORY_HREF=$(pulp deb repository show --name=${NAME} | jq -r .pulp_href)
PACKAGE_HREF=$(pulp deb content show --sha256='e36dccccd1fd8e38086b15d81d9aef049bc0586dd9b540b171d6917e41268f61' | jq -r .pulp_href)
TASK_HREF=$(http post ${PULP_URL}${REPOSITORY_HREF}modify/ remove_content_units:=[\"${PACKAGE_HREF}\"] | jq -r .task)
pulp show --href=${TASK_HREF}
This ensures that PRCs that point to the same package, but are not part of the repo we are removing from are not a problem.
I also tested removing multiple packages in a single API call, which worked fine.
1b584f9
to
630c38b
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.
LGTM.
Backport to 3.2: 💚 backport PR created✅ Backport PR branch: Backported as #1192 🤖 @patchback |
Backport to 3.3: 💚 backport PR created✅ Backport PR branch: Backported as #1193 🤖 @patchback |
Backport to 3.4: 💚 backport PR created✅ Backport PR branch: Backported as #1194 🤖 @patchback |
…_content Fixed PRC not getting removed when modifying repositories (cherry picked from commit 5551dfe)
…_content Fixed PRC not getting removed when modifying repositories (cherry picked from commit 5551dfe)
…_content Fixed PRC not getting removed when modifying repositories (cherry picked from commit 5551dfe)
…7ed204438fe9375080adc47280abdc/pr-1185 [PR #1185/5551dfef backport][3.2] Fixed PRC not getting removed when modifying repositories
…7ed204438fe9375080adc47280abdc/pr-1185 [PR #1185/5551dfef backport][3.3] Fixed PRC not getting removed when modifying repositories
…7ed204438fe9375080adc47280abdc/pr-1185 [PR #1185/5551dfef backport][3.4] Fixed PRC not getting removed when modifying repositories
closes #1190