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

USHIFT-2372: Correct the GROUP path assignment when calling build_images.sh with -t. #3011

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

jogeo
Copy link
Contributor

@jogeo jogeo commented Feb 14, 2024

Corrects the GROUP variable value when build_images.sh is called with the -t option.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2024
@ggiguash
Copy link
Contributor

/lgmt
/hold

@jogeo , please attach this PR to a JIRA issue you're working on, or create a separate bug for tracking.
You're welcome to unhold the PR once it's linked to the right JIRA.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 14, 2024
@ggiguash
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2024
Copy link
Contributor

@dhellmann dhellmann left a comment

Choose a reason for hiding this comment

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

/lgtm

@jogeo
Copy link
Contributor Author

jogeo commented Feb 14, 2024

There is a secondary issue once the group path is set correctly. When -t is passed only one template is built but the code to build the image installer loops over all the files in the directory that have the .image-installer suffix.

I'll keep the /hold until a fix for this is added as well.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2024
if [ -n "${template_arg}" ]; then
image_installer_list="${template_arg%.toml}".image-installer
fi
for image_installer in "${image_installer_list}"; do
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not alter the for loop pattern? There are edge cases on how wildcards are interpreted and expanded when passed through variables.

As an alternative, inside the for loop, please just check if a template_arg was given and compare the file names. If names do not match, use continue to skip to the next loop iteration.

@jogeo
Copy link
Contributor Author

jogeo commented Feb 21, 2024

/retest

@jogeo
Copy link
Contributor Author

jogeo commented Feb 25, 2024

/retest

@jogeo jogeo changed the title Correct the GROUP path assignment when calling build_images.sh with -t. USHIFT-2372: Correct the GROUP path assignment when calling build_images.sh with -t. Feb 26, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 26, 2024

@jogeo: This pull request references USHIFT-2372 which is a valid jira issue.

In response to this:

Corrects the GROUP variable value when build_images.sh is called with the -t option.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 26, 2024
@@ -362,6 +362,15 @@ do_group() {

if ${BUILD_INSTALLER} && ! ${COMPOSER_DRY_RUN}; then
for image_installer in "${groupdir}"/*.image-installer; do
# If a template arg was given, only build the image installer for the
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious - can you give me a command that has wrong behavior without the fix? I think I noticed some unnecessary installer builds, but I can't recall the exact scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

test/bin/build_images.sh -E -i -f -t test/image-blueprints/layer1-base/group1/rhel93.toml

Copy link
Member

Choose a reason for hiding this comment

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

Argh, I get it now - this one doesn't show up until you fix the primary one...

@pmtk
Copy link
Member

pmtk commented Feb 27, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2024
Copy link
Contributor

openshift-ci bot commented Feb 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, ggiguash, jogeo, pmtk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [dhellmann,ggiguash,jogeo,pmtk]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jogeo
Copy link
Contributor Author

jogeo commented Feb 27, 2024

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2024
Copy link
Contributor

openshift-ci bot commented Feb 27, 2024

@jogeo: all tests passed!

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit bd758d4 into openshift:main Feb 27, 2024
8 checks passed
@ggiguash
Copy link
Contributor

ggiguash commented Apr 1, 2024

/cherry-pick release-4.15

@openshift-cherrypick-robot

@ggiguash: new pull request created: #3202

In response to this:

/cherry-pick release-4.15

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants