feat: add support for importing multiple provisioners files from a local directory#465
Merged
mathieu-benoit merged 1 commit intoApr 14, 2026
Conversation
Venkatesh1505
commented
Apr 13, 2026
Venkatesh1505
commented
Apr 13, 2026
7e8a598 to
47d78cd
Compare
Venkatesh1505
commented
Apr 13, 2026
Contributor
mathieu-benoit
left a comment
There was a problem hiding this comment.
This LGTM, awesome!
Really appreciate the rigorous research, documentation and tests, really great to review with such context!
I just have a question for the stdin scenario. Let's validate this before approving this dependency score-spec/score-go#180.
Notes:
- Not approving yet as we'll need to approve/merge/release the
score-godependency first - It's totally fine to just implement this for
file. We can release this when ready and already have end users using it and provide feedback if needed. Forociandgitwill come later in future PR.
47d78cd to
494c479
Compare
…ectory Signed-off-by: Venkatesh R <venkyravi97@gmail.com>
494c479 to
a7d3593
Compare
mathieu-benoit
approved these changes
Apr 14, 2026
Contributor
There was a problem hiding this comment.
LGTM, thanks, @Venkatesh1505!
Let's do this for score-k8s now 😄
7 tasks
Contributor
|
FYI: associated docs updated accordingly: score-spec/docs#278 |
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.
Description
This PR makes two changes:
Replace uriget.GetFile with uriget.GetFiles for the --provisioners flag in the init command. When a local directory path is passed, all files in
the directory are imported individually, sorted by name. Single file paths and remote URIs continue to work as before.
Rework SaveProvisionerToDirectory to drop the time-based prefix from saved provisioner filenames. Instead, the original base name from the
source URI is preserved along with a hash suffix. This ensures that files with explicit ordering prefixes (e.g., 10-, 20-) retain their intended
load order when read from the state directory.
Depends on: score-spec/score-go#(180) — adds the GetFiles function to the uriget package.
Note: This PR currently uses a local replace directive in go.mod pointing to the score-go branch. This should be updated to the released score-go
version before merging.
What does this PR do?
Relates to score-spec/score-go#177
Enables users to pass a local directory to --provisioners during score-compose init, importing all provisioner files from that directory in a
single command. Previously, each file had to be specified individually.
Before:
score-compose init
--provisioners ./provisioners/10-service.provisioners.yaml
--provisioners ./provisioners/20-redis.provisioners.yaml
After:
score-compose init --provisioners ./provisioners/
The saved filenames now preserve the original name and ordering:
Before: meaningless base64 names
f0B3kQ2x.a8Dk3mP9qR.provisioners.yamlAfter: readable, ordered
Types of changes
Checklist: