-
Notifications
You must be signed in to change notification settings - Fork 81
Refactor publish-rhel.sh
#1083
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
Merged
Merged
Refactor publish-rhel.sh
#1083
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48b52be
to
3efdd3e
Compare
3efdd3e
to
b6893b5
Compare
nishaatr
approved these changes
Sep 3, 2025
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.
Good change!
Co-authored-by: Nishaat Rajabali <[email protected]>
b9540cc
to
7688f53
Compare
@nishaatr I've (substantially) updates this PR and cleared your review accordingly. |
7688f53
to
f0e4000
Compare
nishaatr
requested changes
Sep 5, 2025
nishaatr
approved these changes
Sep 5, 2025
ldziedziul
approved these changes
Sep 11, 2025
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.
Looks good, have you tested it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simplify
The script calls functions in order, most steps only proceed if a certain condition is met. The subsequent step then immediately checks the same condition before proceeding which is redundant.
This is an optimization, it's not a problem.
Example:
wait_for_container_scan
:hazelcast-docker/.github/scripts/publish-rhel.sh
Lines 68 to 69 in 6729095
publish_the_image
:hazelcast-docker/.github/scripts/publish-rhel.sh
Lines 103 to 106 in 6729095
wait_for_container_publish
:hazelcast-docker/.github/scripts/publish-rhel.sh
Lines 138 to 146 in 6729095
sync_tags
:hazelcast-docker/.github/scripts/publish-rhel.sh
Lines 183 to 189 in 6729095
Finally merged
publish_the_image
&sync_tags
functions as now they are the same.get_image
get_image
took in filter parameters (e.g.deleted
,published
), because prior to #968, it was filtering by image name and multiple results were expected.Now that we use
IMAGE_ID
, there should only be one response.This also means rather than filtering
published
on the server-side, we can get the image and check thepublished
status of the response - which allows us to log it for debug purposes.wait_for_container_publish
In the event of a timeout waiting for a publish, we log the test results since #845
We should also add information on the status of the (publish) request, as this is what helped us identify the root cause of the RedHat publish issues