Skip to content

init: update the default sample Score file generated#103

Merged
mathieu-benoit merged 1 commit into
score-spec:mainfrom
Abhishek9639:feat/update-default-sample-score-file
Apr 27, 2026
Merged

init: update the default sample Score file generated#103
mathieu-benoit merged 1 commit into
score-spec:mainfrom
Abhishek9639:feat/update-default-sample-score-file

Conversation

@Abhishek9639
Copy link
Copy Markdown
Contributor

This is a follow-up to score-spec/score-compose#476 and score-spec/score-k8s#302 as requested by @mathieu-benoit.

The default score.yaml generated by init was using a basic stefanprodan/podinfo example that didn't really showcase what Score can do. This PR replaces it with a more meaningful sample using scorespec/sample-score-app:latest with postgres, dns, and route resources, along with header comments pointing to the Getting Started
guide.

Since this is a stub/template implementation with placeholder provisioners, cross-resource output substitutions (e.g. ${resources.db.name}) are intentionally omitted they would fail at provisioning time since the stub always returns empty outputs.

Also switched from struct-based YAML generation to a DefaultScoreFileContent raw string constant (same approach as
score-compose and score-k8s), which is simpler and supports comments.

Updated TestInitNominal and TestInitAndGenerate_with_sample to reflect the new sample structure.

Signed-off-by: Abhishek <abhishekup082@gmail.com>
@Abhishek9639
Copy link
Copy Markdown
Contributor Author

Hi @mathieu-benoit,
Raised this as a follow-up to the score-compose and score-k8s PRs. One small note since this is a stub implementation with placeholder provisioners that return empty outputs, I kept the cross-resource substitutions out of the sample to avoid provisioning errors.
Let me know if you'd prefer a different approach.
Thanks

@mathieu-benoit mathieu-benoit self-requested a review April 27, 2026 18:05
Copy link
Copy Markdown
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

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

LGTM

@mathieu-benoit mathieu-benoit merged commit 2000683 into score-spec:main Apr 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants