Hi friends, a number of Atmos Store implementation...
# atmos-dev
d
Hi friends, a number of Atmos Store implementation incorrectly add the store's prefix to calls to
!store.get
which the docs say is explicitly for fetching arbitrary, non-prefixed keys. It seems that only the Azure Key Vault store has this behavior, the rest add a prefix. I can put together a PR with fixes + test updates if this is in fact the correct behavior.
• Exact Key Matching: The key you provide must match exactly how it is stored in the backend, including any required prefix, path, or normalization specific to that store
a
@Dan Hansen thanks for pointing out the issue. If you see the issue (is it with AWS store), you can open a PR, or open an issue and describe the problem
d
g
@Andriy Knysh (Cloud Posse)
d
This PR was closed since it was mentioned in one of @Erik Osterman (Cloud Posse)'s PRs that got merged- could you reopen? I'll investigate the failing windows test in the next few days
a
sorry if it was closed, we'll reopen it, and I'll review it today
@Dan Hansen I reopened the PR The Windows tests are failing. Here's what you need to do to fix it (please update, the rest of the PR looks good and valid, thank you):
Copy code
Windows Test Failure Explanation

  The test failure is caused by cross-platform path handling in artifactory_store.go:310:

  repoPath := filepath.Join(s.repoName, filePath)

  Problem

  filepath.Join uses the OS-specific path separator:
  - Linux/macOS: / (forward slash)
  - Windows: \ (backslash)

  The test expects:
  params.Pattern == "test-repo/config/app-settings.json"

  But on Windows, filepath.Join("test-repo", "config/app-settings.json") produces:
  "test-repo\config/app-settings.json"

  This causes the mock matcher to fail because the pattern doesn't match.

  Solution

  The PR author should use path.Join instead of filepath.Join for URL/remote paths, or manually construct the path with /:

  // Option 1: Use path.Join (always uses forward slashes)
  import "path"
  repoPath := path.Join(s.repoName, filePath)

  // Option 2: Manual string concatenation
  repoPath := s.repoName + "/" + filePath
use
path.Join