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

Fix error building images without extra pkgs #1201

Merged

Conversation

cybertron
Copy link
Contributor

The extra pkg change broke image builds that don't use it because
it was unconditionally calling realpath on the variable. If it wasn't
set then this resulted in an invalid command. To fix this we just
need to move the realpath call inside the -n check so we only do it
if the variable is populated.

The extra pkg change broke image builds that don't use it because
it was unconditionally calling realpath on the variable. If it wasn't
set then this resulted in an invalid command. To fix this we just
need to move the realpath call inside the -n check so we only do it
if the variable is populated.
@hardys
Copy link

hardys commented Mar 19, 2021

/test e2e-metal-ipi
/approve
/cc @elfosardo

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hardys

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:

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2021
@hardys
Copy link

hardys commented Mar 19, 2021

Any idea why CI on #1142 didn't catch this?

Edit: I guess it's because the set -e on the script doesn't catch the subshell error, so you only noticed this by looking at the logs vs the parent script failing?

@elfosardo
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2021
@openshift-merge-robot openshift-merge-robot merged commit 1d3b88e into openshift-metal3:master Mar 19, 2021
@elfosardo
Copy link
Member

Any idea why CI on #1142 didn't catch this?

Edit: I guess it's because the set -e on the script doesn't catch the subshell error, so you only noticed this by looking at the logs vs the parent script failing?

that's probably it, I still need to move the build images code to a separate script as done for the base image, that should help catching future errors

@cybertron
Copy link
Contributor Author

A dev-scripts patch doesn't build any images so it wouldn't have hit this code path. I believe set -e should catch errors from a subshell.

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants