Skip to content

Conversation

@patchback
Copy link

@patchback patchback bot commented Dec 19, 2025

This is a backport of PR #7170 as merged into 3.85 (20f3b7a).

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:16

Source: https://github.com/pulp/pulp_ostree/actions/runs/20372911840/job/58544021745?pr=475#step:12:827

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.

(cherry picked from commit 20f3b7a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants