-
Notifications
You must be signed in to change notification settings - Fork 14
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
Bundle image nightly build with limitador lastcommit #156
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
==========================================
+ Coverage 84.00% 84.50% +0.50%
==========================================
Files 19 19
Lines 994 994
==========================================
+ Hits 835 840 +5
+ Misses 102 99 -3
+ Partials 57 55 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Would love your feedback @didierofrivia |
@didierofrivia whenever you have a change to look at this, please review |
I like the idea of not relying on stored variables, but one comment only, how do you make sure |
There is an specific check for that
|
Thanks @eguzki, missed that piece hehe. Thing now is, if it fails, there's no guarantee it will ever be there, even if it retries N times. For Kuadrant Operator this would be kind of problematic, since it relies on many dependencies that need to be there before bundling. If there's a way we can mitigate that, then it's great. |
For kuadrant operator, my idea is that the operator will not need to find out versions of the dependencies. It will try to build bundle and catalog based on nightly "well known" tags, i.e. I think it is better to have a well known bundle / catalog build that can fail, that a bundle / catalog build with references to unexpected builds that never fail. In order to mitigate build failures, we need some kind of sync system. A pipeline that defines a workflow: first A is been built, then B is been built and can rely on references to image A. If any of the intermediate steps fail, the entire workflow fail. |
WHAT
This is an alternative approach to get the latest operand (limitador), instead of relying on org var
${{ vars.LIMITADOR_SHA }}
.The operator is being built nightly basis, that does not change. Additionally, the operator is being build on any push to any branch (including
main
). That applies for the operator image, the bundle image and the catalog (index) image.Bundle/Catalog builds from branches (including
main
) will have a reference toquay.io/kuadrant/limitador:latest
Nightly builds will have a tag with the format
nightly-{date}
, for example:nightly-04-09-2024
. Additionally, the nightly builds will pushnightly-latest
tag with the same manifest digest.Bundle/Catalog nightly builds will have a reference to
quay.io/kuadrant/limitador:{LATEST_COMMIT}
, beingLATEST_COMMIT
, the git revision of theHEAD
ofmain
at the build time.The workflow includes a check to verify that the docker image exists. It fails otherwise. It can be improved to retry N time before failing. Left for future improvement. This https://github.com/marketplace/actions/retry-action could be used for that.
The {operator image, bundle, catalog} images being built from a push to
main
will still generate image tag with thegit sha
of the limitador operator repo used to build it. For example:quay.io/kuadrant/limitador-operator-bundle:8d7e9ed9f550e7bb105b733f5de04ece964ecc72
. It is left for compatibility with the current way of building the kuadrant operator. However, limitador operator bundle for a git sha for it's own repo is conceptually wrong (or maybe meaningless). It would be correct and useful if we would commit in the operator's repo every time the operand (limitador) changed theHEAD
ofmain
. However we are not doing that. Thus, for the same limitador operator git revision, there could be infinite different bundles, one per each operands (limitador) revision. In order to fix this, the approach is the nightly build picking the latest revision of the operand. Whenever the operator or the operand changes theHEAD
, the nightly build will put both HEADS together into a bundle that QE can test.Release builds should not be affected as it is all pinned to a version.