feat(manifest): expand env vars in foundational-store input#840
Open
maoueh wants to merge 1 commit into
Open
Conversation
Add strict environment variable expansion ($VAR / ${VAR}) for the
foundational-store module input, resolved at pack/load time so a
manifest can carry a placeholder (e.g. $DEPLOYMENT_ID) filled in later.
The generated .spkg always embeds the resolved value.
Undefined variables now error out instead of silently expanding to an
empty string; the same stricter behavior is applied to the existing
imports and protobuf.importPaths expansion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds environment variable expansion (
$VAR/${VAR}) for thefoundational-storemodule input insubstreams.yaml. This lets a manifest be authored/pushed with a placeholder that is resolved at pack/load time:This is a convenience at read time only — the generated
.spkgalways embeds the resolved, hard-coded value, never the$VARreference.Behavior
The same stricter (error-on-undefined) behavior is now also applied to the pre-existing expansion of
importsandprotobuf.importPaths, which previously usedos.ExpandEnv(silent empty substitution).Changes
expandEnvVarshelper (os.Expand+os.LookupEnv, errors on undefined).expandManifestVariables(mainConvertpipeline) for imports, protobuf import paths, and the newfoundational-storeinputs.LoadManifestFilehelper for consistency..spkgembedding the resolved value.Added+Changed).Tests
$.foundational-storeexpansion: happy path + undefined-var error path.imports/protobuf.importPathsnow fail loud instead of expanding to an empty string.