Skip to content

fix(ske): fix planModifiers for update - #1636

Open
Manuelvaas wants to merge 1 commit into
mainfrom
fix/ske-acc-tests
Open

fix(ske): fix planModifiers for update#1636
Manuelvaas wants to merge 1 commit into
mainfrom
fix/ske-acc-tests

Conversation

@Manuelvaas

Copy link
Copy Markdown
Contributor

Description

relates to STACKITTPR-775

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@Manuelvaas
Manuelvaas requested a review from a team as a code owner July 30, 2026 18:58
@github-actions

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/ske/cluster 48.37% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils/planmodifiers/stringplanmodifier 26.76% (-9.78%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/ske/cluster/resource.go 50.44% (ø) 912 460 452
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/utils/planmodifiers/stringplanmodifier/use_state_for_unknown_if.go 22.22% (-9.60%) 63 (+19) 14 49 (+19) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Comment on lines +97 to +98
// This function is the pathExpression compatible version of StringUnchanged and should replace StringUnchanged in the future
func StringUnchangedExpressionFunction(pathExpressions ...path.Expression) UseStateForUnknownIfFunc { // nolint:gocritic // function signature required by Terraform

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would be nice to extend the description a bit, to avoid misuse. It's possible here to provide multiple path.Expressions and someone could assume, that only if all path.Expressions remain unchanged, it will use UseStateForUnknown. But if I got it correctly, it sets UseStateForUnknown as soon one of the path.Expression remained the same.

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.

2 participants