Skip to content

Conversation

@Victoremepunto
Copy link
Contributor

@Victoremepunto Victoremepunto commented Nov 14, 2023

This changes provides the following:

  • Reverts multiarch support
  • Improved handling of commands evaluation
  • refactor to use CICD tools repo which provides:
    • Add temporary labels when building if PR context
    • Agnostic container engine commands
    • Automatic container registry login
    • Local runs enabled to avoid push commands if running locally (outside of a CI job)

@Victoremepunto Victoremepunto marked this pull request as ready for review November 14, 2023 17:51
@Victoremepunto
Copy link
Contributor Author

/retest

1 similar comment
@Victoremepunto
Copy link
Contributor Author

/retest

@adamrdrew
Copy link
Contributor

/retest

adamrdrew
adamrdrew previously approved these changes Nov 16, 2023
Copy link
Contributor

@adamrdrew adamrdrew left a comment

Choose a reason for hiding this comment

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

This looks good to me! You'll notice I didn't put any comments in the main script changes. That's because I ran it locally and it worked fine. I looked at it line by line and it all seems sane and readable. I will say I had to ask chatgpt to tell me what these two lines did

[[ 1 -eq $(jq '.tags | length' <<<"$response") ]]
! git diff --quiet "$target_branch" -- "${BASE_IMAGE_FILES[@]}"

If you felt moved to throw a comment above each those lines I think it would help readability a bit. But great patch thanks for doing this!

@Victoremepunto
Copy link
Contributor Author

This looks good to me! You'll notice I didn't put any comments in the main script changes. That's because I ran it locally and it worked fine. I looked at it line by line and it all seems sane and readable. I will say I had to ask chatgpt to tell me what these two lines did

[[ 1 -eq $(jq '.tags | length' <<<"$response") ]]
! git diff --quiet "$target_branch" -- "${BASE_IMAGE_FILES[@]}"

If you felt moved to throw a comment above each those lines I think it would help readability a bit. But great patch thanks for doing this!

Hey Adam, thanks for the review.

On the first one, I didn't write that line, and it already had a comment, which I left intact. it reads...

 33   # find all non-expired tags
 34   [[ 1 -eq $(jq '.tags | length' <<<"$response") ]]

The second one, I've added a comment but just because you asked nicely :P ... sorry, now joking aside, I was hoping the function name would provide enough context. But I added the comment anyways, the function looks like this now:

 46 _base_image_files_changed() {
 47 
 48   local target_branch=${ghprbTargetBranch:-master}
 49 
 50   # Use git to check for any non staged differences in the Base Image files
 51   ! git diff --quiet "$target_branch" -- "${BASE_IMAGE_FILES[@]}"
 52 }

Hope that helps !

@psav psav merged commit c1d5cc2 into RedHatInsights:master Nov 17, 2023
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