Skip to content

Conversation

astromechza
Copy link
Member

This updates the score go library with the latest score spec to support the change from array to object for files.

This was a bit gnarly to update all the tests to use the maps instead of arrays. And the struct generation and validation needed to avoid the 'oneOf' structures in the schema - that's why there's a more significant jq modification in the Makefile to pick out the 'object' variant.

The critical function for any score implementations is that they must call ApplyCommonUpgradeTransforms to convert the files array over to a map before running the Validate() functions.

You can see now in the generated types, that instead of slices, we get a object for the files and volumes:

image

image

@astromechza astromechza force-pushed the update-score-go-to-support-files-and-vols branch from e69f69e to 1a66168 Compare April 17, 2025 16:41
Signed-off-by: Ben Meier <ben.meier@humanitec.com>
@astromechza astromechza force-pushed the update-score-go-to-support-files-and-vols branch from 1a66168 to 33c6960 Compare April 17, 2025 16:45
Copy link
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
Copy link
Contributor

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