Skip to content

Commit 64b6d98

Browse files
authored
fix: revert full schema versioning (#166)
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>
1 parent 61523e5 commit 64b6d98

File tree

6 files changed

+12
-27
lines changed

6 files changed

+12
-27
lines changed

.github/workflows/pr-checks.yml

+7-18
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55

66
permissions:
7-
contents: write
7+
contents: read
88

99
env:
1010
GO_VERSION: 1.22
@@ -52,12 +52,10 @@ jobs:
5252
against: 'https://github.com/open-feature/schemas.git#branch=main,ref=HEAD~1,subdir=protobuf'
5353

5454

55-
validate-and-sync-schema:
55+
validate-schema:
5656
runs-on: ubuntu-latest
5757
steps:
5858
- uses: actions/checkout@v4
59-
with:
60-
ref: ${{ github.head_ref }}
6159

6260
# Use ajv to validate schema
6361
- name: Setup node
@@ -74,18 +72,9 @@ jobs:
7472
- name: Validate Schema
7573
run: make test
7674

77-
# Sync JSON schemas from YAML versions
78-
- name: Sync JSON from YAML
75+
# Ensure there is no diff when make gen-schema-json is run
76+
- run: make gen-schema-json
77+
- name: Check no diff
7978
run: |
80-
make gen-schema-json
81-
if [ ! -z "$(git status --porcelain)" ]; then
82-
echo "JSON schema generation produced diff, regenerating and committing result...";
83-
git config --global user.name "validate-and-sync-schema-job"
84-
git config --global user.email "bot@openfeature.dev"
85-
git add json/*.json
86-
git commit -m 'chore: sync json schema from yaml' -s
87-
git push
88-
else
89-
echo "No delta between YAML and JSON schemas, finishing..."
90-
fi
91-
79+
if [ ! -z "$(git status --porcelain)" ]; then echo "JSON schema generation produced diff. Run 'make gen-schema-json' and commit results."; exit 1; fi
80+

json/flags.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$id": "https://flagd.dev/schema/v0.2.6/flags.json",
2+
"$id": "https://flagd.dev/schema/v0/flags.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"title": "flagd Flag Configuration",
55
"description": "Defines flags for use in flagd, including typed variants and rules",

json/flags.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$id: "https://flagd.dev/schema/v0.2.6/flags.json" # x-release-please-version
1+
$id: "https://flagd.dev/schema/v0/flags.json"
22
$schema: http://json-schema.org/draft-07/schema#
33
title: flagd Flag Configuration
44
description: Defines flags for use in flagd, including typed variants and rules

json/targeting.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$id": "https://flagd.dev/schema/v0.2.6/targeting.json",
2+
"$id": "https://flagd.dev/schema/v0/targeting.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"title": "flagd Targeting",
55
"description": "Defines targeting logic for flagd; a extension of JSONLogic, including purpose-built feature-flagging operations.",

json/targeting.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$id: "https://flagd.dev/schema/v0.2.6/targeting.json" # x-release-please-version
1+
$id: "https://flagd.dev/schema/v0/targeting.json"
22
$schema: http://json-schema.org/draft-07/schema#
33
title: flagd Targeting
44
description: Defines targeting logic for flagd; a extension of JSONLogic, including

release-please-config.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
"release-type": "simple",
1515
"prerelease": false,
1616
"bump-minor-pre-major": true,
17-
"bump-patch-for-minor-pre-major": true,
18-
"extra-files": [
19-
"flags.yaml",
20-
"targeting.yaml"
21-
]
17+
"bump-patch-for-minor-pre-major": true
2218
}
2319
},
2420
"changelog-sections": [

0 commit comments

Comments
 (0)