Skip to content

Single Workspace Skip - DefaultWorkspaceOnly#633

Merged
rainkwan merged 18 commits intomainfrom
av/add-single-workspace-skip
Mar 26, 2026
Merged

Single Workspace Skip - DefaultWorkspaceOnly#633
rainkwan merged 18 commits intomainfrom
av/add-single-workspace-skip

Conversation

@rainkwan
Copy link
Copy Markdown
Contributor

Related Issue

Fixes #

Description

This PR adds a DefaultWorkspaceOnly boolean to TestStep that makes it so tests are limited to the provider's default workspace, a special case that applies to testing StateStores

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

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

No

austinvalle and others added 5 commits February 26, 2026 14:36
…to av/add-single-workspace-skip

# Conflicts:
#	helper/resource/statestore/statestore_test.go
#	helper/resource/testing.go
@rainkwan rainkwan marked this pull request as ready for review March 17, 2026 16:53
@rainkwan rainkwan requested a review from a team as a code owner March 17, 2026 16:53
Comment thread helper/resource/testing.go Outdated
Comment thread helper/resource/statestore/statestore_test.go Outdated
Comment thread helper/resource/statestore/statestore_test.go Outdated
Comment thread helper/resource/testing.go
Comment thread helper/resource/testing_new_state_store.go Outdated
Comment thread helper/resource/teststep_validate.go Outdated
Comment thread helper/resource/teststep_validate_test.go Outdated
Comment thread .changes/unreleased/ENHANCEMENTS-20260319-131506.yaml Outdated
Comment thread helper/resource/statestore/examplecloud_statestore_test.go Outdated
Comment thread helper/resource/statestore/statestore_test.go Outdated
@rainkwan rainkwan requested a review from austinvalle March 19, 2026 20:29
austinvalle
austinvalle previously approved these changes Mar 23, 2026
Copy link
Copy Markdown
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

Looks like there is a small format change to the changelog needed, but everything else LGTM 🚀

Comment on lines +2 to +3
body:
helper/resource: Added `DefaultWorkspaceOnly` to enable testing state store implementations that don't support multiple workspaces. This is achieved by only running Terraform commands with the `default` workspace.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's weird changie didn't raise an error here, as this looks like an invalid changelog 🤔 , it looks like the body would be empty because of the newline before helper/resource:

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah for some reason if I do not put a new line it gets angry because it thinks that section needs a new header so maybe if I just format it differently?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah probably because of the : character, wrapping the entire thing in single quotes will treat it as a string literal in YAML, most of our changelogs have something similar:

body: 'querycheck: Fix behaviour of `ExpectLength` querycheck to match on the provided resource address before comparing the count'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried that once before but then changie fails for some reason?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very interesting 🤔, it's likely an encoding problem 👀

Comment thread .changes/unreleased/ENHANCEMENTS-20260319-131506.yaml Outdated
Co-authored-by: Austin Valle <austinvalle@gmail.com>
@rainkwan rainkwan merged commit 9f4f6b8 into main Mar 26, 2026
46 checks passed
@rainkwan rainkwan deleted the av/add-single-workspace-skip branch March 26, 2026 15:37
@SBGoods SBGoods added this to the v1.16.0 milestone Apr 8, 2026
@SBGoods SBGoods added the enhancement New feature or request label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants