-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
chore(updatecli) fix UBI9 manifest #907
Conversation
Co-authored-by: lemeurherveCB <[email protected]>
# Trim spaces | ||
unique_tag=$(echo "$unique_tag" | xargs) |
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.
same (non-blocking) suggestion as #906 (comment): simplify the script to pipe a trim on the unique result from the curl | jq
command then only test if it's empty before exit
ing 0.
(reposting as the previous discussion has been automatically hidden)
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.
Then maybe your query can return multiple and duplicated tags in some cases? IDK
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.
Yes, my query will return several tags, including 9.5
and 9.5-1731517889
, which will appear multiple times in the output. This repetition is typical of the data we are handling:
"tags": [
{
"added_date": "2024-11-13T18:11:46.455000+00:00",
"name": "9.5",
"_links": {
"tag_history": {
"href": "/v1/tag-history/registry/registry.access.redhat.com/repository/ubi9/tag/9.5"
}
}
},
{
"added_date": "2024-11-13T18:11:46.455000+00:00",
"name": "9.5-1731517889",
"_links": {
"tag_history": {
"href": "/v1/tag-history/registry/registry.access.redhat.com/repository/ubi9/tag/9.5-1731517889"
}
}
},
{
"added_date": "2024-11-13T18:11:46.455000+00:00",
"name": "latest",
"_links": {
"tag_history": {
"href": "/v1/tag-history/registry/registry.access.redhat.com/repository/ubi9/tag/latest"
}
}
}
],
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.
though: can this query be more precise to return only the latest tag?
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.
Unfortunately, I'm not sure how to proceed with that task. 🤷
Feel free to give it a try, as I'm not proficient with jq
. 😉
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.
Approving and merging to fix the failing builds. Feel free to open a PR proposing a better change or to revert if it breaks anything.
Thanks! |
This is a follow-up PR to #906 by @dduportal.
I started from his work and altered the
jq
query.Testing done
updatecli diff --debug --config ./updatecli/updatecli.d/rhel-ubi9.yaml --values ./updatecli/values.github-action.yaml 2>&1
Submitter checklist