-
Notifications
You must be signed in to change notification settings - Fork 101
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: pulling unused images in the middle of tests #2271
base: main
Are you sure you want to change the base?
Conversation
2083803
to
a5add50
Compare
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question:
Makefile
Outdated
@@ -159,7 +159,10 @@ ARTIFACTS ?= $(ROOT_DIR)/_artifacts | |||
E2E_CONF_FILE ?= $(ROOT_DIR)/test/e2e/config/e2e_conf.yaml | |||
E2E_OUT_DIR ?= $(ROOT_DIR)/test/e2e/_out | |||
E2E_CONF_FILE_ENVSUBST ?= $(E2E_OUT_DIR)/$(notdir $(E2E_CONF_FILE)) | |||
E2E_CONTAINERS ?= quay.io/metal3-io/cluster-api-provider-metal3 quay.io/metal3-io/baremetal-operator quay.io/metal3-io/ip-address-manager | |||
CAPM3_IMAGE ?= ${CONTAINER_REGISTRY}/metal3-io/cluster-api-provider-metal3:${CAPM3RELEASE:-latest} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who initially defines CONTAINER_REGISTRY here?
In CAPM3, it is only mentioned in e2e_conf.yaml, so it is probably empty here, unless it was already defined in dev-env first. With CAPM3 e2e, the test cycle starts on CAPM3 side, not from dev-env, so does this actually work?
In this Makefile, registry variables defined are REGISTRY, STAGING_REGISTRY and PROD_REGISTRY?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CONTAINER_REGISTRY can be defined in project-infra (and is defined there for e2e-integration-tests) or gets a default value from dev-env. I can change ${CONTAINER_REGISTRY}
to ${CONTAINER_REGISTRY:quay.io}
just to be sure.
I've been looking at e2e-integration-test on release-1.9 when making this change.
Here are some copied from the log I've linked above. Times are system time. As you can see from here, yes we starts from CAPM3 e2e but the tests very quickly moves to execute in dev-env. Prepulling of images happens there and we come back to CAPM3 later where the some images get pulled again with latest tag (which is not correct for release-1.9 tests).
01:31:43 Running the tests
01:31:43 + make test-e2e
...
01:31:45 + pushd /opt/metal3-dev-env/metal3-dev-env
01:31:45 /opt/metal3-dev-env/metal3-dev-env ~/tested_repo
01:31:45 + make
01:31:45 make[1]: Entering directory '/opt/metal3-dev-env/metal3-dev-env'
...
01:37:25 ++ sudo docker pull registry.nordix.org/quay-io-proxy/metal3-io/baremetal-operator:v0.9.0
01:37:27 v0.9.0: Pulling from quay-io-proxy/metal3-io/baremetal-operator
...
01:56:45 + make e2e-tests
01:56:45 make[1]: Entering directory '/home/metal3ci/tested_repo'
...
01:56:50 Using default tag: latest
01:56:52 latest: Pulling from metal3-io/baremetal-operator
01:56:52 dd5ad9c9c29f: Already exists
01:56:52 960043b8858c: Already exists
01:56:52 b4ca4c215f48: Already exists
01:56:52 eebb06941f3e: Already exists
01:56:52 02cd68c0cbf6: Already exists
01:56:52 d3c894b5b2b0: Already exists
01:56:52 b40161cd83fc: Already exists
01:56:52 46ba3f23f1d3: Already exists
01:56:52 4fa131a1b726: Already exists
01:56:52 fc8b0dbaf292: Pulling fs layer
01:56:53 fc8b0dbaf292: Verifying Checksum
01:56:53 fc8b0dbaf292: Download complete
01:56:54 fc8b0dbaf292: Pull complete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is Makefile and not bash, so the variable syntax is not {}
but ()
.
Also you need to make fallbacks differently.
CAPM3_IMAGE ?= ${CONTAINER_REGISTRY}/metal3-io/cluster-api-provider-metal3:${CAPM3RELEASE:-latest} | |
CAPM3RELEASE ?= latest | |
CAPM3_IMAGE ?= $(CONTAINER_REGISTRY)/metal3-io/cluster-api-provider-metal3:$(CAPM3RELEASE) |
/retest |
There also seems to be some actual issue triggered by this:
|
a5add50
to
11da043
Compare
/retest |
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
Makefile
Outdated
@@ -159,7 +159,10 @@ ARTIFACTS ?= $(ROOT_DIR)/_artifacts | |||
E2E_CONF_FILE ?= $(ROOT_DIR)/test/e2e/config/e2e_conf.yaml | |||
E2E_OUT_DIR ?= $(ROOT_DIR)/test/e2e/_out | |||
E2E_CONF_FILE_ENVSUBST ?= $(E2E_OUT_DIR)/$(notdir $(E2E_CONF_FILE)) | |||
E2E_CONTAINERS ?= quay.io/metal3-io/cluster-api-provider-metal3 quay.io/metal3-io/baremetal-operator quay.io/metal3-io/ip-address-manager | |||
CAPM3_IMAGE ?= ${CONTAINER_REGISTRY}/metal3-io/cluster-api-provider-metal3:${CAPM3RELEASE:-latest} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is Makefile and not bash, so the variable syntax is not {}
but ()
.
Also you need to make fallbacks differently.
CAPM3_IMAGE ?= ${CONTAINER_REGISTRY}/metal3-io/cluster-api-provider-metal3:${CAPM3RELEASE:-latest} | |
CAPM3RELEASE ?= latest | |
CAPM3_IMAGE ?= $(CONTAINER_REGISTRY)/metal3-io/cluster-api-provider-metal3:$(CAPM3RELEASE) |
11da043
to
29f6f85
Compare
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
/test ? |
@tuminoid: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
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-sigs/prow repository. |
29f6f85
to
73e17a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tuminoid 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 |
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
This won't work. For e.g. check https://jenkins.nordix.org/blue/rest/organizations/jenkins/pipelines/metal3-centos-e2e-integration-test-main/runs/887/nodes/21/steps/35/log/?start=0
=> This is devenv's default. It should have taken into use the value we define here in CAPM3 e2e (tag should be These values should have been exported inside ci-e2e.sh, also please check that there are some default values, like the CAPM3RELEASE, which is defined based on the CAPM3RELEASEBRANCH (same redefinition will happen inside devenv), so the redefinition of that var we do here won't likely take any effects. |
/hold |
73e17a7
to
2b55839
Compare
I changed the code a little bit. These values are set and used after dev-env I'm not trying the set these values for the beginning of the testing process I'm just trying to make sure the same images are used trough each part of a given test. |
2b55839
to
b0de156
Compare
/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main |
/unhold |
It also wouldn't work in that case. Devenv |
Signed-off-by: peppi-lotta <[email protected]>
b0de156
to
222b8f6
Compare
Oh I see you pont! I've made the change now so that it is using values that should be defined and coming from project-infra. |
What this PR does / why we need it: Let's take
metal3-periodic-ubuntu-e2e-integration-test-release-1-9
as an example. This test runsmake
inmetal3-dev-env
where container images (with correct tags) get pulled. Some time later the test moves intocluster-api-provider-metal3
folder and runsmake e2e-test
. At this time CAPM3, BMO and IPAM images will get pulled again but this time the tag is set to latest. This is unnecessary. This fix will pull the correct images if they are missing instead of always bulling images that are unused in many cases.