canonical / knative-operators

Charmed Knative Operators
Apache License 2.0
1 stars 2 forks source link

Script for fetching images is failing for net-istio #219

Closed kimwnasptd closed 2 months ago

kimwnasptd commented 3 months ago

Bug Description

The script for fetching the knative images is failing because of a missing net-istio.yaml, according to the printed logs.

We need to ensure the script is able to gather all the images from Knative, as it's needed for scanning https://github.com/canonical/bundle-kubeflow/pull/1029 and airgapped efforts.

For more context on how the image gathering script is working take a look in https://github.com/canonical/knative-operators/issues/142#issue-1875147037

To Reproduce

./tools/get-images.sh

Environment

main and track/1.12 branches

Relevant Log Output

Error: open ./net-istio.yaml: no such file or directory
gcr.io/knative-releases/knative.dev/eventing/cmd/broker/filter@sha256:fd596e82d5f474c8dfd36a05d29c4236e26b1dce62cb1f10076121078783f4c4
gcr.io/knative-releases/knative.dev/eventing/cmd/broker/ingress@sha256:a599ac699b0f29782b4ba02e4d36c5b2dd1f13e988db81071d56f2d90ff69047
gcr.io/knative-releases/knative.dev/eventing/cmd/controller@sha256:9a881d503404349afefadce4ab82358d2f7f1775a97edd6704c0e3f132674ced
gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_controller@sha256:3584328cc6499b81a442994c97d433408c5704e627c94244f1a09e67428bbc21
gcr.io/knative-releases/knative.dev/eventing/cmd/in_memory/channel_dispatcher@sha256:bcbca2d26738bc098bd46d044f7db8ddb96f21588b39f90eaf3a66fe87923d15
gcr.io/knative-releases/knative.dev/eventing/cmd/mtchannel_broker@sha256:86f92c46ee0eabf6e5dbe970e21bdaa2fea3b752b809f38ed37a4a5a8d4d012f
gcr.io/knative-releases/knative.dev/eventing/cmd/mtping@sha256:9f2044c104a6f6516d59d7e046e7682e4bd66af7eff2cee8eb5783029e4c3d63
gcr.io/knative-releases/knative.dev/eventing/cmd/webhook@sha256:295fd0d48801532460d3081e374e736445e229a24e4938f513ebbfca14d217de
gcr.io/knative-releases/knative.dev/pkg/apiextensions/storageversion/cmd/migrate@sha256:b557a57aeef5c530871b59bfc6d2fdfea54e34858c5b2186b1d501bf8133d5ff
gcr.io/knative-releases/knative.dev/pkg/apiextensions/storageversion/cmd/migrate@sha256:232d6ffd88dfc0d0ec02c6f3a95520283d076c16b77543cee04f4ef276e0b7ae
gcr.io/knative-releases/knative.dev/serving/cmd/activator@sha256:ad42ddc9bc4e25fdc88c240d7cbfad4b2708eb7d26e07ae904d258011141116e
gcr.io/knative-releases/knative.dev/serving/cmd/autoscaler-hpa@sha256:f5d84faf112df9a63c5339a2843f6fcce6044c71541e9e1989e922885e927922
gcr.io/knative-releases/knative.dev/serving/cmd/autoscaler@sha256:66aa0dbceee62691d5327e423bbd7cbd411903747adeab61fdc81b14590793d4
gcr.io/knative-releases/knative.dev/serving/cmd/controller@sha256:e5b7b6edd265b66d32f424bd245c06455154462ade6ce05698472212248d5657
gcr.io/knative-releases/knative.dev/serving/cmd/default-domain@sha256:251cf2b454e674ddea6e56ffd5b25f0dde9a53464bf4216dda3ccd3bee728197
gcr.io/knative-releases/knative.dev/serving/cmd/queue@sha256:89e6f90141f1b63405883fbb4de0d3b6d80f8b77e530904c4d29bdcd1dc5a167
gcr.io/knative-releases/knative.dev/serving/cmd/webhook@sha256:48aee2733721ecc77956abc5a2ca072853a669ebc97519beb48f7b3da8455e67
gcr.io/knative-releases/knative.dev/operator/cmd/operator:v1.12.4
gcr.io/knative-releases/knative.dev/operator/cmd/webhook:v1.12.4
otel/opentelemetry-collector:latest
rm: net-istio.yaml: No such file or directory

Additional Context

The script should also have a set -xe to ensure it stops on the first failure https://github.com/canonical/bundle-kubeflow/issues/1030

syncronize-issues-to-jira[bot] commented 3 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6140.

This message was autogenerated

kimwnasptd commented 2 months ago

In the end the issue is because the version that gets requested net-istio, which will be the same as Knative Serving, does not exist and thus the script fails to download it. https://github.com/canonical/knative-operators/blob/484077af51ac5d08bf08e024f12d1c85828a91ff/tools/get-images.sh#L35

Note that it's also a bug that this failed, yet the script succeeded and why we should set set -e to our bash scripts https://github.com/canonical/bundle-kubeflow/issues/1030

kimwnasptd commented 2 months ago

While not directly related to this issue, in the future we'll need to update the tests to not download upstream yamls and find images but instead parse the images used by the charms https://github.com/canonical/knative-operators/issues/220