-
Notifications
You must be signed in to change notification settings - Fork 13
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: fully version schema #163
Conversation
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
make gen-schema-json | ||
if [ ! -z "$(git status --porcelain)" ]; then | ||
echo "JSON schema generation produced diff, regenerating and committing result..."; | ||
git config --global user.name "validate-and-sync-schema-job" | ||
git config --global user.email "bot@openfeature.dev" | ||
git add json/*.json | ||
git commit -m 'chore: sync json schema from yaml' -s | ||
git push | ||
else | ||
echo "No delta between YAML and JSON schemas, finishing..." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a diff, this regenerates the JSON from the YAML, and commits is back - this way when release please updates the YAML files based on the x-release-please
comment, it regenerates the JSON files to match. I tested it out here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example PR looks promising 👍
🤖 I have created a release *beep* *boop* --- <details><summary>json/json-schema: 0.2.6</summary> ## [0.2.6](json/json-schema-v0.2.5...json/json-schema-v0.2.6) (2024-05-27) ### ✨ New Features * fully version schema ([#163](#163)) ([c0692e4](c0692e4)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: validate-and-sync-schema-job <bot@openfeature.dev> Co-authored-by: validate-and-sync-schema-job <bot@openfeature.dev>
Reverts #163. Though there's a lot of benefits, the maintenance burden here is too high. It means we will need to update the schema version everywhere, frequently. For example, we'd have to update it in places like this: https://github.com/open-feature/java-sdk-contrib/blob/ae21165c2bd65cad325e66e8373fe38da8a98baf/providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/model/FlagParser.java#L46-L47 . I think this will be too error prone and too much of a maintenance burden for little benefit. I'm reverting back to only major version-based versioning. Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
This PR
$id
now has a full version string in it, like:https://flagd.dev/schema/v0.2.5/flags.json
)Next steps will be to: