Skip to content
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

feat(ISV-5447): add multi-arch and sha info to release note images #724

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

wcheang
Copy link
Contributor

@wcheang wcheang commented Dec 4, 2024

This is ready for review, but depends on konflux-ci/release-service-utils#333 to be merged first so that the multiarch field is populated before merge.

@wcheang wcheang requested a review from a team as a code owner December 4, 2024 04:48
Copy link

openshift-ci bot commented Dec 4, 2024

Hi @wcheang. Thanks for your PR.

I'm waiting for a konflux-ci member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

mmalina
mmalina previously approved these changes Dec 4, 2024
Copy link
Collaborator

@johnbieren johnbieren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

@wcheang
Copy link
Contributor Author

wcheang commented Dec 4, 2024

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

Thanks @johnbieren, added the schema.

@wcheang
Copy link
Contributor Author

wcheang commented Dec 4, 2024

My PTO is starting tomorrow, so @jedinym from my team will be taking over getting this PR merged.

@mmalina
Copy link
Contributor

mmalina commented Dec 5, 2024

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

This is added during the release pipeline. I thought the schema only covers what's there at the start, but apparently I was wrong. What's the purpose of having releaseNotes.content.images there? It will never be validated, no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not merge. The image needs to be updated with konflux-ci/release-service-utils#333 first.

For the future, please create the PR as a Draft or at least create a thread as a reminder that something still needs to be done. Otherwise it can lead to premature merge as just happened here: hacbs-release/app-interface-deployments#245

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to draft

@johnbieren johnbieren marked this pull request as draft December 5, 2024 19:56
@johnbieren
Copy link
Collaborator

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

This is added during the release pipeline. I thought the schema only covers what's there at the start, but apparently I was wrong. What's the purpose of having releaseNotes.content.images there? It will never be validated, no?

The releaseNotes stuff is unique. We don't overwrite. We =+ https://github.com/konflux-ci/release-service-catalog/blob/development/tasks/populate-release-notes-images/populate-release-notes-images.yaml#L111
A user could define the same stuff the task is adding for them. I don't know why they'd want to, but they could. So, if a field could be provided by the user, I think it should be in the schema

Copy link
Collaborator

@johnbieren johnbieren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replied on the ticket, but why are we adding new fields to the advisories? Shouldn't this be driven by prodsec? Maybe it already is, but I haven't seen it

@mmalina
Copy link
Contributor

mmalina commented Dec 5, 2024

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

This is added during the release pipeline. I thought the schema only covers what's there at the start, but apparently I was wrong. What's the purpose of having releaseNotes.content.images there? It will never be validated, no?

The releaseNotes stuff is unique. We don't overwrite. We =+ https://github.com/konflux-ci/release-service-catalog/blob/development/tasks/populate-release-notes-images/populate-release-notes-images.yaml#L111 A user could define the same stuff the task is adding for them. I don't know why they'd want to, but they could. So, if a field could be provided by the user, I think it should be in the schema

I'm not completely sure I buy this argument - it seems to me that being theoretically able to set this already in the RPA is more of a side effect. I'm not even sure if that should be allowed at all - it should say what was actually included in that release, right? So users shouldn't really be able to say that something extra is being released too when it's not. Or am I missing something?

@mmalina
Copy link
Contributor

mmalina commented Dec 5, 2024

I replied on the ticket, but why are we adding new fields to the advisories? Shouldn't this be driven by prodsec? Maybe it already is, but I haven't seen it

Good point. I completely missed the fact that this will also add these fields to the resulting advisory json.

@johnbieren
Copy link
Collaborator

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

This is added during the release pipeline. I thought the schema only covers what's there at the start, but apparently I was wrong. What's the purpose of having releaseNotes.content.images there? It will never be validated, no?

The releaseNotes stuff is unique. We don't overwrite. We =+ https://github.com/konflux-ci/release-service-catalog/blob/development/tasks/populate-release-notes-images/populate-release-notes-images.yaml#L111 A user could define the same stuff the task is adding for them. I don't know why they'd want to, but they could. So, if a field could be provided by the user, I think it should be in the schema

