Skip to content

CORE-11514: Add CI test to check Calico images availability #10604

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

Conversation

skoryk-oleksandr
Copy link
Contributor

Description

TBD

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@Copilot Copilot AI review requested due to automatic review settings June 26, 2025 20:40
@skoryk-oleksandr skoryk-oleksandr requested a review from a team as a code owner June 26, 2025 20:40
@marvin-tigera marvin-tigera added this to the Calico v3.31.0 milestone Jun 26, 2025
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jun 26, 2025
@skoryk-oleksandr skoryk-oleksandr added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact and removed release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Jun 26, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new CI step that verifies all required Calico images (excluding FIPS variants) are available in the operator release and manifests.

  • Introduces hack/check-images-availability.sh to fetch image lists and test registry availability with crane.
  • Hooks the new script into the ci-preflight-checks target in the Makefile.
  • Ensures bin/yq is built before running the image-check step.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
hack/check-images-availability.sh New script to gather images from operator and manifests and verify availability with crane.
Makefile Added check-images-availability target and wired it into ci-preflight-checks.
Comments suppressed due to low confidence (1)

hack/check-images-availability.sh:11

  • [nitpick] The variable name defaultOperatorVersion uses camelCase, while other variables use uppercase with underscores. Consider renaming it to DEFAULT_OPERATOR_VERSION or default_operator_version for consistency.
defaultOperatorVersion=$("$YQ" .tigeraOperator.version < "${SCRIPT_DIR}/../charts/tigera-operator/values.yaml")

@skoryk-oleksandr skoryk-oleksandr force-pushed the oleks-add-check-images-availability-test branch 5 times, most recently from 9abc1a0 to e2f5941 Compare June 26, 2025 23:26
@projectcalico projectcalico deleted a comment from Copilot AI Jun 26, 2025
@projectcalico projectcalico deleted a comment from Copilot AI Jun 26, 2025
@projectcalico projectcalico deleted a comment from Copilot AI Jun 26, 2025
@skoryk-oleksandr skoryk-oleksandr force-pushed the oleks-add-check-images-availability-test branch 7 times, most recently from 1561b16 to 447adcb Compare July 1, 2025 17:13
Comment on lines +1266 to +1270
$(eval TMP := $(shell mktemp -d))
curl -sSfL --retry 5 -o $(TMP)/crane.tar.gz $(CRANE_URL)
tar -xzf $(TMP)/crane.tar.gz -C $(TMP) crane
mv $(TMP)/crane bin/crane
chmod +x bin/crane
Copy link
Contributor

@hjiawei hjiawei Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following one-liner downlads and extracts the crane binary from the release tarball.

curl -sSLf https://github.com/google/go-containerregistry/releases/download/${CONTAINERREGISTRY_VERSION}/go-containerregistry_Linux_x86_64.tar.gz | tar -xz -C bin/crane

The executable permission is retained from the archive, so there's no need to manually set it with chmod +x.

@skoryk-oleksandr skoryk-oleksandr force-pushed the oleks-add-check-images-availability-test branch 4 times, most recently from dc0d1a6 to c0105a7 Compare July 1, 2025 18:45
@skoryk-oleksandr skoryk-oleksandr force-pushed the oleks-add-check-images-availability-test branch 17 times, most recently from c31e9a2 to bf9581f Compare July 2, 2025 17:33
@skoryk-oleksandr skoryk-oleksandr force-pushed the oleks-add-check-images-availability-test branch from bf9581f to 4d09237 Compare July 3, 2025 22:20
@marvin-tigera marvin-tigera removed docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact labels Jul 4, 2025
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.

3 participants