Detect and error on duplicate artifact NVRAs#4564
Conversation
Summary of ChangesHello @AthreyVinay, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the robustness of the artifact preparation step by introducing validation for artifact NVRAs. It ensures that if multiple artifact providers attempt to supply artifacts with identical NVRAs, an explicit error is raised. This prevents potential conflicts and ensures a clear, deterministic source for each artifact, thereby improving the overall reliability and predictability of the artifact management process. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses the requirement to detect and error on duplicate artifact NVRAs by introducing the _collect_artifacts_metadata method and refactoring _persist_artifact_metadata. No security vulnerabilities were found, and the changes are well-implemented, directly fulfilling the stated objective.
caebeef to
21bc23b
Compare
735c673 to
db2e674
Compare
119fbab to
b2cc461
Compare
b2cc461 to
25fe254
Compare
db2e674 to
009507b
Compare
25fe254 to
2da0be6
Compare
009507b to
f53144c
Compare
7b2ffc5 to
fa0809e
Compare
f53144c to
e4ede58
Compare
fa0809e to
c786fd8
Compare
|
Hi @AthreyVinay looks like there are some conflicts. Could you take a look please? |
70f4ad0 to
f9b61f2
Compare
Thanks @tcornell-bus , done. |
7250451 to
bed007c
Compare
Thank you @tcornell-bus, makes sense to me too. |
d00f947 to
f3e26c5
Compare
|
Should this also handle when there are two different repository-files that provide the same package NVRA? Or is this only to detect when |
As of now, I'd focus on non-repository providers like koji and brew. Providers contributing their payload to the shared repository. Repositories brought by repository-like providers may be disabled except in one particular test, or mapped into VMs, plenty of ways for a potential NVR conflict to never materialize; on the other hand, package-like providers contributing same NVR to the same repository is broken already. |
LecrisUT
left a comment
There was a problem hiding this comment.
Fine overall, just some minor code style comments
f3e26c5 to
03135bb
Compare
Maybe an explicit check before we detect duplcates? .... something along the lines of: if provider.contribute_to_shared_repo();
self._detect_duplicate_nvras() |
Fine either way. If there are no |
Agree - there was some discussion around it in a pr here: #4526 (comment) |
40e7121 to
cda4a1d
Compare
before any artifacts are fetched
cda4a1d to
6848567
Compare
from sync...
Specific example:
User provides two scratch builds of curl
Two koji tasks with the same nvr (content is different, e.g. two ways / patches how to fix the bug)
Raise an error (as we cannot decide/check what should be installed)
NOTE: This pr also renamed
raw_provider_id->raw_id.