cluster-api-provider-gcp icon indicating copy to clipboard operation
cluster-api-provider-gcp copied to clipboard

Root Disk Image lookup should use a filter on image name rather than family

Open aniruddha2000 opened this issue 3 years ago • 11 comments

What type of PR is this? /kind bug

What this PR does / why we need it: This PR look for Spec.Image instead of Spec.ImageFamily when when Version is specified but Spec.Image and Spec.ImageFamily are not. Also it include the patch version as well instead of current major minor version.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #293

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • [ ] squashed commits
  • [ ] includes documentation
  • [x] adds unit tests

Release note:

Root Disk Image lookup should use a filter on image name rather than family and include patch version

aniruddha2000 avatar May 09 '22 17:05 aniruddha2000

Hi @aniruddha2000. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

k8s-ci-robot avatar May 09 '22 17:05 k8s-ci-robot

/ok-to-test

cpanato avatar May 10 '22 08:05 cpanato

/test ls

cpanato avatar May 10 '22 09:05 cpanato

@cpanato: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-gcp-build
  • /test pull-cluster-api-provider-gcp-e2e-test
  • /test pull-cluster-api-provider-gcp-make
  • /test pull-cluster-api-provider-gcp-test
  • /test pull-cluster-api-provider-gcp-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-gcp-apidiff
  • /test pull-cluster-api-provider-gcp-capi-e2e
  • /test pull-cluster-api-provider-gcp-conformance
  • /test pull-cluster-api-provider-gcp-conformance-ci-artifacts
  • /test pull-cluster-api-provider-gcp-coverage
  • /test pull-cluster-api-provider-gcp-e2e-workload-upgrade

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-gcp-apidiff
  • pull-cluster-api-provider-gcp-build
  • pull-cluster-api-provider-gcp-e2e-test
  • pull-cluster-api-provider-gcp-make
  • pull-cluster-api-provider-gcp-test
  • pull-cluster-api-provider-gcp-verify

In response to this:

/test ls

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/test-infra repository.

k8s-ci-robot avatar May 10 '22 09:05 k8s-ci-robot

/test pull-cluster-api-provider-gcp-capi-e2e /test pull-cluster-api-provider-gcp-conformance

cpanato avatar May 10 '22 09:05 cpanato

thanks /approve /assign @pydctw

cpanato avatar May 10 '22 10:05 cpanato

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aniruddha2000, cpanato

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar May 10 '22 10:05 k8s-ci-robot

I don't have much context on image side of CAPG but reading the issue, how are multiple images with same version but different time stamps are handled? @aniruddha2000

we should fall back to using filtering on the name to also include the patch version as well as sorting by creation timestamp to choose the newest image that matches the kubernetes major/minor/patch version combination.

pydctw avatar May 13 '22 17:05 pydctw

@pydctw Here it is said that -

specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a custom image that you created

Looks like projects/my-proj/global/images/family/capi-ubuntu-1804-k8s-v1-19 will always pick the latest by default according to the implementation and we can specify the projects/my-proj/global/images/family/capi-ubuntu-1804-k8s-v1-19-vYYYYMMDD to get the specific date image.

I also have no context of CAPG image so feel free to correct me if I am wrong 😅

aniruddha2000 avatar May 13 '22 18:05 aniruddha2000

/cc @pydctw

aniruddha2000 avatar Jul 11 '22 17:07 aniruddha2000

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Oct 09 '22 17:10 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Nov 08 '22 18:11 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Dec 08 '22 18:12 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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/test-infra repository.

k8s-ci-robot avatar Dec 08 '22 18:12 k8s-ci-robot