[Pulp-list] Django v2.2.21 breaking changes

Brian Bouterse bmbouter at redhat.com
Thu May 6 10:53:10 UTC 2021


tl;dr You should temporarily downgrade Django for now back to 2.2.20. See
#workaround below.

# The issue

It's unfortunate but Django's 2.2.21 breaks Pulp which given that Django
2.2.z is the Django LTS is extremely surprising to us. It actually broke a
lot of projects. I've been investigating this
https://pulp.plan.io/issues/8691. The 2.2.21 Django release has a bug in it
( https://code.djangoproject.com/ticket/32718 ) which is also actively
being investigated.  Based on testing I completed yesterday, even if Django
resolves their bug, Pulp will still need a compatibility release.

Overall I expect all of this to be worked out with the upcoming pulpcore
3.13.0, so my advice is to use the workaround below and then upgrade to
3.13.0 when it's released.

# The temporary workaround

Downgrade Django back to 2.2.20. You can do this manually by:

1. Activating the virtualenv of Pulp `source
/usr/local/lib/pulp/bin/activate`
2. Uninstalling your Django, `pip uninstall django`
3. pip install django==2.2.20

Feedback, questions, and suggestions are welcome.

-Brian

On Thu, May 6, 2021 at 1:50 AM Sathasivam, Pradeep <
pradeep.sathasivam at hpe.com> wrote:

> Hi All,
>
>
>
> We are using pulp project with below specified plug-in versions:
>
>
>
>     {
>
>       "component": "pulpcore",
>
>       "version": "3.9.0"
>
>     },
>
>     {
>
>       "component": "pulp_rpm",
>
>       "version": "3.8.0"
>
>     },
>
>     {
>
>       "component": "pulp_file",
>
>       "version": "1.5.0"
>
>     },
>
>     {
>
>       "component": "pulp_container",
>
>       "version": "2.2.0"
>
>     }
>
>
>
> Pulpcore-3.9.0 has dependency on Django with version ‘2.2.17’.
>
>
>
> Looks like Django-admin version ‘2.2.21’ has breaking changes with respect
> to ‘Remote to local’ repo sync call.
>
>
>
> There is no issue with till version ‘2.2.20’, but with ‘2.2.21’, sync call
> is failing with below error;
>
>
>
>
>
> "traceback": " File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line
> 1008, in perform_job\n rv = job.perform()\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 706,
> in perform\n self._result = self._execute()\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 729,
> in _execute\n result = self.func(*self.args, **self.kwargs)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\",
> line 274, in synchronize\n dv.create()\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py\",
> line 148, in create\n loop.run_until_complete(pipeline)\n File
> \"/usr/lib64/python3.6/asyncio/base_events.py\", line 484, in
> run_until_complete\n return future.result()\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/api.py\",
> line 225, in create_pipeline\n await asyncio.gather(*futures)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/api.py\",
> line 43, in __call__\n await self.run()\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/plugin/stages/artifact_stages.py\",
> line 219, in run\n d_artifact.artifact for d_artifact in da_to_save\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/app/models/content.py\",
> line 82, in bulk_get_or_create\n return super().bulk_create(objs,
> batch_size=batch_size)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/manager.py\",
> line 82, in manager_method\n return getattr(self.get_queryset(),
> name)(*args, **kwargs)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\",
> line 468, in bulk_create\n self._batched_insert(objs_with_pk, fields,
> batch_size, ignore_conflicts=ignore_conflicts)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\",
> line 1204, in _batched_insert\n ignore_conflicts=ignore_conflicts,\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py\",
> line 1186, in _insert\n return
> query.get_compiler(using=using).execute_sql(return_id)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\",
> line 1376, in execute_sql\n for sql, params in self.as_sql():\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django_readonly_field/compiler.py\",
> line 31, in as_sql\n return super(ReadonlySQLCompilerMixin,
> self).as_sql()\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\",
> line 1320, in as_sql\n for obj in self.query.objs\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\",
> line 1320, in <listcomp>\n for obj in self.query.objs\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\",
> line 1319, in <listcomp>\n [self.prepare_value(field,
> self.pre_save_val(field, obj)) for field in fields]\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py\",
> line 1270, in pre_save_val\n return field.pre_save(obj, add=True)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/app/models/fields.py\",
> line 68, in pre_save\n return super().pre_save(model_instance, add)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/fields/files.py\",
> line 289, in pre_save\n file.save(file.name, file.file, save=False)\n
> File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/fields/files.py\",
> line 87, in save\n name = self.field.generate_filename(self.instance,
> name)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/fields/files.py\",
> line 303, in generate_filename\n filename =
> validate_file_name(filename)\n File
> \"/usr/local/lib/pulp/lib64/python3.6/site-packages/django/core/files/utils.py\",
> line 8, in validate_file_name\n raise SuspiciousFileOperation(\"File name
> '%s' includes path elements\" % name)\n",
> 11
> "description": "File name
> '/var/lib/pulp/tmp/63317 at gl-pulpnode.glhc-hpe.local/3af34b32-aba4-4434-8431-15fd9d305939/tmpp7yqiy42'
> includes path elements"
> 12
>
>
>
> Can you help here to narrow down this issue ?
>
>
>
>
>
> Regards,
>
> Pradeep. S
>
>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://listman.redhat.com/mailman/listinfo/pulp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20210506/a4dcaf1e/attachment.htm>


More information about the Pulp-list mailing list