-
Notifications
You must be signed in to change notification settings - Fork 136
[PULP-1004] [backport/3.85] Expose RepositoryVersionSerializer in the plugin API #7170
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
[PULP-1004] [backport/3.85] Expose RepositoryVersionSerializer in the plugin API #7170
Conversation
In pulpcore 3.88 it was added a feature that would the return value of task functions, and those return must be serializable or None. In 3.100 that would be required by pulpcore, so plugins that wante to adapt before might use the RepositoryVersionSerializer. In this case, regardless of whether pulpcore >=3.88 or <3.88 is used, the plugin must be able to import the serializer or it will throw a runtime import error.
Backport to 3.49: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 20f3b7a on top of patchback/backports/3.49/20f3b7a7d01675fc4dcc08ccb8580e1a50a01012/pr-7170 Backporting merged PR #7170 into 3.85
🤖 @patchback |
Backport to 3.63: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 20f3b7a on top of patchback/backports/3.63/20f3b7a7d01675fc4dcc08ccb8580e1a50a01012/pr-7170 Backporting merged PR #7170 into 3.85
🤖 @patchback |
Backport to 3.73: 💚 backport PR created✅ Backport PR branch: Backported as #7171 🤖 @patchback |
In pulpcore 3.88 it was added a feature that would the return value of task functions, and those return must be serializable or None.
In 3.100 that would be required by pulpcore, so plugins that wante to adapt before might use the RepositoryVersionSerializer. In this case, regardless of whether pulpcore >=3.88 or <3.88 is used, the plugin must be able to import the serializer or it will throw a runtime import error.
Example on pulp-ostree CI, installation step of lowerbounds scenario(pulpcore 3.49):
------ > [4/5] RUN PULP_STATIC_ROOT=/var/lib/operator/static/ PULP_CONTENT_ORIGIN=localhost /usr/local/bin/pulpcore-manager collectstatic --clear --noinput --link: 0.846 File "<frozen importlib._bootstrap_external>", line 940, in exec_module 0.846 File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed 0.846 File "/usr/local/lib/python3.11/site-packages/pulp_ostree/app/viewsets.py", line 25, in <module> 0.846 from . import models, serializers, tasks 0.846 File "/usr/local/lib/python3.11/site-packages/pulp_ostree/app/tasks/__init__.py", line 1, in <module> 0.846 from .synchronizing import synchronize # noqa 0.846 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0.846 File "/usr/local/lib/python3.11/site-packages/pulp_ostree/app/tasks/synchronizing.py", line 23, in <module> 0.846 from pulpcore.plugin.serializers import RepositoryVersionSerializer 0.846 ImportError: cannot import name 'RepositoryVersionSerializer' from 'pulpcore.plugin.serializers' (/usr/local/lib/python3.11/site-packages/pulpcore/plugin/serializers/__init__.py) ------ Containerfile:16Source: https://github.com/pulp/pulp_ostree/actions/runs/20372911840/job/58544021745?pr=475#step:12:827