Skip to content

Commit c1e1d22

Browse files
authored
Merge branch 'main' into renovate/actions-checkout-6.x
2 parents d5128b3 + 9343caf commit c1e1d22

60 files changed

Lines changed: 2457 additions & 1357 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ jobs:
100100
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
101101
with:
102102
go-version-file: "go.mod"
103+
# Disable setup-go's module cache to avoid restoring or saving mutable
104+
# cache entries from PR-controlled keys; make deps repopulates modules
105+
# from checksummed sources instead.
106+
cache: false
103107
id: go
104108

105109
- name: Set up Atmos bootstrap
@@ -254,6 +258,10 @@ jobs:
254258
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }}
255259
with:
256260
go-version-file: "go.mod"
261+
# Disable setup-go's module cache to avoid restoring or saving mutable
262+
# cache entries from PR-controlled keys; make deps repopulates modules
263+
# from checksummed sources instead.
264+
cache: false
257265
id: go
258266

259267
- name: Get dependencies
@@ -298,8 +306,6 @@ jobs:
298306
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
299307
# Skip precondition checks in CI to ensure tests run and maintain coverage
300308
ATMOS_TEST_SKIP_PRECONDITION_CHECKS: true
301-
# Enable Playwright integration tests to validate browser driver download
302-
RUN_PLAYWRIGHT_INTEGRATION: 1
303309
run: TESTARGS="-skip=^TestTerraformRegistryCache$" atmos test acceptance --cover
304310

305311
- name: Acceptance tests
@@ -319,8 +325,6 @@ jobs:
319325
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
320326
# Skip precondition checks in CI to ensure tests run and maintain coverage
321327
ATMOS_TEST_SKIP_PRECONDITION_CHECKS: true
322-
# Enable Playwright integration tests to validate browser driver download
323-
RUN_PLAYWRIGHT_INTEGRATION: 1
324328
run: atmos test acceptance
325329

326330
- name: Upload coverage report artifact

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ linters:
6666
files:
6767
- "$all"
6868
- "!**/pkg/auth/providers/**"
69+
- "!**/pkg/store/providers/**"
6970
- "!**/pkg/auth/identities/**"
7071
- "!**/pkg/auth/cloud/**"
7172
- "!**/pkg/auth/factory/**"

cmd/terraform/utils.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ const ciHookFailedMsg = "CI hook execution failed"
4545
// logKeyComponent is the structured-log key for a component name.
4646
const logKeyComponent = "component"
4747

48+
// logKeyStack is the structured-log key for a stack name.
49+
const logKeyStack = "stack"
50+
4851
// verifyPlanFlagName is the tri-state planfile-verify flag (--verify-plan,
4952
// --verify-plan=false).
5053
const verifyPlanFlagName = "verify-plan"
@@ -1155,7 +1158,7 @@ func handleUnconfiguredPlanfileStorage(atmosConfig *schema.AtmosConfiguration, i
11551158

11561159
if v := atmosConfig.Components.Terraform.Planfiles.Verify; v == schema.PlanfileVerifyFail || v == schema.PlanfileVerifyWarn {
11571160
log.Warn("components.terraform.planfiles.verify is set but planfile storage is not configured; skipping planfile verification",
1158-
logKeyComponent, info.ComponentFromArg, "stack", info.Stack)
1161+
logKeyComponent, info.ComponentFromArg, logKeyStack, info.Stack)
11591162
}
11601163
return nil
11611164
}
@@ -1172,7 +1175,7 @@ func handleMissingStoredPlan(atmosConfig *schema.AtmosConfiguration, info *schem
11721175
}
11731176

11741177
log.Warn("No stored planfile found to verify; applying a fresh plan without verification",
1175-
logKeyComponent, info.ComponentFromArg, "stack", info.Stack)
1178+
logKeyComponent, info.ComponentFromArg, logKeyStack, info.Stack)
11761179
return nil
11771180
}
11781181

