Skip to content

Conversation

happybhati
Copy link
Contributor

@happybhati happybhati commented Sep 25, 2025

When all images in a snapshot are already released in advisories, the filter task now returns the URL of the latest matching advisory instead of no URL. This addresses user confusion during retries where they received older advisory URLs.

  • Add latest_advisory_url and latest_advisory_internal_url results
  • Write results file with advisory info for update-cr-status
  • Update pipeline to include filter task results
  • Add comprehensive tests for new functionality

Describe your changes

Relevant Jira

Checklist before requesting a review

  • I have marked as draft or added do not merge label if there's a dependency PR
    • If you want reviews on your draft PR, you can add reviewers or add the release-service-maintainers handle if you are unsure who to tag
  • My commit message includes Signed-off-by: My name <email>
  • I read CONTRIBUTING.MD and commit formatting
  • I have run the README.md generator script in .github/scripts/readme_generator.sh and verified the results using .github/scripts/check_readme.sh

@happybhati happybhati changed the title fix(RELEASE-1701): return latest advisory URL when all components rel… fix(RELEASE-1701): return latest advisory URL when all components already released Sep 25, 2025
@happybhati happybhati force-pushed the RELEASE-1701 branch 4 times, most recently from 969cd53 to c986d74 Compare September 26, 2025 14:46
@happybhati
Copy link
Contributor Author

/retest

@happybhati
Copy link
Contributor Author

/retest

1 similar comment
@happybhati
Copy link
Contributor Author

/retest

@happybhati happybhati marked this pull request as ready for review September 29, 2025 13:57
@happybhati
Copy link
Contributor Author

/retest

- "$(tasks.run-file-updates.results.sourceDataArtifact)=$(params.dataDir)"
- "$(tasks.process-product-sbom.results.sourceDataArtifact)=$(params.dataDir)"
- "$(tasks.process-component-sbom.results.sourceDataArtifact)=$(params.dataDir)"
- "$(tasks.filter-already-released-advisory-images.results.sourceDataArtifact)=$(params.dataDir)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

did you make sure that it won't overwrite the advisory url with the empty string when the advisory did not already exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for mentioning! fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wasn't really advocating for adding a new result, just to make sure that the empty string didn't overwrite the real one, but I'll leave implementation up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the potential overwrite issue by making the filter task only create advisory data in the results file when skip_release=true

Pipeline behavior: When all components are already released (skip_release=true), the downstream tasks (including create-advisory and update-cr-status) are automatically skipped due to their when conditions. The latest advisory URL is exposed as a task result from the filter task for visibility in logs/UI.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The ticket also talks about the task currently returning "just any" already released advisory instead of the latest. I don't see any changes here to address that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yes so create advisory also needs to return the latest match advisory URL. And filter-already-released abisory task do the same.
Does it make sense?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Acceptance criteria

- The latest advisory is returned as a new result to the user.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both tasks now sort advisories by modification time (newest first) and return the first matching advisory (which is the latest)

@happybhati
Copy link
Contributor Author

I am making some adjustments, putting it back in the draft quickly. I will ping once ready for review again.
@elenagerman @johnbieren

@happybhati happybhati marked this pull request as draft October 6, 2025 19:01
@happybhati happybhati force-pushed the RELEASE-1701 branch 2 times, most recently from 5736055 to 1ae982a Compare October 9, 2025 22:57
@happybhati
Copy link
Contributor Author

/retest

@happybhati happybhati marked this pull request as ready for review October 13, 2025 13:12
When all images in a snapshot are already released in advisories, the
filter task now returns the URL of the latest matching advisory instead
of no URL. This addresses user confusion during retries where they
received older advisory URLs.

- Add latest_advisory_url and latest_advisory_internal_url results
- Write results file with advisory info for update-cr-status
- Update pipeline to include filter task results
- Add comprehensive tests for new functionality

Signed-off-by: Happy Bhati <[email protected]>
@happybhati
Copy link
Contributor Author

/retest

2 similar comments
@happybhati
Copy link
Contributor Author

/retest

@happybhati
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants