Skip to content

Comments

helper/resource: Changelogs and test for #602#606

Merged
austinvalle merged 10 commits intomainfrom
av/destroy-plan-test-n-changelog
Feb 13, 2026
Merged

helper/resource: Changelogs and test for #602#606
austinvalle merged 10 commits intomainfrom
av/destroy-plan-test-n-changelog

Conversation

@austinvalle
Copy link
Member

@austinvalle austinvalle commented Feb 10, 2026

Related Issue

Follow-up to #602 , cc @BBBmau

Description

This PR just includes changelogs and a test for the only change that was unrelated to the special compatibility flag we have.

If you comment out the destroy plan code added in #602, the new test will error with:

--- FAIL: Test_Destroy_Checks_Avoid_Stale_Plan (0.42s)

/Users/austin.valle/code/terraform-plugin-testing/helper/resource/testing_new_config_test.go:915: Step 1/1 error: Error running destroy: exit status 1

Error: Saved plan is stale

The given plan file can no longer be applied because the state was changed by
another operation after the plan was created.

FAIL
FAIL github.com/hashicorp/terraform-plugin-testing/helper/resource 1.252s

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

No

@austinvalle austinvalle added this to the v1.15.0 milestone Feb 10, 2026
@austinvalle austinvalle requested a review from a team as a code owner February 10, 2026 21:04
@austinvalle
Copy link
Member Author

austinvalle commented Feb 10, 2026

Interesting, the newly added alpha is causing some consistent test failures 😅

=== RUN   TestTest_TestStep_ProviderFactories_Import_External_WithoutPersistNonMatch_WithPersistWorkingDir
    teststep_providers_test.go:2968: TestCase error running init: exit status 1
        
        Error: Failed to query available provider packages
        
        Could not retrieve the list of available versions for provider
        hashicorp/random: could not connect to registry.terraform.io: error reading
        discovery document body: context canceled
        
        To see which modules are currently depending on hashicorp/random and what
        versions are specified, run the following command:
            terraform providers

I'll need to figure out how I can recreate this on my local machine, as I'm not seeing failures there 👀 , there has been a change recently to that Go module, but unsure if it's related ATM: hashicorp/terraform#38064


This test failure is almost certainly unrelated to the change in #602 , this PR just happens to be the bearer of bad news 😆

Copy link
Collaborator

@BBBmau BBBmau left a comment

Choose a reason for hiding this comment

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

I'll add an approval from my end in regards to the added test and changelogs related to #602

Took a crack at understanding the consistent failures from 1.15.0-alpha but it looks like it may be coming from a go module changed (thanks for looking into that further! )

Makes sense to not merge this until we at least know what is producing the consistent failures.

@austinvalle austinvalle force-pushed the av/destroy-plan-test-n-changelog branch from 4409fe8 to e5c6d79 Compare February 12, 2026 20:17
@austinvalle
Copy link
Member Author

austinvalle commented Feb 12, 2026

Alright, I've reverted my temporary changes on this PR and left the fail-fast addition so our PRs show that 1.15 alpha is the only failing test.

I'm going to take my further attempts to clarify the error into a separate draft PR.

This PR is ready for review 👍🏻


Funny enough, one of the 1.15 tests has finally passed, so race condition confirmed 😆

@austinvalle austinvalle merged commit 9736162 into main Feb 13, 2026
46 of 47 checks passed
@austinvalle austinvalle deleted the av/destroy-plan-test-n-changelog branch February 13, 2026 22:24
ansgarm pushed a commit that referenced this pull request Feb 18, 2026
* add changelogs and new test

* trace logs

* log

* single test

* cover

* revert

* quick log attempt

* upload some logs on failure

* glob

* revert test changes
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.

3 participants