-
Notifications
You must be signed in to change notification settings - Fork 24
Add KonfluxSource backend [ROK-1347] #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add KonfluxSource backend [ROK-1347] #692
Conversation
This commit adds new 'KonfluxSource' backend that loads RPM advisory metadata from local JSON files rather than querying remote ET APIs. This is one component required for delivery of RPMs built in Konflux. Note: Future modifications will likely be required as additional functionality is implemented. For example, the 'src' attribute on RpmPushItem (currently set to None) may need to be modified to support "upload from URL" functionality when that is added in the future. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
14058b1 to
39fbe20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before getting further we need figure out the src of RPM push item from Konflux.
I guess we can just agree that src will include the download URL of RPM and move forward with this change.
| return RpmPushItem( | ||
| name=filename, | ||
| state="PENDING", | ||
| src=None, # RPMs are stored in artifact storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I'm just wondering what should be responsible for setting this field.
If you compare this to errata_source, the rpm push item gets src from Koji where it's a path to that rpm on some filesystem. And src in this case should be set to download URL of RPM.
I quickly went through the design docs and it doesn't seem to state the info about getting URLs to artifact storage (maybe it's buried in some resolved comments).
My current understanding is that the overall process of uploading RPM to rhsm-pulp should look like:
- pubtools-pulp-push gets push items from newly introduced
KonfluxSource - for RPM upload to rhsm-pulp we would use following approach:
- send upload request to rhsm-pulp but we would need to get full URL of given artifact - RPM in this case
- this URL should be determined in pushsource library (requesting the artifact-storage API possibly)
- also some check of the artifact existence should be done here
- rhsm-pulp will download directly the artifact from given URL (if URL isn't public, we would set the env accordingly)
@jajreidy can you please have a look a this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Robert, thank you for the review!
hmm, I'm just wondering what should be responsible for setting this field.
You and me both 🙂
And
srcin this case should be set to download URL of RPM.
Agreed.
My current understanding is that the overall process of uploading RPM to rhsm-pulp should look like [...]
We have the same understanding.
Unfortunately, it seems that we cannot yet download RPMs from RoK artifact storage by URL, or outside of the Konflux environment. I filed ROK-1509 to address this (in that issue, there's a link to a doc which describes the supported means to download RPMs from artifact storage); @jajreidy plans to work on ROK-1509 in this sprint, but he may need more information from us.
This commit adds a new 'KonfluxSource' backend that loads RPM advisory metadata from local JSON files rather than querying remote ET APIs. This is one component required for delivery of RPMs built in Konflux.
Note: Future modifications will likely be required as additional functionality is implemented. For example, the 'src' attribute on RpmPushItem (currently set to None) may need to be modified to support "upload from URL" functionality when that is added in the future.