Skip to content

refactor(store): move backends into pkg/store/providers subpackage - #2575

Merged
Andriy Knysh (aknysh) merged 47 commits into
mainfrom
osterman/store-providers-subpackage
Aug 2, 2026
Merged

refactor(store): move backends into pkg/store/providers subpackage#2575
Andriy Knysh (aknysh) merged 47 commits into
mainfrom
osterman/store-providers-subpackage

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Jun 5, 2026

Copy link
Copy Markdown
Member

what

  • Move the concrete store backend implementations (AWS SSM, Azure Key Vault, Google Secret Manager, Redis, Artifactory) out of pkg/store into a new pkg/store/providers subpackage, keeping pkg/store as a pure interface/type boundary (the Store interfaces, StoreConfig/StoresConfig/StoreRegistry types, auth-config types, error sentinels, and generated mocks).
  • Introduce a self-registering registry: pkg/store owns StoreRegistry, NewStoreRegistry, and a Register(type, factory) API; each backend registers its factory from an init(), so the type switch is replaced by a map lookup. pkg/config blank-imports pkg/store/providers so the built-in backends register at startup (database/sql driver pattern).
  • Update call sites and add a pkg/store/providers exclusion to the provider-agnostic-auth depguard rule so its cloud-SDK imports are permitted (matching pkg/auth/providers).

why

  • Isolates the cloud-SDK-heavy backend code from the store contract, mirroring the established pkg/auth/providers / pkg/secrets/providers layout and making pkg/store a clean type/interface package.
  • The registry pattern removes the awkward split where the factory lived under providers but was named after the StoreRegistry type it returned; pkg/store now owns both the registry type and its construction, and adding a backend is one self-contained file that registers itself.
  • No user-visible change: identical store types resolve, unknown types still return ErrStoreTypeNotFound, identity warnings are preserved. Builds clean, all affected tests pass, and golangci-lint --new-from-rev=origin/main reports zero issues.

references

  • N/A

Summary by CodeRabbit

  • New Features
    • Storage backends now use a consistent registration model, improving support for configured providers and aliases.
  • Bug Fixes
    • Improved handling of missing configuration, invalid values, authentication failures, access errors, and unavailable data.
  • Tests
    • Expanded coverage for provider validation, key behavior, error scenarios, and concurrent registry operations.
  • Documentation
    • Clarified storage registry configuration in the schema.
  • Chores
    • Improved CI reproducibility and license-report generation.

Move the concrete store backend implementations (AWS SSM, Azure Key Vault,
Google Secret Manager, Redis, Artifactory) and the NewStoreRegistry factory
into a new pkg/store/providers package, keeping pkg/store as a leaf that only
exposes the Store interfaces, config/registry types, auth-config types, and
error sentinels. The providers package imports pkg/store (never the reverse),
mirroring the pkg/auth/providers and pkg/secrets/providers pattern.

The shared unexported helpers used only by the moved code (getKey, parseOptions,
and the errFormat constants) move with it, so pkg/store's public surface is
unchanged. NewStoreRegistry is refactored into per-backend buildXStore helpers
to keep cognitive complexity within limits. pkg/config now calls
providers.NewStoreRegistry; pkg/schema continues to reference only the types in
pkg/store. A depguard exclusion for pkg/store/providers is added so the
cloud-SDK imports are permitted there, matching pkg/auth/providers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@atmos-pro

atmos-pro Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@osterman Erik Osterman (Cloud Posse) (osterman) added the no-release Do not create a new release (wait for additional code changes) label Jun 5, 2026
@github-actions github-actions Bot added the size/m Medium size PR label Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f8c9d0d9-3f62-4a12-8388-af58294ffe80

📥 Commits

Reviewing files that changed from the base of the PR and between fe6685b and 70c8d7c.

📒 Files selected for processing (5)
  • .github/workflows/test.yml
  • cmd/terraform/utils.go
  • pkg/config/utils.go
  • pkg/datafetcher/schema/atmos/config/1.0.json
  • scripts/generate-notice.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/config/utils.go
  • .github/workflows/test.yml

📝 Walkthrough

Walkthrough

The PR replaces switch-based store construction with registered provider factories. It moves store implementations to pkg/store/providers, standardizes interfaces and errors, updates tests, and changes CI and notice-generation scripts.

Changes

Store provider refactor

