Hey there,
i have tried to upload a new version of my Ansible Collection but iam getting the following error message:
Status:
Failed
Approval status: waiting for import to finish
Version: 1.1.0
Error message:
duplicate key value violates unique constraint "unique_is_highest"
DETAIL: Key (collection_id, is_highest)=(018ae852-5831-78a0-b19f-d2d6a4e41174, t) already exists.
File "/venv/lib64/python3.11/site-packages/pulpcore/tasking/tasks.py", line 66, in _execute_task
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/galaxy_ng/app/tasks/publishing.py", line 115, in import_and_auto_approve
repo = _upload_collection(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/galaxy_ng/app/tasks/publishing.py", line 65, in _upload_collection
general_create(*general_args, **kwargs)
File "/venv/lib64/python3.11/site-packages/pulpcore/app/tasks/base.py", line 38, in general_create
instance = serializer.save()
^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/rest_framework/serializers.py", line 212, in save
self.instance = self.create(validated_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/pulp_ansible/app/serializers.py", line 530, in create
finish_collection_upload(content, tags=tags, origin_repository=origin_repository)
File "/venv/lib64/python3.11/site-packages/pulp_ansible/app/tasks/upload.py", line 84, in finish_collection_upload
_update_highest_version(collection_version)
File "/venv/lib64/python3.11/site-packages/pulp_ansible/app/tasks/collections.py", line 439, in _update_highest_version
update_qs.update(is_highest=F("new_is_highest"))
File "/venv/lib64/python3.11/site-packages/django/db/models/query.py", line 1206, in update
rows = query.get_compiler(self.db).execute_sql(CURSOR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/django/db/models/sql/compiler.py", line 1984, in execute_sql
cursor = super().execute_sql(result_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor.execute(sql, params)
File "/venv/lib64/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/venv/lib64/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/venv/lib64/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib64/python3.11/site-packages/psycopg/cursor.py", line 723, in execute
raise ex.with_traceback(None)
But the Log shows:
Importing with galaxy-importer 0.4.14
Getting doc strings via ansible-doc
Finding content inside collection
Loading module entry
Loading module group
Collection loading complete
Failed
I dont understand the error. It seems that it doesn’t have anything todo with my code. I have created the collection with ansible-galaxy collection build
and tried to upload it via webinterface. When i try to upload this file again it says
ERROR! Error when publishing collection to cmd_arg (https://galaxy.ansible.com/api/) (HTTP Code: 400, Message: Collection torie_coding.keepass-1.1.0 already exists Code: invalid)
Thank you for your help.