Repository navigation
feat(remote): support wildcards in remote values/secrets file selectors - #2787
Conversation
|
@hoppla20 DCO issue. |
|
Oh sorry, I will amend it |
5034755 to
307cc5b
Compare
yxxhero
left a comment
There was a problem hiding this comment.
Thanks for this PR! I did a deep review (read all changed files plus their consumers, ran go build, go vet, go test ./pkg/remote/ ./pkg/state/ — all green, and golangci-lint shows no new findings).
Overall
High-quality change. The layering is clean: detection (remote.HasGlobPattern) → validation (Remote.Fetch rejects shapes that can never expand) → expansion (Storage.resolveFile globs the fetched cache dir). The tricky bits — ? being the query-string delimiter, [ legitimately appearing in IPv6 hosts and [$GITHUB_ORG]-style placeholders, literal-file-before-glob — are all documented with clear rationale in comments.
What I particularly like
- Cache design: the cache key derives from scheme/host/dir/query only, so
dir/*.yamlanddir/a.yamlshare one clone of the repo.TestRemote_Fetch_Wildcard's cache-hit case locks this in. - Consistency with local globs: same engine (
fs.Glob→filepath.Glob/filepath.Match), same sort order, and theFileExistsAtfilter keeps the same "regular files only" contract (Mode().IsRegular()excludes directory matches), matchingExpandPaths. - Precise rejection matrix in
Fetch: plain http(s)/s3 (single object), non-archive forceds3::, and no explicit@selector each get an actionable error message; thes3::archive + explicit-selector exception (stripSubdirSelector+ decompressor branch) checks out. - Backwards compatible: before this PR a wildcard selector always ended at
values file matching ... does not exist(or a handler skip); now a single match works and a multi-match fails with a clearer message. - Good test hygiene:
TestStorage_resolveFile_RemoteGlobcovers sort order, non-recursiveness, extension filtering, and the missing-file-handler matrix hermetically; the network test is pinned to a tag, consistent with the existing suite. case fetchedFilePath == ""correctly preserves theignoreMissingGitBranchbehavior (empty result falls through to the missing-file handler), matching the pre-PRFileExistsAt("") == falsebehavior.
Findings
Inline below. Summary of the non-nit ones:
- Docs: a raw
?in the selector can never work (it starts the URL query string, silently dropping?ref=...); only%3Fdoes. Worth a caveat in the limitations list. - Scope: the feature is fully functional only for environment
values:/secrets:. Four release-path consumers still hard-error onlen(paths) > 1(state.gogenerateTemporaryReleaseValuesFilesCore,generateSecretValuesFiles,resolveReleaseValues,LoadYAMLForEmbedding), whilecreate.goloadEnvValuesandenvvals_loader.goiterate all matches. Since the PR title says "values/secrets" broadly and the docs only cover environments, a one-line note about the release-scope restriction (or a follow-up issue) would set the right expectations. - Behavior corner: an unresolvable selector containing an unclosed
[now surfacesfilepath.ErrBadPatternas a hard error even undermissingFileHandler: Info/Warn, where it used to be treated as missing. Probably fine, but worth a conscious decision.
Minor: the commit message says "Fixed an existing err-shadowing hazard in the same code path" — fetchedFilePath, err := r.Fetch(...) still shadows the outer err; the restructure actually introduced a distinct globErr for the new Glob call. No functional impact (the outer err only matters for the local-path branch), just noting for the record.
Happy to see this merged once the docs nits are addressed — none of the findings are blockers from my side.
| // set matches filepath.Match's, which also backs local values-file globbing | ||
| // (Storage.ExpandPaths), so remote and local glob syntax stay identical. | ||
| func hasGlobMeta(p string) bool { | ||
| return strings.ContainsAny(p, `*?[`) |
There was a problem hiding this comment.
Nit: the ? in ContainsAny can never trigger here for u.File — url.Parse splits the query at the first ?, so HasGlobPattern's hasGlobMeta(u.File) effectively only ever sees */[. That makes this subtly different from Fetch's strings.Contains(u.File, "*"), which is intentional (per the comment in Fetch, only * is treated as an unambiguous rejection signal, since [ can appear in literal filenames).
Keeping ? for symmetry with filepath.Match's metachar set is fine as belt-and-braces (e.g. if a %3F-decoded selector ever reaches this path — which it does, and then it does matter!). Maybe just add a word here noting ? only arrives via percent-encoded selectors, so future readers don't puzzle over the asymmetry.
| } | ||
| } | ||
|
|
||
| func TestRemote_Fetch_WildcardUnsupported(t *testing.T) { |
There was a problem hiding this comment.
Nice rejection matrix. One gap: there's no test for the allowed wildcard + s3:: archive shape (the decompressorForFile(filepath.Base(u.Dir)) != nil exception). A hermetic sibling case — e.g. s3::https://bucket.s3.us-east-2.amazonaws.com/dir/app.tar.gz@*.yaml asserting that Fetch proceeds and the S3 getter is invoked — would lock in that exception so a future refactor of the validation doesn't silently break it (the same way the four cases above lock in the rejections).
…e#2787) Addresses review comments from @yxxhero on helmfile#2787: - pkg/state/storage.go: an unclosed "[" in a remote file selector (a legal filename character, e.g. a literal "values-[foo.yaml" that doesn't exist) made filepath.Glob return ErrBadPattern, which resolveFile then surfaced as an unconditional hard error, even under missingFileHandler: Info/Warn/Debug. Before wildcard support, that same selector was only ever checked with FileExistsAt and simply treated as missing. Restore that behavior: a filepath.ErrBadPattern from Glob is now treated as "no matches" and falls through to the existing missingFileHandler-driven handling, instead of bypassing it. - pkg/remote/remote.go: clarify in hasGlobMeta/HasGlobPattern's doc comments that a raw "?" can never reach Source.File (url.Parse splits the query string at the first unescaped "?"); "?" is only ever seen here when the original selector percent-encoded it as "%3F". No behavior change. - docs/environments.md: document that a "?" wildcard must be percent-encoded as "%3F" to survive as part of the file selector (verified empirically: a raw "?" truncates the file selector and silently swallows "?ref=..." into the query string instead). Also document that release-level values/secrets support a single-match wildcard but still reject a multi-match one with the pre-existing "not supported yet" error, matching local glob behavior there. - pkg/remote/remote_test.go: add the missing hermetic test for the one s3:: shape a wildcard IS allowed for (an archive, via the decompressorForFile exception), complementing the existing "unsupported shapes" test. - pkg/state/storage_test.go: add hermetic cases locking in the corrected unclosed-bracket behavior under both Info and Error handlers. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MWTgomn3KqbXahtWAmmf77
Extend git-getter style remote references (git::, s3::, https://, ...) used in release and environment values/secrets to support glob patterns in the file selector, e.g.: git::https://github.com/org/repo.git@config/*.yaml?ref=main Remote.Fetch already downloads the whole repository/directory and joins the "@<file>" selector onto it verbatim, so a wildcard selector already survives untouched; the only missing piece was that Storage.resolveFile checked the result with FileExistsAt instead of expanding it as a glob. - pkg/remote/remote.go: add HasGlobPattern to detect a wildcard in the file selector (checking only the selector, not the raw URL, so "?ref=main" and IPv6/placeholder brackets elsewhere are not mistaken for wildcards). Reject wildcards in Fetch for getter shapes that can never expand one: plain http(s)/s3 (single object), non-archive forced s3:: (single object), and any getter used without an explicit "@" selector (Dir/File cannot be reliably split from the pattern otherwise). - pkg/state/storage.go: resolveFile now globs the fetched cache path with the same st.fs.Glob/sort.Strings used for local values-file globs when the selector is a pattern, filtering out directory matches. A literal, existing path is still resolved directly. Fixed an existing err-shadowing hazard in the same code path while restructuring it. - docs/environments.md: document the new wildcard support, its syntax (filepath.Match, no recursive **), and its getter/selector requirements. - Tests: new cases in pkg/remote/remote_test.go (glob detection, Fetch wildcard expansion and cache-key sharing, rejected getter shapes) and pkg/state/storage_test.go (a real end-to-end wildcard fetch against a pinned upstream tag, plus a hermetic fan-out/sorting/missing-file test with no network access). Release values/secrets keep their existing "glob patterns ... not supported yet" restriction for multi-file matches (pkg/state/state.go), unchanged by this commit and applying equally to local and remote globs. helmfiles: entries are out of scope. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Vincent Cui <[email protected]>
…601) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [aqua:helmfile/helmfile](https://github.com/helmfile/helmfile) | tools | minor | `1.7.4` → `1.8.0` | --- ### Release Notes <details> <summary>helmfile/helmfile (aqua:helmfile/helmfile)</summary> ### [`v1.8.0`](https://github.com/helmfile/helmfile/releases/tag/v1.8.0) [Compare Source](helmfile/helmfile@v1.7.4...v1.8.0) #### What's Changed - build(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2749](helmfile/helmfile#2749) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.36 to 1.32.37 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2750](helmfile/helmfile#2750) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.1 to 1.107.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2751](helmfile/helmfile#2751) - build(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2752](helmfile/helmfile#2752) - docs: fix broken star history chart by [@​Dessalines39394](https://github.com/Dessalines39394) in [#​2742](helmfile/helmfile#2742) - build(deps): bump github.com/mattn/go-runewidth from 0.0.27 to 0.0.28 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2753](helmfile/helmfile#2753) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.37 to 1.32.38 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2755](helmfile/helmfile#2755) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.2 to 1.107.3 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2756](helmfile/helmfile#2756) - build(deps): bump helm-diff to v3.15.12 by [@​yxxhero](https://github.com/yxxhero) in [#​2759](helmfile/helmfile#2759) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.38 to 1.33.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2762](helmfile/helmfile#2762) - build(deps): bump github.com/gofrs/flock from 0.13.0 to 0.13.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2761](helmfile/helmfile#2761) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.3 to 1.109.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2760](helmfile/helmfile#2760) - build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2763](helmfile/helmfile#2763) - feat: allow helmfile to continue on failed releases by [@​ceriath](https://github.com/ceriath) in [#​2616](helmfile/helmfile#2616) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.109.1 to 1.110.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2764](helmfile/helmfile#2764) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.1 to 1.33.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2765](helmfile/helmfile#2765) - fix: resolve OCI version constraints before deriving the shared chart cache path by [@​samifruit514](https://github.com/samifruit514) in [#​2768](helmfile/helmfile#2768) - feat: opt-in OpenTelemetry tracing and metrics (experimental) by [@​yxxhero](https://github.com/yxxhero) in [#​2769](helmfile/helmfile#2769) - build(deps): bump go.opentelemetry.io/otel from 1.44.0 to 1.46.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2778](helmfile/helmfile#2778) - build(deps): bump github.com/mattn/go-runewidth from 0.0.28 to 0.0.29 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2776](helmfile/helmfile#2776) - build(deps): bump go.opentelemetry.io/otel/sdk/metric from 1.44.0 to 1.46.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2777](helmfile/helmfile#2777) - build(deps): bump go.opentelemetry.io/proto/otlp from 1.10.0 to 1.11.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2774](helmfile/helmfile#2774) - build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.46.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2775](helmfile/helmfile#2775) - build(deps): bump gitpython from 3.1.58 to 3.1.59 in /docs by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2785](helmfile/helmfile#2785) - build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2784](helmfile/helmfile#2784) - build(deps): bump google.golang.org/protobuf from 1.36.12-0.20260120151049-f2248ac996af to 1.36.12 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2783](helmfile/helmfile#2783) - build(deps): bump golang.org/x/sync from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2782](helmfile/helmfile#2782) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.2 to 1.33.3 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2781](helmfile/helmfile#2781) - build(deps): bump go.opentelemetry.io/contrib/exporters/autoexport from 0.67.0 to 0.71.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2780](helmfile/helmfile#2780) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.110.0 to 1.111.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2779](helmfile/helmfile#2779) - fix(list): avoid deadlock in `helmfile list` with more than 100 states by [@​max06](https://github.com/max06) in [#​2773](helmfile/helmfile#2773) - chore: bump Helm to v3.22.0 and v4.3.0 by [@​yxxhero](https://github.com/yxxhero) in [#​2786](helmfile/helmfile#2786) - build(deps): bump helm-diff to v3.15.13 by [@​yxxhero](https://github.com/yxxhero) in [#​2788](helmfile/helmfile#2788) - feat(remote): support wildcards in remote values/secrets file selectors by [@​hoppla20](https://github.com/hoppla20) in [#​2787](helmfile/helmfile#2787) - build(deps): bump helmfile/vals from v0.46.0 to v0.46.1 by [@​yxxhero](https://github.com/yxxhero) in [#​2789](helmfile/helmfile#2789) #### New Contributors - [@​Dessalines39394](https://github.com/Dessalines39394) made their first contribution in [#​2742](helmfile/helmfile#2742) - [@​samifruit514](https://github.com/samifruit514) made their first contribution in [#​2768](helmfile/helmfile#2768) - [@​max06](https://github.com/max06) made their first contribution in [#​2773](helmfile/helmfile#2773) - [@​hoppla20](https://github.com/hoppla20) made their first contribution in [#​2787](helmfile/helmfile#2787) **Full Changelog**: <helmfile/helmfile@v1.7.4...v1.8.0> </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/London) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC43OS42IiwidXBkYXRlZEluVmVyIjoiNDQuODMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9taW5vciJdfQ==--> Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/601
helmfile 1.8.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed * build(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.0 by @dependabot[bot] in helmfile/helmfile#2749 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.36 to 1.32.37 by @dependabot[bot] in helmfile/helmfile#2750 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.1 to 1.107.2 by @dependabot[bot] in helmfile/helmfile#2751 * build(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 by @dependabot[bot] in helmfile/helmfile#2752 * docs: fix broken star history chart by @Dessalines39394 in helmfile/helmfile#2742 * build(deps): bump github.com/mattn/go-runewidth from 0.0.27 to 0.0.28 by @dependabot[bot] in helmfile/helmfile#2753 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.37 to 1.32.38 by @dependabot[bot] in helmfile/helmfile#2755 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.2 to 1.107.3 by @dependabot[bot] in helmfile/helmfile#2756 * build(deps): bump helm-diff to v3.15.12 by @yxxhero in helmfile/helmfile#2759 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.38 to 1.33.1 by @dependabot[bot] in helmfile/helmfile#2762 * build(deps): bump github.com/gofrs/flock from 0.13.0 to 0.13.1 by @dependabot[bot] in helmfile/helmfile#2761 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.3 to 1.109.1 by @dependabot[bot] in helmfile/helmfile#2760 * build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 by @dependabot[bot] in helmfile/helmfile#2763 * feat: allow helmfile to continue on failed releases by @ceriath in helmfile/helmfile#2616 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.109.1 to 1.110.0 by @dependabot[bot] in helmfile/helmfile#2764 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.1 to 1.33.2 by @dependabot[bot] in helmfile/helmfile#2765 * fix: resolve OCI version constraints before deriving the shared chart cache path by @samifruit514 in helmfile/helmfile#2768 * feat: opt-in OpenTelemetry tracing and metrics (experimental) by @yxxhero in helmfile/helmfile#2769 * build(deps): bump go.opentelemetry.io/otel from 1.44.0 to 1.46.0 by @dependabot[bot] in helmfile/helmfile#2778 * build(deps): bump github.com/mattn/go-runewidth from 0.0.28 to 0.0.29 by @dependabot[bot] in helmfile/helmfile#2776 * build(deps): bump go.opentelemetry.io/otel/sdk/metric from 1.44.0 to 1.46.0 by @dependabot[bot] in helmfile/helmfile#2777 * build(deps): bump go.opentelemetry.io/proto/otlp from 1.10.0 to 1.11.0 by @dependabot[bot] in helmfile/helmfile#2774 * build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.46.0 by @dependabot[bot] in helmfile/helmfile#2775 * build(deps): bump gitpython from 3.1.58 to 3.1.59 in /docs by @dependabot[bot] in helmfile/helmfile#2785 * build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 by @dependabot[bot] in helmfile/helmfile#2784 * build(deps): bump google.golang.org/protobuf from 1.36.12-0.20260120151049-f2248ac996af to 1.36.12 by @dependabot[bot] in helmfile/helmfile#2783 * build(deps): bump golang.org/x/sync from 0.22.0 to 0.23.0 by @dependabot[bot] in helmfile/helmfile#2782 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.2 to 1.33.3 by @dependabot[bot] in helmfile/helmfile#2781 * build(deps): bump go.opentelemetry.io/contrib/exporters/autoexport from 0.67.0 to 0.71.0 by @dependabot[bot] in helmfile/helmfile#2780 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.110.0 to 1.111.0 by @dependabot[bot] in helmfile/helmfile#2779 * fix(list): avoid deadlock in `helmfile list` with more than 100 states by @max06 in helmfile/helmfile#2773 * chore: bump Helm to v3.22.0 and v4.3.0 by @yxxhero in helmfile/helmfile#2786 * build(deps): bump helm-diff to v3.15.13 by @yxxhero in helmfile/helmfile#2788 * feat(remote): support wildcards in remote values/secrets file selectors by @hoppla20 in helmfile/helmfile#2787 * build(deps): bump helmfile/vals from v0.46.0 to v0.46.1 by @yxxhero in helmfile/helmfile#2789 ## New Contributors * @Dessalines39394 made their first contribution in helmfile/helmfile#2742 * @samifruit514 made their first contribution in helmfile/helmfile#2768 * @max06 made their first contribution in helmfile/helmfile#2773 * @hoppla20 made their first contribution in helmfile/helmfile#2787 **Full Changelog**: https://github.com/helmfile/helmfile/compare/v1.7.4...v1.8.0</pre> <p>View the full release notes at <a href="https://github.com/helmfile/helmfile/releases/tag/v1.8.0">https://github.com/helmfile/helmfile/releases/tag/v1.8.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!20121
Summary
This PR adds support for glob patterns (wildcards) in the file selector portion of remote URLs, allowing users to reference multiple files from a remote repository with a single pattern instead of listing each file individually.
Key Changes
New
HasGlobPattern()function inpkg/remote/remote.go: Detects whether a remote URL contains glob metacharacters (*,?,[) in its file selector portion, distinguishing them from legitimate uses in query strings and IPv6 addresses.Enhanced
Sourcestruct: AddedHasSelectorfield to track whether a URL contains an explicit@separator, which is required to distinguish between repository roots and wildcard patterns when parsing URLs.Wildcard validation in
Remote.Fetch(): Added validation to reject unsupported wildcard patterns:https://ands3://URLs (which fetch single files)s3::references@selectors (where Dir/File inference is ambiguous)Glob expansion in
Storage.resolveFile(): When a remote URL contains a glob pattern, the fetched directory is expanded usingfilepath.Match(same syntax as local values files), with results sorted and filtered to regular files only.Updated test coverage:
TestHasGlobPattern()covering edge cases (IPv6 hosts, placeholders, character classes)TestRemote_Fetch_Wildcard()verifying cache behavior with wildcardsTestRemote_Fetch_WildcardUnsupported()validating error casesTestStorage_resolveFile_RemoteGlob()testing glob expansion hermeticallyTestParse()to verifyHasSelectorfieldDocumentation updates in
docs/environments.md: Added examples and limitations for wildcard support in both environment secrets and values files.Implementation Details
dir/*.yamlanddir/specific.yamlshare the same cache entry.**), consistent with local values file globbing.