fix: allow orchestrator_version if auto-upgrade is 'patch' to allow default_node_pool upgrade#302
fix: allow orchestrator_version if auto-upgrade is 'patch' to allow default_node_pool upgrade#302lonegunmanb merged 1 commit intoAzure:mainfrom swisspost:bugfix/issue_301
Conversation
lonegunmanb
left a comment
There was a problem hiding this comment.
Almost LGTM if the e2e test could pass, but would you please update var.automatic_channel_upgrade's description about this new requirement for orchestrator_version when var.automatic_channel_upgrade = patch? Thanks @aescrob
There was a problem hiding this comment.
Thanks @aescrob for updating this pr, we have some e2e tests failed, one example is:
TestExamplesStartup 2023-02-16T02:25:55Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1; ╷
│ Error: Resource precondition failed
│
│ on ../../main.tf line 296, in resource "azurerm_kubernetes_cluster" "main":
│ 296: condition = local.automatic_channel_upgrade_check
│ ├────────────────
│ │ local.automatic_channel_upgrade_check is false
│
│ Either disable automatic upgrades, or only specify up to the minor version
│ when using `automatic_channel_upgrade=patch` or don't specify
│ `kubernetes_version` at all when using
│ `automatic_channel_upgrade=stable|rapid|node-image`. With automatic
│ upgrades `orchestrator_version` must be set to `null`.
╵}
=== CONT TestExamplesStartup
apply.go:34:
Error Trace: /src/test/e2e/apply.go:34
/src/test/e2e/e2etest.go:57
/src/test/e2e/e2etest.go:38
/src/test/e2e/terraform_aks_test.go:22
Error: Received unexpected error:
FatalError{Underlying: error while running command: exit status 1; ╷
│ Error: Resource precondition failed
│
│ on ../../main.tf line 296, in resource "azurerm_kubernetes_cluster" "main":
│ 296: condition = local.automatic_channel_upgrade_check
│ ├────────────────
│ │ local.automatic_channel_upgrade_check is false
│
│ Either disable automatic upgrades, or only specify up to the minor version
│ when using `automatic_channel_upgrade=patch` or don't specify
│ `kubernetes_version` at all when using
│ `automatic_channel_upgrade=stable|rapid|node-image`. With automatic
│ upgrades `orchestrator_version` must be set to `null`.
╵}
Test: TestExamplesStartup
Would you please fix our examples and tests, then verify them by run e2e tests or just run terraform plan for all examples before you commit? Thanks for your understanding!
Btw, in case this pr failed the version update test, which means when the previous version of the example would met errors when it upgrades to this pr version, then we must consider this pr as a breaking change. In that case, I would rather postpone the merge, and release our current version as a new minor version so our users don't need to take the risks to get current unreleased features.
…efault_node_pool upgrade
|
Hi @lonegunmanb - thanks for your support. |
lonegunmanb
left a comment
There was a problem hiding this comment.
LGTM but I'd like to ask @the-technat for a review.
the-technat
left a comment
There was a problem hiding this comment.
Makes sense to me and looks good. Maybe it's worth documenting that the orchestrator_version can be set to null because it should be a non-breaking change and not because it's a recommended approach to configure the module.
Describe your changes
Issue number
#301
Checklist before requesting a review
CHANGELOG.mdfileThanks for your cooperation!