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: catch failures in makefile when building skopeo #579

Merged

Conversation

smoser
Copy link
Contributor

@smoser smoser commented Dec 14, 2023

Skopeo's build target is an inline shell script.
It needs to run with 'set -e' or it will just keep going after it fails.

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Skopeo's build target is an inline shell script.
It needs to run with 'set -e' or it will just keep going
after it fails.

Signed-off-by: Scott Moser <smoser@brickies.net>
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b6996fd) 13.02% compared to head (4b80414) 57.14%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #579       +/-   ##
===========================================
+ Coverage   13.02%   57.14%   +44.11%     
===========================================
  Files          40       64       +24     
  Lines        6057     7516     +1459     
===========================================
+ Hits          789     4295     +3506     
+ Misses       5136     2479     -2657     
- Partials      132      742      +610     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Makefile Show resolved Hide resolved
@mikemccracken
Copy link
Contributor

mikemccracken commented Dec 14, 2023

would this be better using .ONESHELL: and .SHELLFLAGS: -e ?https://www.gnu.org/software/make/manual/html_node/One-Shell.html

(thus avoiding the ; \ at the end of each line)

@smoser
Copy link
Contributor Author

smoser commented Dec 14, 2023

I think .ONESHELL and .SHELLFLAGS are wierd (they're like decorators on a rule) but i'm fine to switch to that if other people want that.

it seems like set -e woudl have been a batter choice as the default behavior.

@smoser
Copy link
Contributor Author

smoser commented Dec 15, 2023

I thought I had commented, if people think ONESHELL and SHELLFLAGS make this better, i'm fine to do that.

I guess either ACK the fix here or request changes and I'll comply.

@raharper raharper merged commit d54e250 into project-stacker:main Dec 18, 2023
11 checks passed
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.

None yet

3 participants