I'm not completely sure I buy this argument - it seems to me that being theoretically able to set this already in the RPA is more of a side effect. I'm not even sure if that should be allowed at all - it should say what was actually included in that release, right? So users shouldn't really be able to say that something extra is being released too when it's not. Or am I missing something?

I am referring to adding it to the Release data section, not ReleasePlanAdmission

@mmalina
Copy link
Contributor

mmalina commented Dec 5, 2024

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

This is added during the release pipeline. I thought the schema only covers what's there at the start, but apparently I was wrong. What's the purpose of having releaseNotes.content.images there? It will never be validated, no?

The releaseNotes stuff is unique. We don't overwrite. We =+ https://github.com/konflux-ci/release-service-catalog/blob/development/tasks/populate-release-notes-images/populate-release-notes-images.yaml#L111 A user could define the same stuff the task is adding for them. I don't know why they'd want to, but they could. So, if a field could be provided by the user, I think it should be in the schema

I'm not completely sure I buy this argument - it seems to me that being theoretically able to set this already in the RPA is more of a side effect. I'm not even sure if that should be allowed at all - it should say what was actually included in that release, right? So users shouldn't really be able to say that something extra is being released too when it's not. Or am I missing something?

I am referring to adding it to the Release data section, not ReleasePlanAdmission

What difference does it make? I understand that if you create a manual Release then you know the snapshot and so you can enter correct data about images in the snapshot into the Release data section, but those would then be duplicated in our task anyway. So not sure what the point would be.

@johnbieren
Copy link
Collaborator

If you are adding things to releaseNotes the schema needs to be updated https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json

This is added during the release pipeline. I thought the schema only covers what's there at the start, but apparently I was wrong. What's the purpose of having releaseNotes.content.images there? It will never be validated, no?

The releaseNotes stuff is unique. We don't overwrite. We =+ https://github.com/konflux-ci/release-service-catalog/blob/development/tasks/populate-release-notes-images/populate-release-notes-images.yaml#L111 A user could define the same stuff the task is adding for them. I don't know why they'd want to, but they could. So, if a field could be provided by the user, I think it should be in the schema

I'm not completely sure I buy this argument - it seems to me that being theoretically able to set this already in the RPA is more of a side effect. I'm not even sure if that should be allowed at all - it should say what was actually included in that release, right? So users shouldn't really be able to say that something extra is being released too when it's not. Or am I missing something?

I am referring to adding it to the Release data section, not ReleasePlanAdmission

What difference does it make? I understand that if you create a manual Release then you know the snapshot and so you can enter correct data about images in the snapshot into the Release data section, but those would then be duplicated in our task anyway. So not sure what the point would be.

Because you want an image in your advisory that is not part of your snapshot or isn't mapped or something. I don't know. I am just saying it is a possible use case so it should be in the schema

@jedinym
Copy link
Contributor

jedinym commented Dec 6, 2024

I replied on the ticket, but why are we adding new fields to the advisories? Shouldn't this be driven by prodsec? Maybe it already is, but I haven't seen it

@johnbieren If I understand correctly, the new fields in the advisory are not the intention here. They are only a side effect of adding additional data for the update-component-sbom task. I will refactor this PR to avoid that issue.

@johnbieren
Copy link
Collaborator

I replied on the ticket, but why are we adding new fields to the advisories? Shouldn't this be driven by prodsec? Maybe it already is, but I haven't seen it

@johnbieren If I understand correctly, the new fields in the advisory are not the intention here. They are only a side effect of adding additional data for the update-component-sbom task. I will refactor this PR to avoid that issue.

Thank you!

@jedinym jedinym force-pushed the ISV-5447 branch 6 times, most recently from 9a04aee to b280c8c Compare December 10, 2024 08:31
@jedinym
Copy link
Contributor

jedinym commented Dec 10, 2024

@mmalina @johnbieren I refactored the PR to avoid changing the advisories. It's ready for review, thanks. I'd like to merge this before #627.

Signed-off-by: Wai Cheang <wcheang@redhat.com>

feat(ISV-5447): refactor SBOM data generation

Signed-off-by: Martin Jediny <jedinym@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants