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 make bundle #998

Merged
merged 2 commits into from
Nov 11, 2024
Merged

Fix make bundle #998

merged 2 commits into from
Nov 11, 2024

Conversation

eguzki
Copy link
Contributor

@eguzki eguzki commented Nov 11, 2024

What

bundle makefile phony target does not fail when a referenced bundle image does not exist

This fix makes it fail fast when bundle image does not exist on.

For example, with the changes of this branch, running

make bundle IMG=quay.io/kuadrant/kuadrant-operator:latest VERSION=0.12.0 LIMITADOR_OPERATOR_BUNDLE_IMG=quay.io/kuadrant/limitador-operator-bundle:unknown AUTHORINO_OPERATOR_BUNDLE_IMG=quay.io/kuadrant/authorino-operator-bundle:unknown DNS_OPERATOR_BUNDLE_IMG=quay.io/kuadrant/dns-operator-bundle:unknown RELATED_IMAGE_WASMSHIM=oci://quay.io/kuadrant/wasm-shim:latest

Note that quay.io/kuadrant/limitador-operator-bundle:unknown does not exist

The resulting error is:

ATH=/home/eguzki/git/kuadrant/kuadrant-operator/bin:$PATH; \
		 /home/eguzki/git/kuadrant/kuadrant-operator/utils/update-operator-dependencies.sh limitador-operator quay.io/kuadrant/limitador-operator-bundle:unknown
2024/11/11 11:53:12 render reference "quay.io/kuadrant/limitador-operator-bundle:unknown": error resolving name : quay.io/kuadrant/limitador-operator-bundle:unknown: not found

And the command returns early with the error.

On the other hand, without the changes of this PR (checkout on main branch), running the command:

make bundle IMG=quay.io/kuadrant/kuadrant-operator:latest VERSION=0.12.0 LIMITADOR_OPERATOR_BUNDLE_IMG=quay.io/kuadrant/limitador-operator-bundle:unknown AUTHORINO_OPERATOR_BUNDLE_IMG=quay.io/kuadrant/authorino-operator-bundle:unknown DNS_OPERATOR_BUNDLE_IMG=quay.io/kuadrant/dns-operator-bundle:unknown RELATED_IMAGE_WASMSHIM=oci://quay.io/kuadrant/wasm-shim:latest

The command still fails, but the error is a bundle validation step

ERRO[0000] error validating format in bundle: Bundle validation errors: Package version is empty,Package version is empty,Package version is empty

Just because the generated bundle is not correct (due to missing bundle image)

@eguzki eguzki requested a review from mikenairn November 11, 2024 10:57
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
@eguzki
Copy link
Contributor Author

eguzki commented Nov 11, 2024

I summon our bash expert for review @mikenairn

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.82%. Comparing base (cc1b41f) to head (e57e427).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #998      +/-   ##
==========================================
+ Coverage   76.15%   83.82%   +7.66%     
==========================================
  Files         111       81      -30     
  Lines        8986     6632    -2354     
==========================================
- Hits         6843     5559    -1284     
+ Misses       1852      860     -992     
+ Partials      291      213      -78     
Flag Coverage Δ
bare-k8s-integration 14.64% <ø> (+3.77%) ⬆️
controllers-integration 76.22% <ø> (+17.36%) ⬆️
envoygateway-integration 41.13% <ø> (+8.63%) ⬆️
gatewayapi-integration 16.29% <ø> (+2.85%) ⬆️
istio-integration 43.51% <ø> (+9.18%) ⬆️
unit 17.03% <ø> (-8.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
api/v1beta1 (u) 90.00% <100.00%> (-2.19%) ⬇️
api/v1beta2 (u) ∅ <ø> (∅)
pkg/common (u) ∅ <ø> (∅)
pkg/istio (u) 62.06% <ø> (+15.03%) ⬆️
pkg/log (u) 93.18% <ø> (ø)
pkg/reconcilers (u) 24.67% <ø> (∅)
pkg/rlptools (u) ∅ <ø> (∅)
controllers (i) 86.64% <91.05%> (+2.21%) ⬆️

see 22 files with indirect coverage changes

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
@eguzki eguzki merged commit 2d528c8 into main Nov 11, 2024
34 checks passed
@eguzki eguzki deleted the fix-make-bundle branch November 11, 2024 12:42
maleck13 pushed a commit that referenced this pull request Nov 13, 2024
* fix make bundle

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>

* doc/development.md: little fix

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>

---------

Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants