Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The server now accepts a new variant on an existing union, but only when the schema says which version added it (
variantMetadataonUnionDef, in api-gateway 1.1885.0). type-gen never sent it, so adding a variant to a deployed union always fails.Changes
resolveSchemaChainrecords the version each union variant first appears in.convertUnionDefToIrwritesvariantMetadatafor the variants added after the union.convertIrToWireSchemapassesvariantMetadataon, soir asset,ir update-schema, andir deploysend it.ir deploy --first-partyalready copies the whole union.variantMetadata, so its IR and asset don't change.pack.schemanow lets a minor version add union variants. Older apps on the same major read a new variant as unknown and keep it when they save. Removing a variant is still rejected.variantAddedInVersions, andstate.coretags a write that uses an added variant with at least that version. Before, writing a variant added in v2 whose record existed in v1 was tagged v1."./*"export now points atbuild/esm/public/*.jsandbuild/cjs/public/*.cjs, like the other packages. This was left out of Generate the Pack platform SDK in PACK instead of installing it from npm #342.Don't merge until api-gateway and backpack copy
variantMetadatathrough to schema validation. Until backpack reads it from first-party assets, an asset with an added variant fails to load. The generated platform SDK already has the field, so it doesn't need to be regenerated.Flow