Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Resolve awsteam_settings update flow. #45

Merged
merged 4 commits into from
Mar 26, 2024
Merged

Conversation

brittandeyoung
Copy link
Owner

Description

This PR resolves the issue where computed fields where not being properly saved to state after an update is performed.

Relations

Closes #41

References

Output from Running Acceptance Tests

Failing tests before change:

$  make testacc TESTARGS='-run=TestAccSettings'
TF_ACC=1 go test ./... -v -run=TestAccSettings -timeout 120m
?       github.com/brittandeyoung/terraform-provider-awsteam    [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/acctest   [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/envvar    [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/names     [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/sdk/awsteam       [no test files]
=== RUN   TestAccSettings_serial
=== PAUSE TestAccSettings_serial
=== CONT  TestAccSettings_serial
=== RUN   TestAccSettings_serial/Resource
=== RUN   TestAccSettings_serial/Resource/basic
=== RUN   TestAccSettings_serial/Resource/duration
    settings_test.go:90: Step 3/3 error: Error running apply: exit status 1
        
        Error: Provider returned invalid result object after apply
        
        After the apply operation, the provider still indicated an unknown value for
        awsteam_settings.test.created_at. All values must be known after apply, so
        this is always a bug in the provider and should be reported in the provider's
        own repository. Terraform will still save the other known object values in
        the state.
        
        Error: Provider returned invalid result object after apply
        
        After the apply operation, the provider still indicated an unknown value for
        awsteam_settings.test.modified_by. All values must be known after apply, so
        this is always a bug in the provider and should be reported in the provider's
        own repository. Terraform will still save the other known object values in
        the state.
        
        Error: Provider returned invalid result object after apply
        
        After the apply operation, the provider still indicated an unknown value for
        awsteam_settings.test.updated_at. All values must be known after apply, so
        this is always a bug in the provider and should be reported in the provider's
        own repository. Terraform will still save the other known object values in
        the state.
=== RUN   TestAccSettings_serial/DataSource
=== RUN   TestAccSettings_serial/DataSource/basic
--- FAIL: TestAccSettings_serial (16.54s)
    --- FAIL: TestAccSettings_serial/Resource (11.03s)
        --- PASS: TestAccSettings_serial/Resource/basic (5.08s)
        --- FAIL: TestAccSettings_serial/Resource/duration (5.94s)
    --- PASS: TestAccSettings_serial/DataSource (5.51s)
        --- PASS: TestAccSettings_serial/DataSource/basic (5.51s)
FAIL
FAIL    github.com/brittandeyoung/terraform-provider-awsteam/internal/provider  16.992s
FAIL
make: *** [testacc] Error 1

...

Passing tests after change:

 ✗ make testacc TESTARGS='-run=TestAccSettings'
TF_ACC=1 go test ./... -v -run=TestAccSettings -timeout 120m
?       github.com/brittandeyoung/terraform-provider-awsteam    [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/acctest   [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/envvar    [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/names     [no test files]
?       github.com/brittandeyoung/terraform-provider-awsteam/internal/sdk/awsteam       [no test files]
=== RUN   TestAccSettings_serial
=== PAUSE TestAccSettings_serial
=== CONT  TestAccSettings_serial
=== RUN   TestAccSettings_serial/Resource
=== RUN   TestAccSettings_serial/Resource/basic
=== RUN   TestAccSettings_serial/Resource/duration
=== RUN   TestAccSettings_serial/DataSource
=== RUN   TestAccSettings_serial/DataSource/basic
--- PASS: TestAccSettings_serial (12.40s)
    --- PASS: TestAccSettings_serial/Resource (9.28s)
        --- PASS: TestAccSettings_serial/Resource/basic (4.76s)
        --- PASS: TestAccSettings_serial/Resource/duration (4.53s)
    --- PASS: TestAccSettings_serial/DataSource (3.12s)
        --- PASS: TestAccSettings_serial/DataSource/basic (3.12s)
PASS
ok      github.com/brittandeyoung/terraform-provider-awsteam/internal/provider  12.907s

@brittandeyoung brittandeyoung added the bug Something isn't working label Mar 26, 2024
@brittandeyoung brittandeyoung merged commit 602f43a into main Mar 26, 2024
4 checks passed
@brittandeyoung brittandeyoung deleted the bugfix/41 branch March 26, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error after adding settings with import
1 participant