@@ -1314,7 +1317,7 @@ func handleInteractiveComponentStackSelection(info *schema.ConfigAndStacksInfo,
13141317
// If stack is already provided (via --stack flag), filter components to that stack.
13151318
if info.ComponentFromArg == "" {
13161319
component, err := promptForComponent(cmd, info.Stack)
1317-
if err = handlePromptError(err, "component"); err != nil {
1320+
if err = handlePromptError(err, logKeyComponent); err != nil {
13181321
return err
13191322
}
13201323
info.ComponentFromArg = component
@@ -1323,7 +1326,7 @@ func handleInteractiveComponentStackSelection(info *schema.ConfigAndStacksInfo,
13231326
// Prompt for stack if missing.
13241327
if info.Stack == "" {
13251328
stack, err := promptForStack(cmd, info.ComponentFromArg)
1326-
if err = handlePromptError(err, "stack"); err != nil {
1329+
if err = handlePromptError(err, logKeyStack); err != nil {
13271330
return err
13281331
}
13291332
info.Stack = stack

internal/exec/template_funcs_store_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
errUtils "github.com/cloudposse/atmos/errors"
1313
"github.com/cloudposse/atmos/pkg/schema"
1414
"github.com/cloudposse/atmos/pkg/store"
15+
"github.com/cloudposse/atmos/pkg/store/providers"
1516
u "github.com/cloudposse/atmos/pkg/utils"
1617
)
1718

@@ -25,7 +26,7 @@ func TestStoreTemplateFunc(t *testing.T) {
2526
t.Setenv("ATMOS_REDIS_URL", redisUrl)
2627

2728
// Create a new Redis store
28-
redisStore, err := store.NewRedisStore(store.RedisStoreOptions{
29+
redisStore, err := providers.NewRedisStore(providers.RedisStoreOptions{
2930
URL: &redisUrl,
3031
})
3132
assert.NoError(t, err)
@@ -124,7 +125,7 @@ func TestComponentConfigWithStoreTemplateFunc(t *testing.T) {
124125
t.Setenv("ATMOS_REDIS_URL", redisUrl)
125126

126127
// Create a new Redis store
127-
redisStore, err := store.NewRedisStore(store.RedisStoreOptions{
128+
redisStore, err := providers.NewRedisStore(providers.RedisStoreOptions{
128129
URL: &redisUrl,
129130
})
130131
assert.NoError(t, err)

internal/exec/yaml_func_store_get_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
"github.com/cloudposse/atmos/pkg/schema"
1414
"github.com/cloudposse/atmos/pkg/store"
15+
"github.com/cloudposse/atmos/pkg/store/providers"
1516
)
1617

1718
func TestProcessTagStoreGet(t *testing.T) {
@@ -24,7 +25,7 @@ func TestProcessTagStoreGet(t *testing.T) {
2425
t.Setenv("ATMOS_REDIS_URL", redisUrl)
2526

2627
// Create a new Redis store
27-
redisStore, err := store.NewRedisStore(store.RedisStoreOptions{
28+
redisStore, err := providers.NewRedisStore(providers.RedisStoreOptions{
2829
URL: &redisUrl,
2930
})
3031
assert.NoError(t, err)
@@ -42,7 +43,7 @@ func TestProcessTagStoreGet(t *testing.T) {
4243

4344
// Add some arbitrary keys directly in Redis for testing GetKey
4445
// We need to access the Redis client directly to set arbitrary keys
45-
redisClient := redisStore.(*store.RedisStore).RedisClient()
46+
redisClient := redisStore.(*providers.RedisStore).RedisClient()
4647

4748
// Set arbitrary keys directly in Redis
4849
globalConfig := map[string]interface{}{

internal/exec/yaml_func_store_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
"github.com/cloudposse/atmos/pkg/schema"
1212
"github.com/cloudposse/atmos/pkg/store"
13+
"github.com/cloudposse/atmos/pkg/store/providers"
1314
)
1415

1516
func TestProcessTagStore(t *testing.T) {
@@ -22,7 +23,7 @@ func TestProcessTagStore(t *testing.T) {
2223
t.Setenv("ATMOS_REDIS_URL", redisUrl)
2324

2425
// Create a new Redis store
25-
redisStore, err := store.NewRedisStore(store.RedisStoreOptions{
26+
redisStore, err := providers.NewRedisStore(providers.RedisStoreOptions{
2627
URL: &redisUrl,
2728
})
2829
assert.NoError(t, err)

main_hooks_and_keychain_store_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/stretchr/testify/require"
1111

12-
"github.com/cloudposse/atmos/pkg/store"
12+
"github.com/cloudposse/atmos/pkg/store/providers"
1313
)
1414

1515
// TestMainHooksAndKeychainStoreIntegration proves end-to-end, with no cloud credentials and no
@@ -63,7 +63,7 @@ func TestMainHooksAndKeychainStoreIntegration(t *testing.T) {
6363

6464
// Round-trip: read the value back through a keychain store constructed with the same options.
6565
// This asserts the hook persisted the exact content, not merely that a deploy succeeded.
66-
s, err := store.NewKeychainStore(&store.KeychainStoreOptions{Backend: "file"})
66+
s, err := providers.NewKeychainStore(&providers.KeychainStoreOptions{Backend: "file"})
6767
require.NoError(t, err)
6868
got, err := s.Get("test", "component1", "random_id")
6969
require.NoError(t, err)

pkg/auth/providers/aws/saml_storage_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,10 @@ func TestSAMLProvider_BrowserSetupGatedOnDriverType(t *testing.T) {
461461

462462
func TestSAMLProvider_Authenticate_BrowserGateCreatesDir(t *testing.T) {
463463
// Verify the browser gate in Authenticate: when driver is "Browser",
464-
// the storage directory is created. Uses a non-download config so
465-
// saml2aws.NewSAMLClient is fast (no Playwright initialization).
464+
// the storage setup path creates the directory. Keep this focused on
465+
// setupBrowserAutomation rather than the full saml2aws browser runtime:
466+
// on Windows, Playwright can leave node.exe locked under t.TempDir and
467+
// make Go's automatic TempDir cleanup fail even after the test body passes.
466468
homeDir := t.TempDir()
467469
t.Setenv("HOME", homeDir)
468470
t.Setenv("USERPROFILE", homeDir)
@@ -476,9 +478,7 @@ func TestSAMLProvider_Authenticate_BrowserGateCreatesDir(t *testing.T) {
476478
RoleToAssumeFromAssertion: "arn:aws:iam::123456789012:role/test",
477479
}
478480

479-
// Authenticate fails downstream (no real IDP), but the browser gate
480-
// runs first and creates the storage directory.
481-
_, _ = p.Authenticate(context.TODO())
481+
require.NoError(t, p.setupBrowserAutomation())
482482

483483
saml2awsDir := filepath.Join(homeDir, ".aws", "saml2aws")
484484
info, err := os.Stat(saml2awsDir)

pkg/config/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/cloudposse/atmos/pkg/perf"
1616
"github.com/cloudposse/atmos/pkg/schema"
1717
"github.com/cloudposse/atmos/pkg/store"
18+
_ "github.com/cloudposse/atmos/pkg/store/providers" // Register the built-in store backends.
1819
"github.com/cloudposse/atmos/pkg/ui"
1920
u "github.com/cloudposse/atmos/pkg/utils"
2021
"github.com/cloudposse/atmos/pkg/version"

pkg/datafetcher/schema/atmos/config/1.0.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8974,7 +8974,8 @@
89748974
"type": "object"
89758975
},
89768976
"StoreRegistry": {
8977-
"type": "object"
8977+
"type": "object",
8978+
"description": "StoreRegistry is a map of store name to a live store implementation."
89788979
},
89798980
"SyntaxHighlighting": {
89808981
"properties": {

0 commit comments

Comments
 (0)