Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide methods shared with score-compose for score implementation #32

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

astromechza
Copy link
Member

@astromechza astromechza commented Mar 28, 2024

I'd like to make it easier to build alternative implementations of Score using the score-go library. So I've copied over some bits of score-compose (https://github.com/score-spec/score-compose/tree/main/internal/project, and https://github.com/score-spec/score-compose/blob/main/internal/command/override_utils.go) into score-go.

The major common parts are:

  1. Applying map or path based overrides to the decoded yaml, here these have been re-implemented to not modify the input data structure.
  2. Reading one or more score structures into an in-memory state object along with implementation-specific extras
  3. Resolving a topologically-sorted list of resources and evaluating placeholders within them

These are mechanisms used in score-compose that are common to other implementations like score-flyio and the one internal to Humanitec.

Copy link

@docktorrr docktorrr left a comment

Choose a reason for hiding this comment

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

Looks good

Signed-off-by: Ben Meier <ben.meier@humanitec.com>
@astromechza astromechza merged commit 5022dc8 into main Apr 3, 2024
2 checks passed
@astromechza astromechza deleted the utility-methods branch April 3, 2024 20:32
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