-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore: Support new structure of web features data.json v0.10.0 #509
Conversation
The Web Features repo changed the structure of the data.json in this PR: web-platform-dx/web-features#1060 Instead of being a map of features, it is now an object with three top level keys: - features - groups - snapshots This is a breaking change and has caused us to start ingesting features as if they had IDs: features, groups, snapshots This commit fixes that by updating the defs.schema.json to be the latest version (v0.10.0). This file comes from the web features repo. After auto-generating the code for that schema file, this commit adjusts the code to use it. We previously had v0.6.0 of the schema. And since then, some optional fields have become required fields. So you will see the removal of some nil checks (since now the field is not nullable). Change-Id: I9861421bc53ec8966eee80c33742d2a7e94d744c
Can you guard against future schema changes via assertions or similar? It's better to not display any information if the schema has changed than to silently ingest unexpected data. |
There are a few things we can do
I can make an issue and talk about number 2 with @foolip |
I'd like to suggest a simpler solution, which is that we release web-features 1.0.0 and from there bump the major version for any breaking changes, which would include any schema changes that aren't pure additions. Would that work? |
The Web Features repo changed the structure of the data.json in this PR: web-platform-dx/web-features#1060
Instead of being a map of features, it is now an object with three top level keys:
This is a breaking change and has caused us to start ingesting features as if they had IDs: features, groups, snapshots
This commit fixes that by updating the defs.schema.json to be the latest version (v0.10.0). This file comes from the web features repo.
After auto-generating the code for that schema file, this commit adjusts the code to use it.
We previously had v0.6.0 of the schema. And since then, some optional fields have become required fields. So you will see the removal of some nil checks (since now the field is not nullable).
This change does NOT ingest the groups or snapshots yet because this change alone is pretty big. Instead, this change keeps the same functionality. Only adjusting for the new data format.