upgrading to 3.117.1 fails without saying which Distribution base_paths are violating constraint
Open
Nobody has claimed this yet.
Issue
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
Version
3.117.1
Describe the bug
After failing to migrate to 3.117.0 with deadlocks during migrations the upgrade to 3.117.1 fails with
+ set -e
+ /usr/local/lib/pulp/bin/pulpcore-manager migrate --noinput
Operations to perform:
Apply all migrations: admin, auth, certguard, container, contenttypes, core, file, hugging_face, maven, npm, python, rpm, service, sessions
Running migrations:
Applying core.0156_alter_contentartifact_relative_path_and_more...Traceback (most recent call last):
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/psycopg/cursor.py", line 117, in execute
raise ex.with_traceback(None)
psycopg.errors.CheckViolation: value for domain relative_path violates check constraint "relative_path_check"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/pulp/bin/pulpcore-manager", line 6, in <module>
sys.exit(manage())
^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/pulpcore/app/manage.py", line 11, in manage
execute_from_command_line(sys.argv)
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/core/management/base.py", line 420, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/core/management/base.py", line 464, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/core/management/base.py", line 111, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/core/management/commands/migrate.py", line 353, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/migrations/executor.py", line 135, in migrate
state = self._migrate_all_forwards(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/migrations/executor.py", line 255, in apply_migration
state = migration.apply(state, schema_editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/migrations/migration.py", line 132, in apply
operation.database_forwards(
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/migrations/operations/fields.py", line 241, in database_forwards
schema_editor.alter_field(from_model, from_field, to_field)
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/base/schema.py", line 912, in alter_field
self._alter_field(
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/postgresql/schema.py", line 274, in _alter_field
super()._alter_field(
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/base/schema.py", line 1165, in _alter_field
self.execute(
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/postgresql/schema.py", line 48, in execute
return super().execute(sql, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/base/schema.py", line 204, in execute
cursor.execute(sql, params)
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/sentry_sdk/utils.py", line 1886, in runner
return sentry_patched_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/sentry_sdk/integrations/django/__init__.py", line 832, in execute
result = real_execute(self, sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/utils.py", line 79, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/utils.py", line 100, in _execute
with self.db.wrap_database_errors:
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/pulp/lib64/python3.11/site-packages/psycopg/cursor.py", line 117, in execute
raise ex.with_traceback(None)
django.db.utils.IntegrityError: value for domain relative_path violates check constraint "relative_path_check"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with pulpcore-manager migrate and inspect migration core.0156, the Distribution model, and its base_paths handling. Identify the Distribution records violating relative_path_check and make the migration failure report which records are affected; rerun the migration to verify the diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, postgresql, python
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100