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

Make subscriptionID mutable

Open dlipovetsky opened this issue 1 year ago • 6 comments
trafficstars

What type of PR is this? /kind bug

What this PR does / why we need it: Previously, the field was immutable. It was, and remains, an optional field. The manager bootstrap credential was used when the field was empty.

The credential is no longer supported, so the field is now effectively required, because CAPZ fails to reconcile existing resources when the field is empty.

Making the field mutable makes it possible to update existing resources to the value previously stored in the manager bootstrap credential.

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 #4557

Special notes for your reviewer:

  • [x] cherry-pick candidate

Because the subscription ID field became effectively required in v1.11.0, I think we should consider backporting this PR to release-1.11 and release-1.12.

TODOs:

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

Release note:

The subscriptionID field is now mutable. Previously, resources could have an empty subscription ID. In v1.11.0, the subscription ID became an effectively required field. By making the field mutable, existing resources can be made compatible with v1.11.0 and newer. 

dlipovetsky avatar Mar 01 '24 16:03 dlipovetsky

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign mboersma for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 Mar 01 '24 16:03 k8s-ci-robot

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 62.72%. Comparing base (49b97b0) to head (7ddaaa9). Report is 642 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4612      +/-   ##
==========================================
+ Coverage   62.47%   62.72%   +0.24%     
==========================================
  Files         192      192              
  Lines       15453    15643     +190     
==========================================
+ Hits         9655     9812     +157     
- Misses       5131     5147      +16     
- Partials      667      684      +17     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 01 '24 16:03 codecov[bot]

/test pull-cluster-api-provider-azure-apidiff

mboersma avatar Mar 05 '24 18:03 mboersma

codecov failure cause:

error - 2024-03-13 15:52:42,507 -- Commit creating failed: {"detail":"Tokenless has reached GitHub rate limit. Please upload using a token: https://docs.codecov.com/docs/adding-the-codecov-token. Expected available in 967 seconds."}

dlipovetsky avatar Mar 13 '24 16:03 dlipovetsky

/assign

nojnhuh avatar Mar 14 '24 16:03 nojnhuh

I opened #4784 to fix the regression this addresses but don't mean for that to supersede this entirely. I'm still open to making changes to the subscriptionID field.

nojnhuh avatar Apr 26 '24 21:04 nojnhuh

The Kubernetes project currently lacks enough contributors to adequately respond to all 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:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this 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 Jul 25 '24 21:07 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all 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:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this 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 Aug 30 '24 20:08 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 Sep 29 '24 20:09 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-sigs/prow repository.

k8s-ci-robot avatar Sep 29 '24 20:09 k8s-ci-robot