pulp / pulp_deb

Debian repository plugin for Pulp (pulpproject.org)
GNU General Public License v2.0
61 stars 76 forks source link

Fix DEBUG logging of duplicate pakcages #1021

Closed quba42 closed 4 months ago

quba42 commented 4 months ago

closes #994

quba42 commented 4 months ago

The following example:

NAME='mysql_duplicate_package_test'
REMOTE_OPTIONS=(
  --url=https://repo.mysql.com/apt/debian/
  --distribution=bookworm
  --architecture=amd64
  --policy=on_demand
)
pulp deb remote create --name=${NAME} ${REMOTE_OPTIONS[@]}
pulp deb repository create --name=${NAME} --remote=${NAME}
pulp deb repository sync --name=${NAME}

Now produces the following log output:

pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-client', 'version': '8.3.0-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-innovation', 'bookworm mysql-cluster-innovation'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-common', 'version': '8.0.36-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-8.0', 'bookworm mysql-cluster-8.0'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'libmysqlclient23', 'version': '8.3.0-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-innovation', 'bookworm mysql-cluster-innovation'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-testsuite', 'version': '8.3.0-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-innovation', 'bookworm mysql-cluster-innovation'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-server', 'version': '8.0.36-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-8.0', 'bookworm mysql-cluster-8.0'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-common', 'version': '8.3.0-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-innovation', 'bookworm mysql-cluster-innovation'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'libmysqlclient-dev', 'version': '8.3.0-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-innovation', 'bookworm mysql-cluster-innovation'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-testsuite', 'version': '8.0.36-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-8.0', 'bookworm mysql-cluster-8.0'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'libmysqlclient23-dbgsym', 'version': '8.3.0-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-innovation', 'bookworm mysql-cluster-innovation'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'libmysqlclient-dev', 'version': '8.0.36-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-8.0', 'bookworm mysql-cluster-8.0'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-client', 'version': '8.0.36-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-8.0', 'bookworm mysql-cluster-8.0'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'libmysqlclient21', 'version': '8.0.36-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-8.0', 'bookworm mysql-cluster-8.0'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'mysql-server', 'version': '8.3.0-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-innovation', 'bookworm mysql-cluster-innovation'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulp_deb.app.models.repository:DEBUG: New repository version is trying to add different versions, of package "{'package': 'libmysqlclient21-dbgsym', 'version': '8.0.36-1debian12', 'architecture': 'amd64'}", to each of the following distribution-component combinations "{'bookworm mysql-8.0', 'bookworm mysql-cluster-8.0'}"!
pulp [afe9cf4514d54bbb905dea53dc7bed52]: pulpcore.tasking.tasks:INFO: Task 018dea38-c0b9-7ad7-8d40-c20433d6a9e5 failed (Cannot create repository version since there are newly added packages with the same name, version, and architecture, but a different checksum. If the log level is DEBUG, you can find a list of affected packages in the Pulp log. You can often work around this issue by restricting syncs to only those distirbution component combinations, that do not contain colliding duplicates!)
patchback[bot] commented 4 months ago

Backport to 3.0: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.0/adabeae3ff7bdebe8508efac3dc504c84b10db85/pr-1021

Backported as https://github.com/pulp/pulp_deb/pull/1024

🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.

patchback[bot] commented 4 months ago

Backport to 3.1: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.1/adabeae3ff7bdebe8508efac3dc504c84b10db85/pr-1021

Backported as https://github.com/pulp/pulp_deb/pull/1025

🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.