Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: terraform-plugin-sdk zeros *int fields#123

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 14 commits intocoder:mainfrommtojek:bug-validation-min
Jun 1, 2023

Conversation

mtojek
Copy link
Member

@mtojekmtojek commentedMay 30, 2023
edited
Loading

Related:coder/coder#7582 (comment)

Changes:

  • add computed fieldsmin_ok andmax_ok toValidation. These fields substitute the impaired logic in terraform-plugin-sdk (can't handle *ptr).
  • replace*int withint (revert last change) as pointers don't give any benefits now.

For some reason, the Terraform state containsvalidation.0.min = 0. I managed to fixparameterDataSource to handlenils.

If you look at the state, it doesn't contain absent root properties ofcoder_parameter (likedisplay_name), but it contains all forValidation. Why :) ?

_, foundDisplayName := state.Primary.Attributes["display_name"]
require.False(t, foundDisplayName, "display_name = "+state.Primary.Attributes["display_name"])
_, foundValidationMin := state.Primary.Attributes["validation.0.min"]
require.False(t, foundValidationMin, "validation.0.min = "+state.Primary.Attributes["validation.0.min"])
Copy link
MemberAuthor

@mtojekmtojekMay 30, 2023
edited
Loading

Choose a reason for hiding this comment

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

@kylecarbs Maybe you have a clue what is the reason.

@mtojekmtojek changed the titlebug: validation min = 0fix: terraform-plugin-sdk zeros *int fieldsMay 31, 2023
@mtojekmtojek self-assigned thisMay 31, 2023
@mtojekmtojek requested a review frommafredriMay 31, 2023 09:21
@mtojekmtojek requested a review fromspikecurtisMay 31, 2023 09:57
@mtojekmtojek marked this pull request as ready for reviewMay 31, 2023 09:57
@mtojekmtojek requested a review fromspikecurtisMay 31, 2023 11:39
@mtojek
Copy link
MemberAuthor

Thanks,@mafredri, for taking a look! I will wait for the final approval from@spikecurtis and merge it 👍

@mtojekmtojek merged commit547f1b6 intocoder:mainJun 1, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 1, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@spikecurtisspikecurtisspikecurtis approved these changes

Assignees

@mtojekmtojek

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mtojek@mafredri@spikecurtis

[8]ページ先頭

©2009-2025 Movatter.jp