Layer / File(s) Summary
Factory registry and provider bootstrap
pkg/store/registry.go, pkg/store/store.go, pkg/store/providers/*, pkg/config/utils.go, .golangci.yml
Store creation now uses registered factories. Provider packages register factories during initialization. Shared key and option helpers move to providers.
Provider implementations
pkg/store/providers/artifactory_store.go, pkg/store/providers/redis_store.go, pkg/store/providers/aws_ssm_param_store.go, pkg/store/providers/azure_keyvault_store.go, pkg/store/providers/google_secret_manager_store.go
Providers now return store.Store, use shared sentinel errors, support shared identity resolver types, and register configuration factories.
Provider and registry tests
pkg/store/providers/*_test.go, pkg/store/registry_test.go, internal/exec/*store*_test.go, tests/store_artifactory_test.go
Tests use provider constructors and shared store types. Coverage includes validation, option parsing, identity errors, backend errors, factory behavior, and concurrent registry access.
CI and supporting tooling
.github/workflows/test.yml, scripts/generate-notice.sh, cmd/terraform/utils.go, pkg/datafetcher/schema/atmos/config/1.0.json
CI cache and integration-test settings change. Logging uses shared stack keys. The schema gains StoreRegistry metadata. Notice generation adds deterministic repository mappings.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.87% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: moving store backends into the pkg/store/providers subpackage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/store-providers-subpackage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
pkg/store/providers/redis_store.go (1)

65-68: ⚡ Quick win

Double-wrapping of store.ErrParseRedisURL error.

getRedisOptions (line 41) already wraps errors with store.ErrParseRedisURL. Wrapping again here creates a redundant chain like ErrParseRedisURL: ErrParseRedisURL: <cause>.

Consider returning the error directly since it's already properly wrapped:

Proposed fix
 	opts, err := getRedisOptions(&options)
 	if err != nil {
-		return nil, fmt.Errorf(errFormat, store.ErrParseRedisURL, err)
+		return nil, err
 	}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/store/providers/redis_store.go` around lines 65 - 68, The error returned
from getRedisOptions is already wrapped with store.ErrParseRedisURL, so remove
the redundant wrapping here: replace the fmt.Errorf(errFormat,
store.ErrParseRedisURL, err) return with a plain return nil, err (i.e., return
the err directly). Update the error handling around the call to getRedisOptions
(the vars opts and err) so you propagate err unchanged instead of re-wrapping
it.
pkg/store/providers/azure_keyvault_store.go (1)

77-92: ⚡ Quick win

Variable store shadows the imported package name.

The local variable store (line 77) shadows the imported store package. While it works here since no store.* references occur after this point in the function, it's a readability concern and could cause issues during future edits.

Consider renaming to s or kvStore:

Proposed fix
-	store := &AzureKeyVaultStore{
+	s := &AzureKeyVaultStore{
 		vaultURL:       options.VaultURL,
 		prefix:         prefix,
 		stackDelimiter: &stackDelimiter,
 		identityName:   identityName,
 	}

 	// If no identity is configured, initialize the client eagerly (backward compatible behavior).
 	if identityName == "" {
-		if err := store.initDefaultClient(); err != nil {
+		if err := s.initDefaultClient(); err != nil {
 			return nil, err
 		}
 	}

-	return store, nil
+	return s, nil
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/store/providers/azure_keyvault_store.go` around lines 77 - 92, The local
variable named `store` shadows the imported `store` package; rename the local
variable (e.g., to `s` or `kvStore`) where `AzureKeyVaultStore` is instantiated
so it no longer conflicts, update all references to that variable within the
function (including the conditional that calls `initDefaultClient` and the final
`return`), and ensure the type name `AzureKeyVaultStore` and method
`initDefaultClient` remain unchanged.
pkg/store/providers/google_secret_manager_store.go (1)

75-95: ⚡ Quick win

Variable store shadows the imported package name.

Same issue as Azure provider - the local variable store (line 75) shadows the imported store package, which can cause confusion.

Consider renaming to s or gsmStore:

Proposed fix
-	store := &GSMStore{
+	s := &GSMStore{
 		projectID:    options.ProjectID,
 		credentials:  options.Credentials,
 		identityName: identityName,
 	}

 	if options.Prefix != nil {
-		store.prefix = *options.Prefix
+		s.prefix = *options.Prefix
 	}

 	if options.StackDelimiter != nil {
-		store.stackDelimiter = options.StackDelimiter
+		s.stackDelimiter = options.StackDelimiter
 	} else {
 		defaultDelimiter := "-"
-		store.stackDelimiter = &defaultDelimiter
+		s.stackDelimiter = &defaultDelimiter
 	}

-	store.replication = createReplicationFromLocations(options.Locations)
+	s.replication = createReplicationFromLocations(options.Locations)

-	return store, nil
+	return s, nil
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/store/providers/google_secret_manager_store.go` around lines 75 - 95, The
local variable named "store" shadows the imported "store" package; rename the
local variable to something like "gsmStore" (or "s") where it's declared as
&GSMStore{...}, update all subsequent uses in this function (assigning prefix,
stackDelimiter, replication via
createReplicationFromLocations(options.Locations) and the final "return store,
nil") to use the new name, and return the renamed variable (e.g., "return
gsmStore, nil") so the package name is not shadowed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@NOTICE`:
- Around line 835-839: The NOTICE file was manually edited resulting in
"Unknown" URLs (e.g., the go4.org/netipx entries) and CI failures; undo manual
changes and regenerate the NOTICE using the project's generator: run
./scripts/generate-notice.sh to produce an updated NOTICE, verify the generated
content replaces the manual edits (search for the go4.org/netipx entries to
confirm), then commit the generated NOTICE; do not hand-edit NOTICE in the
future.

In `@pkg/store/providers/registry.go`:
- Around line 71-75: The parseOptions error handling in buildAzureKeyVaultStore
(and the analogous GSM builder) currently returns ad-hoc fmt.Errorf strings;
update these to wrap the parse error with the package-level sentinel errors used
elsewhere (e.g., return nil, fmt.Errorf("%w: %v",
store.ErrParseAzureKeyVaultOptions, err) in buildAzureKeyVaultStore and
similarly use store.ErrParseGCPSecretManagerOptions (or the existing GSM
sentinel) in the GSM/GCP builder) so callers can reliably use errors.Is; locate
parseOptions calls in buildAzureKeyVaultStore and the GSM builder and replace
the direct fmt.Errorf messages with wrapping using the appropriate
store.ErrParse* sentinel.

---

Nitpick comments:
In `@pkg/store/providers/azure_keyvault_store.go`:
- Around line 77-92: The local variable named `store` shadows the imported
`store` package; rename the local variable (e.g., to `s` or `kvStore`) where
`AzureKeyVaultStore` is instantiated so it no longer conflicts, update all
references to that variable within the function (including the conditional that
calls `initDefaultClient` and the final `return`), and ensure the type name
`AzureKeyVaultStore` and method `initDefaultClient` remain unchanged.

In `@pkg/store/providers/google_secret_manager_store.go`:
- Around line 75-95: The local variable named "store" shadows the imported
"store" package; rename the local variable to something like "gsmStore" (or "s")
where it's declared as &GSMStore{...}, update all subsequent uses in this
function (assigning prefix, stackDelimiter, replication via
createReplicationFromLocations(options.Locations) and the final "return store,
nil") to use the new name, and return the renamed variable (e.g., "return
gsmStore, nil") so the package name is not shadowed.

In `@pkg/store/providers/redis_store.go`:
- Around line 65-68: The error returned from getRedisOptions is already wrapped
with store.ErrParseRedisURL, so remove the redundant wrapping here: replace the
fmt.Errorf(errFormat, store.ErrParseRedisURL, err) return with a plain return
nil, err (i.e., return the err directly). Update the error handling around the
call to getRedisOptions (the vars opts and err) so you propagate err unchanged
instead of re-wrapping it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e3d8af25-6e61-4fef-915c-fcc924e9cd75

📥 Commits

Reviewing files that changed from the base of the PR and between 3c0b3e5 and 9929ffc.

📒 Files selected for processing (28)
  • .golangci.yml
  • NOTICE
  • internal/exec/template_funcs_store_test.go
  • internal/exec/yaml_func_store_get_test.go
  • internal/exec/yaml_func_store_test.go
  • pkg/config/utils.go
  • pkg/store/config.go
  • pkg/store/errors.go
  • pkg/store/providers/artifactory_store.go
  • pkg/store/providers/artifactory_store_noop_logger.go
  • pkg/store/providers/artifactory_store_noop_logger_test.go
  • pkg/store/providers/artifactory_store_test.go
  • pkg/store/providers/aws_ssm_param_store.go
  • pkg/store/providers/aws_ssm_param_store_test.go
  • pkg/store/providers/azure_keyvault_store.go
  • pkg/store/providers/azure_keyvault_store_test.go
  • pkg/store/providers/google_secret_manager_store.go
  • pkg/store/providers/google_secret_manager_store_test.go
  • pkg/store/providers/identity_test.go
  • pkg/store/providers/keys.go
  • pkg/store/providers/mock_reliability_test.go
  • pkg/store/providers/redis_store.go
  • pkg/store/providers/redis_store_test.go
  • pkg/store/providers/registry.go
  • pkg/store/providers/registry_test.go
  • pkg/store/registry.go
  • pkg/store/store.go
  • tests/store_artifactory_test.go
💤 Files with no reviewable changes (3)
  • pkg/store/errors.go
  • pkg/store/config.go
  • pkg/store/store.go

Comment thread NOTICE Outdated
Comment thread pkg/store/providers/registry.go Outdated
Move NewStoreRegistry back into pkg/store and have each backend register its
factory with the store package via store.Register from an init() function,
replacing the type switch with a map lookup. pkg/store now owns both the
StoreRegistry type and the build logic; pkg/store/providers holds only the
concrete backends, each self-contained (its constructor plus a small factory
adapter that parses options and warns on unsupported identity).

pkg/config blank-imports pkg/store/providers so the built-in backends register
at startup, mirroring the database/sql driver pattern. Behavior is unchanged:
the same store types resolve, unknown types still return ErrStoreTypeNotFound,
and the identity warnings are preserved. This addresses the confusion of having
two registry.go files where the one under providers was named after the type it
returns rather than what it does.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
pkg/store/registry.go (1)

45-47: ⚡ Quick win

Wrap factory failures with the configured store name/type.

pkg/config/utils.go propagates this error directly during bootstrap, so returning the raw provider error here makes multi-store misconfigurations harder to trace back to the failing entry.

Suggested fix
 		s, err := factory(name, storeConfig)
 		if err != nil {
-			return nil, err
+			return nil, fmt.Errorf("build store %q (%s): %w", name, storeConfig.Type, err)
 		}

As per coding guidelines, user-facing errors should include clear troubleshooting context, and this path is part of config bootstrapping.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/store/registry.go` around lines 45 - 47, The factory call error returned
from factory(name, storeConfig) should be wrapped with the configured store
context so bootstrap errors show which store entry failed; change the error
return to wrap err (e.g. using fmt.Errorf with %w) and include the store name
and storeConfig.Type (or other identifying fields from storeConfig) in the
message so callers get "store '<name>' (type='<type>') factory failed: <err>"
context instead of the raw provider error.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/store/providers/google_secret_manager_store.go`:
- Around line 440-444: Add a new sentinel error ErrParseGSMOptions in
pkg/store/errors.go and modify buildGSMStore to wrap parseOptions failures with
that sentinel; specifically, in buildGSMStore (function name) replace the
current return for parseOptions error with something like return nil,
fmt.Errorf("%w: %v", store.ErrParseGSMOptions, err) so the error contract
matches other providers while still including the original parse error text.

In `@pkg/store/registry.go`:
- Around line 14-16: Add a sync.RWMutex to guard the global storeFactories map
and use it in Register and NewStoreRegistry: introduce a package-level var (e.g.
storeFactoriesMu sync.RWMutex), acquire storeFactoriesMu.Lock() when mutating
the map inside Register (and defer Unlock), and acquire storeFactoriesMu.RLock()
when reading the map inside NewStoreRegistry (and defer RUnlock) to prevent
concurrent map read/write panics; keep the rest of the Register and
NewStoreRegistry logic unchanged.

---

Nitpick comments:
In `@pkg/store/registry.go`:
- Around line 45-47: The factory call error returned from factory(name,
storeConfig) should be wrapped with the configured store context so bootstrap
errors show which store entry failed; change the error return to wrap err (e.g.
using fmt.Errorf with %w) and include the store name and storeConfig.Type (or
other identifying fields from storeConfig) in the message so callers get "store
'<name>' (type='<type>') factory failed: <err>" context instead of the raw
provider error.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1e7aba44-0a4c-4c2f-8b67-36123597339d

📥 Commits

Reviewing files that changed from the base of the PR and between 9929ffc and 2bb65fb.

📒 Files selected for processing (10)
  • pkg/config/utils.go
  • pkg/store/providers/artifactory_store.go
  • pkg/store/providers/aws_ssm_param_store.go
  • pkg/store/providers/azure_keyvault_store.go
  • pkg/store/providers/google_secret_manager_store.go
  • pkg/store/providers/providers.go
  • pkg/store/providers/redis_store.go
  • pkg/store/providers/registry_test.go
  • pkg/store/registry.go
  • pkg/store/store.go
💤 Files with no reviewable changes (1)
  • pkg/store/store.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/store/providers/providers.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/store/providers/registry_test.go
  • pkg/store/providers/azure_keyvault_store.go
  • pkg/store/providers/redis_store.go

Comment thread pkg/store/providers/google_secret_manager_store.go
Comment thread pkg/store/registry.go Outdated
…ry with mutex

Address CodeRabbit review on the store providers refactor:

- Wrap GSM and Azure Key Vault option-parse failures with new
  store.ErrParseGSMOptions / store.ErrParseAzureKeyVaultOptions sentinels so
  errors.Is works provider-agnostically, matching SSM/Artifactory/Redis.
- Guard the global storeFactories map with sync.RWMutex; the exported Register
  can race with NewStoreRegistry and trip Go's concurrent map detector.
- Add a -race concurrency test exercising Register vs NewStoreRegistry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added size/l Large size PR and removed size/m Medium size PR labels Jun 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/store/registry_test.go`:
- Around line 13-42: The test TestRegisterConcurrentWithNewStoreRegistry mutates
the global storeFactories via Register(...) but doesn't clean up, polluting
later tests; add a Reset() test helper in pkg/store/registry.go that acquires
storeFactoriesMu and reinitializes storeFactories (for tests only), then call
t.Cleanup(Reset) at the start of the test (or register Cleanup after creating
the goroutines) so registered types are cleared; if Reset already exists, simply
invoke t.Cleanup(Reset) in TestRegisterConcurrentWithNewStoreRegistry to ensure
isolation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7b0c8448-b52e-44a0-831c-ec5cdf8d5711

📥 Commits

Reviewing files that changed from the base of the PR and between 2bb65fb and cf0098e.

📒 Files selected for processing (5)
  • pkg/store/errors.go
  • pkg/store/providers/azure_keyvault_store.go
  • pkg/store/providers/google_secret_manager_store.go
  • pkg/store/registry.go
  • pkg/store/registry_test.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/store/errors.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/store/registry.go
  • pkg/store/providers/google_secret_manager_store.go
  • pkg/store/providers/azure_keyvault_store.go

Comment thread pkg/store/registry_test.go
Add a Reset() helper to pkg/store/registry.go (test-only, mutex-guarded)
that reinitializes storeFactories, mirroring the canonical registry pattern
(cmd/internal/registry.go). Call t.Cleanup(Reset) in
TestRegisterConcurrentWithNewStoreRegistry so its 50 throwaway types no
longer leak into the global storeFactories map.

Addresses CodeRabbit review on PR #2575.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 6, 2026
@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.88808% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.19%. Comparing base (f35e9f5) to head (ad074db).

Files with missing lines Patch % Lines
pkg/store/providers/aws_secrets_manager_store.go 76.47% 7 Missing and 1 partial ⚠️
pkg/store/providers/artifactory_store.go 80.55% 7 Missing ⚠️
pkg/store/providers/azure_keyvault_store.go 86.53% 7 Missing ⚠️
pkg/store/providers/hashicorp_vault_store.go 81.08% 6 Missing and 1 partial ⚠️
pkg/store/providers/keychain_store.go 61.11% 6 Missing and 1 partial ⚠️
pkg/store/providers/aws_ssm_param_store.go 87.50% 5 Missing ⚠️
pkg/store/providers/google_secret_manager_store.go 89.13% 5 Missing ⚠️
pkg/store/providers/onepassword_store.go 81.48% 4 Missing and 1 partial ⚠️
pkg/store/providers/github_actions_store.go 83.33% 2 Missing and 1 partial ⚠️
cmd/terraform/utils.go 75.00% 0 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2575      +/-   ##
==========================================
+ Coverage   82.11%   82.19%   +0.08%     
==========================================
  Files        1802     1802              
  Lines      175175   175214      +39     
==========================================
+ Hits       143842   144020     +178     
+ Misses      23565    23484      -81     
+ Partials     7768     7710      -58     
Flag Coverage Δ
unittests 82.19% <85.88%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/config/utils.go 88.29% <ø> (ø)
pkg/git/git.go 76.44% <ø> (ø)
...g/store/providers/artifactory_store_noop_logger.go 100.00% <ø> (ø)
pkg/store/providers/keys.go 100.00% <100.00%> (ø)
pkg/store/providers/options.go 100.00% <ø> (ø)
pkg/store/providers/providers.go 100.00% <100.00%> (ø)
pkg/store/registry.go 92.95% <100.00%> (+14.26%) ⬆️
cmd/terraform/utils.go 70.25% <75.00%> (ø)
pkg/store/providers/github_actions_client.go 95.00% <87.50%> (ø)
pkg/store/providers/onepassword_client.go 86.43% <87.50%> (ø)
... and 10 more

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The providers subpackage move re-triggered Codecov on the moved files as
new code, dropping patch coverage to 61.57% (below the 80% target).

Add targeted unit tests for the cheapest gaps using the existing mock
infrastructure:
- artifactory GetKey (0% -> 86%) via MockArtifactoryClient.DownloadFiles
- redis getRedisOptions (50% -> 100%) and RedisClient (0% -> 100%)
- gsm createSecret (45% -> 100%) status-code branches (AlreadyExists,
  NotFound, PermissionDenied, generic)

Raises the providers package coverage to 85.1%.

Addresses Codecov report on PR #2575.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
pkg/store/providers/artifactory_store_test.go (1)

3-17: ⚡ Quick win

Reorder imports to keep Atmos packages in the final group.

At Line 10-11, Atmos imports are mixed into the third-party section.

Proposed import block reorder
 import (
 	"fmt"
 	"os"
 	"path/filepath"
 	"testing"
 
 	"github.com/aws/aws-sdk-go-v2/aws"
-	log "github.com/cloudposse/atmos/pkg/logger"
-	storepkg "github.com/cloudposse/atmos/pkg/store"
 	"github.com/jfrog/jfrog-client-go/artifactory"
 	"github.com/jfrog/jfrog-client-go/artifactory/services"
 	al "github.com/jfrog/jfrog-client-go/utils/log"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/mock"
+
+	log "github.com/cloudposse/atmos/pkg/logger"
+	storepkg "github.com/cloudposse/atmos/pkg/store"
 )

As per coding guidelines, imports must be grouped as stdlib, then third-party, then Atmos packages.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/store/providers/artifactory_store_test.go` around lines 3 - 17, The
import block mixes Atmos packages into the third-party group; move the Atmos
imports (the imported aliases log and storepkg referencing
github.com/cloudposse/atmos/pkg/logger and
github.com/cloudposse/atmos/pkg/store) into the final import group so imports
are ordered: stdlib first (fmt, os, filepath, testing), third-party next (aws,
jfrog, testify, mock, al), and Atmos packages last; update the import section in
pkg/store/providers/artifactory_store_test.go accordingly.

Source: Coding guidelines

pkg/store/providers/redis_store_test.go (1)

3-14: ⚡ Quick win

Fix import group ordering at Line 10.

storepkg (Atmos import) is grouped before third-party imports. Keep stdlib → third-party → Atmos groups with blank lines.

Proposed import block reorder
 import (
 	"context"
 	"encoding/json"
 	"fmt"
 	"testing"
 	"time"
 
-	storepkg "github.com/cloudposse/atmos/pkg/store"
 	"github.com/redis/go-redis/v9"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/mock"
+
+	storepkg "github.com/cloudposse/atmos/pkg/store"
 )

As per coding guidelines, “Organize imports in three groups separated by blank lines, sorted alphabetically: (1) Go stdlib, (2) 3rd-party, (3) Atmos packages.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/store/providers/redis_store_test.go` around lines 3 - 14, Reorder the
import block so it follows stdlib → third-party → Atmos grouping: move storepkg
("github.com/cloudposse/atmos/pkg/store") into the third group after the blank
line following third-party imports (which include
"github.com/redis/go-redis/v9", "github.com/stretchr/testify/assert", and
"github.com/stretchr/testify/mock"), and ensure each group is alphabetized and
separated by a blank line; update the import block that currently contains
storepkg to match this ordering.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/store/providers/redis_store_test.go`:
- Around line 348-360: The env-fallback branch in getRedisOptions currently
returns raw redis.ParseURL errors which prevents errors.Is checks against the
sentinel ErrParseRedisURL from matching; update the ATMOS_REDIS_URL handling in
getRedisOptions (pkg/store/providers/redis_store.go) so that when
redis.ParseURL(envURL) returns an error you wrap it with the sentinel (e.g.
return nil, fmt.Errorf("%w: %v", storepkg.ErrParseRedisURL, err) or similar) and
return the wrapped error, and add a unit test in redis_store_test.go that sets
ATMOS_REDIS_URL to an invalid URL and asserts errors.Is(err,
storepkg.ErrParseRedisURL) to cover this branch.

---

Nitpick comments:
In `@pkg/store/providers/artifactory_store_test.go`:
- Around line 3-17: The import block mixes Atmos packages into the third-party
group; move the Atmos imports (the imported aliases log and storepkg referencing
github.com/cloudposse/atmos/pkg/logger and
github.com/cloudposse/atmos/pkg/store) into the final import group so imports
are ordered: stdlib first (fmt, os, filepath, testing), third-party next (aws,
jfrog, testify, mock, al), and Atmos packages last; update the import section in
pkg/store/providers/artifactory_store_test.go accordingly.

In `@pkg/store/providers/redis_store_test.go`:
- Around line 3-14: Reorder the import block so it follows stdlib → third-party
→ Atmos grouping: move storepkg ("github.com/cloudposse/atmos/pkg/store") into
the third group after the blank line following third-party imports (which
include "github.com/redis/go-redis/v9", "github.com/stretchr/testify/assert",
and "github.com/stretchr/testify/mock"), and ensure each group is alphabetized
and separated by a blank line; update the import block that currently contains
storepkg to match this ordering.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 565d89ce-a44b-4484-b875-ce7055aa5f23

📥 Commits

Reviewing files that changed from the base of the PR and between f88d7b9 and 9d959c6.

📒 Files selected for processing (3)
  • pkg/store/providers/artifactory_store_test.go
  • pkg/store/providers/google_secret_manager_store_test.go
  • pkg/store/providers/redis_store_test.go

Comment thread pkg/store/providers/redis_store_test.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/store/providers/artifactory_store_test.go (1)

3-17: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Reorganize imports into three groups per coding guidelines.

When adding the storepkg import, the import block should follow the three-group structure: stdlib, 3rd-party (NOT cloudposse/atmos), and Atmos packages, each separated by blank lines. Currently, Atmos imports (lines 10–11) are interleaved with 3rd-party imports.

♻️ Proposed reorganization
 import (
 	"fmt"
 	"os"
 	"path/filepath"
 	"testing"
 
 	"github.com/aws/aws-sdk-go-v2/aws"
-	log "github.com/cloudposse/atmos/pkg/logger"
-	storepkg "github.com/cloudposse/atmos/pkg/store"
 	"github.com/jfrog/jfrog-client-go/artifactory"
 	"github.com/jfrog/jfrog-client-go/artifactory/services"
 	al "github.com/jfrog/jfrog-client-go/utils/log"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/mock"
+
+	log "github.com/cloudposse/atmos/pkg/logger"
+	storepkg "github.com/cloudposse/atmos/pkg/store"
 )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/store/providers/artifactory_store_test.go` around lines 3 - 17, Reorder
the import block into three groups (stdlib, third-party, then Atmos packages)
separated by blank lines: keep "fmt", "os", "path/filepath", "testing" in the
stdlib group; move "github.com/aws/aws-sdk-go-v2/aws",
"github.com/jfrog/jfrog-client-go/artifactory",
"github.com/jfrog/jfrog-client-go/artifactory/services",
"github.com/jfrog/jfrog-client-go/utils/log" (al),
"github.com/stretchr/testify/assert", and "github.com/stretchr/testify/mock"
into the third-party group; and place the Atmos imports "log
\"github.com/cloudposse/atmos/pkg/logger\"" and "storepkg
\"github.com/cloudposse/atmos/pkg/store\"" together in the final group,
preserving aliases (log, storepkg, al) and existing import names.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pkg/store/providers/artifactory_store_test.go`:
- Around line 3-17: Reorder the import block into three groups (stdlib,
third-party, then Atmos packages) separated by blank lines: keep "fmt", "os",
"path/filepath", "testing" in the stdlib group; move
"github.com/aws/aws-sdk-go-v2/aws",
"github.com/jfrog/jfrog-client-go/artifactory",
"github.com/jfrog/jfrog-client-go/artifactory/services",
"github.com/jfrog/jfrog-client-go/utils/log" (al),
"github.com/stretchr/testify/assert", and "github.com/stretchr/testify/mock"
into the third-party group; and place the Atmos imports "log
\"github.com/cloudposse/atmos/pkg/logger\"" and "storepkg
\"github.com/cloudposse/atmos/pkg/store\"" together in the final group,
preserving aliases (log, storepkg, al) and existing import names.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b6804c39-8ba7-4019-a6aa-3f4a6ac8d73c

📥 Commits

Reviewing files that changed from the base of the PR and between f88d7b9 and 9d959c6.

📒 Files selected for processing (3)
  • pkg/store/providers/artifactory_store_test.go
  • pkg/store/providers/google_secret_manager_store_test.go
  • pkg/store/providers/redis_store_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/store/providers/redis_store_test.go
  • pkg/store/providers/google_secret_manager_store_test.go

Raise patch coverage on the new pkg/store/providers subpackage and the store
registry (Codecov reported 65.82% patch coverage on the moved files).

Adds focused unit tests (no provider logic changes) reusing existing mockable
client interfaces and helpers: provider validation/error branches, private
helpers (getAccessKey env fallbacks, processDownloadedFile, assumeRole),
factory parseOptions error paths, registry helpers (Register duplicate-panic,
Reset, NewStoreRegistry unknown-type + factory-error), and noopLogger.Verbose.

Providers package self-coverage 85.2% -> 94.4%; registry.go funcs now 100%.

Also extract recurring string literals in cmd/terraform/utils.go into named
constants to satisfy revive (add-constant), which the pre-commit hook flags.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mergify

mergify Bot commented Jun 6, 2026

Copy link
Copy Markdown

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label Jun 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cmd/terraform/utils.go (1)

704-704: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Complete the constant extraction pattern for stack.

Line 695 uses logKeyComponent constant, but this line still uses the hardcoded literal "stack". Add logKeyStack = "stack" to the const block (lines 33-39) and use it here for consistency with the rest of this refactor.

♻️ Suggested fix

Add to the const block:

 const (
 	logKeyComponent           = "component"
 	logKeyError               = "error"
+	logKeyStack               = "stack"
 	flagCI                    = "ci"

Then update line 704:

 	stack, err := promptForStack(cmd, info.ComponentFromArg)
-	if err = handlePromptError(err, "stack"); err != nil {
+	if err = handlePromptError(err, logKeyStack); err != nil {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/terraform/utils.go` at line 704, Add a new constant logKeyStack = "stack"
to the existing const block alongside logKeyComponent, then replace the
hardcoded literal "stack" in the handlePromptError call with the new logKeyStack
constant (update the call at handlePromptError(err, "stack") to
handlePromptError(err, logKeyStack)) so the file uses the same constant
extraction pattern as logKeyComponent.
🧹 Nitpick comments (1)
cmd/terraform/utils.go (1)

34-35: ⚡ Quick win

Consider centralizing log key constants if usage expands.

logKeyComponent and (the suggested) logKeyStack duplicate constants in pkg/ci/plugins/terraform/comments.go. For now the duplication is minimal, but if more log keys emerge or these are used in additional packages, centralizing them (perhaps in pkg/logger or a new pkg/ci/constants) would prevent divergence.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/terraform/utils.go` around lines 34 - 35, The two log key constants
logKeyComponent and logKeyError (and the related logKeyStack found in
pkg/ci/plugins/terraform/comments.go) should be centralized into a single shared
constants location (e.g. add a new constants file in pkg/logger or
pkg/ci/constants), export them (e.g. Component, Error, Stack) and replace the
local definitions in cmd/terraform/utils.go and
pkg/ci/plugins/terraform/comments.go to import and use the shared constants;
update any references to the old local names to the new exported identifiers and
run a quick build to ensure no missing imports.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/store/providers/aws_ssm_param_store_test.go`:
- Around line 994-1011: The test TestNewSSMStore_WithRolesAndDelimiter is
nondeterministic because it returns on NewSSMStore error, causing the test to
pass whether creation succeeds or fails; update the test so it deterministically
exercises field initialization: either guard the test with an environment
precondition (call tests.RequireAWSProfile or t.Skip when credentials are
absent) before calling NewSSMStore, or refactor to inject a mocked AWS SSM
client (use your mockgen-based mock and pass it into NewSSMStore or its
constructor path) and assert stackDelimiter/readRoleArn/writeRoleArn on the
resulting *SSMStore instead of returning on error. Ensure references to
NewSSMStore and SSMStore in the test are updated accordingly.

---

Outside diff comments:
In `@cmd/terraform/utils.go`:
- Line 704: Add a new constant logKeyStack = "stack" to the existing const block
alongside logKeyComponent, then replace the hardcoded literal "stack" in the
handlePromptError call with the new logKeyStack constant (update the call at
handlePromptError(err, "stack") to handlePromptError(err, logKeyStack)) so the
file uses the same constant extraction pattern as logKeyComponent.

---

Nitpick comments:
In `@cmd/terraform/utils.go`:
- Around line 34-35: The two log key constants logKeyComponent and logKeyError
(and the related logKeyStack found in pkg/ci/plugins/terraform/comments.go)
should be centralized into a single shared constants location (e.g. add a new
constants file in pkg/logger or pkg/ci/constants), export them (e.g. Component,
Error, Stack) and replace the local definitions in cmd/terraform/utils.go and
pkg/ci/plugins/terraform/comments.go to import and use the shared constants;
update any references to the old local names to the new exported identifiers and
run a quick build to ensure no missing imports.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d8140e2d-ec54-4b4b-a5ea-30bf96ea173f

📥 Commits

Reviewing files that changed from the base of the PR and between 9d959c6 and a50b1a6.

📒 Files selected for processing (9)
  • cmd/terraform/utils.go
  • pkg/store/providers/artifactory_store_noop_logger_test.go
  • pkg/store/providers/artifactory_store_test.go
  • pkg/store/providers/aws_ssm_param_store_test.go
  • pkg/store/providers/azure_keyvault_store_test.go
  • pkg/store/providers/google_secret_manager_store_test.go
  • pkg/store/providers/redis_store.go
  • pkg/store/providers/redis_store_test.go
  • pkg/store/registry_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/store/providers/artifactory_store_noop_logger_test.go
  • pkg/store/providers/redis_store.go

Comment thread pkg/store/providers/aws_ssm_param_store_test.go
…ers-subpackage

# Conflicts:
#	cmd/terraform/utils.go
@mergify mergify Bot removed the conflict This PR has conflicts label Jun 6, 2026
The Acceptance Tests (linux) job failed at the Codecov upload step, not in
any test — all Go tests passed. The codecov-action could not verify the GPG
signature of its downloaded CLI:

    gpg: Can't check signature: No public key
    ==> Could not verify signature. Please contact Codecov if problem continues
    Exiting...
    ##[error]Process completed with exit code 1.

Codecov's GPG keyserver is intermittently unreachable, so the integrity check
fails and, with fail_ci_if_error: true, takes the whole job down despite a
green test suite. Set skip_validation: true to bypass the GPG integrity check
(the CLI is still fetched over HTTPS from cli.codecov.io). fail_ci_if_error
stays true so genuine upload failures still surface.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mergify mergify Bot removed the conflict This PR has conflicts label Jul 14, 2026
@mergify

mergify Bot commented Jul 17, 2026

Copy link
Copy Markdown

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label Jul 17, 2026
…ers-subpackage

# Conflicts:
#	pkg/cache/filelock_unix.go
@mergify mergify Bot removed the conflict This PR has conflicts label Jul 17, 2026
@mergify

mergify Bot commented Jul 25, 2026

Copy link
Copy Markdown

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label Jul 25, 2026
…ers-subpackage

# Conflicts:
#	pkg/store/providers/aws_ssm_param_store.go
Merging main pulled in struct/doc-comment changes that left the embedded
atmos.yaml JSON Schema out of sync with the Go config structs. Regenerated
via `go generate ./pkg/config/schema` per TestEmbeddedSchemaIsCurrent.
@mergify mergify Bot removed the conflict This PR has conflicts label Jul 30, 2026
The Validation (affected) job's editorconfig check runs against files
touched by this branch, and both scripts used space indentation while
.editorconfig declares `indent_style = tab` for *.sh. Convert their
code indentation to tabs to match; the one heredoc with literal
2-space-indented output content (the NOTICE footer template) is
wrapped in editorconfig-checker-disable/-enable so its generated
output stays byte-identical.

Editing .editorconfig itself was considered instead, but it triggers
`atmos validate editorconfig --affected` to fall back to validating
every tracked file (by design, since a rule change can affect any
file), which surfaces thousands of pre-existing violations unrelated
to this branch.
Adds logKeyStack alongside the existing logKeyComponent and replaces
hardcoded "stack" log-key/prompt-name literals with it.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/test.yml (2)

300-309: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Restore Playwright download coverage in CI.

TestPlaywrightDriverDownload_Integration and TestPlaywrightDriverDownload_WithSAML2AWS skip unless RUN_PLAYWRIGHT_INTEGRATION=1, and no workflow sets this variable. Re-add it with a short comment if the heavy Playwright download integration should run in CI.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test.yml around lines 300 - 309, Update the Linux
acceptance-test step identified by “Acceptance tests with coverage” to set
RUN_PLAYWRIGHT_INTEGRATION=1 in its env block, alongside the existing CI
variables, and add a brief comment documenting that it enables Playwright
download integration coverage.

1024-1027: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Add cache: false to this setup-go step for consistency.

Every other actions/setup-go invocation in this file (lines 100-106, 257-264, 519-522, 696-698) sets cache: false to avoid restoring or saving mutable cache entries from PR-controlled keys. This step in the container-step job omits it, so it keeps setup-go's default caching behavior enabled and reintroduces the same cache-poisoning exposure the rest of the file avoids.

🔒 Proposed fix to align this step with the rest of the file
       - name: Set up Go for the Buildx cache integration test
         uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
         with:
           go-version-file: "go.mod"
+          cache: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test.yml around lines 1024 - 1027, Update the “Set up Go
for the Buildx cache integration test” setup-go step to set cache: false,
matching the other actions/setup-go invocations in the workflow while preserving
its existing Go version configuration.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/test.yml:
- Around line 300-309: Update the Linux acceptance-test step identified by
“Acceptance tests with coverage” to set RUN_PLAYWRIGHT_INTEGRATION=1 in its env
block, alongside the existing CI variables, and add a brief comment documenting
that it enables Playwright download integration coverage.
- Around line 1024-1027: Update the “Set up Go for the Buildx cache integration
test” setup-go step to set cache: false, matching the other actions/setup-go
invocations in the workflow while preserving its existing Go version
configuration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c3cfc1b-5db3-40c7-af2a-ab00c9de2f82

📥 Commits

Reviewing files that changed from the base of the PR and between 5c921f9 and fe6685b.

📒 Files selected for processing (2)
  • .github/workflows/test.yml
  • .golangci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .golangci.yml

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 31, 2026
@mergify

mergify Bot commented Jul 31, 2026

Copy link
Copy Markdown

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

@mergify mergify Bot added the conflict This PR has conflicts label Jul 31, 2026
…ers-subpackage

# Conflicts:
#	scripts/generate-notice.sh
@aknysh
Andriy Knysh (aknysh) merged commit 9343caf into main Aug 2, 2026
87 checks passed
@aknysh
Andriy Knysh (aknysh) deleted the osterman/store-providers-subpackage branch August 2, 2026 15:51
@atmos-pro

atmos-pro Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-release Do not create a new release (wait for additional code changes) size/l Large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants