-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move allow partial supergraph flag to OpenDD flags instead of an env …
…var (#1205) ### What Currently if you want v3-engine to accept metadata that is only a partial supergraph (ie missing some subgraphs), you must set the PARTIAL_SUPERGRAPH env var. Builds sent to MBS get sent to a special endpoints `/validate/partial` and `/build/partial` that runs the engine build process with that configuration option set. This results in a terrible user experience for local builds, because MBS will accept a partial supergraph and yield build artifacts, but v3-engine will refuse to run them unless you set that env var. This PR removes that env var and creates a new OpenDD flag called `allow_partial_supergraph`. When MBS's `/validate/partial` endpoint is used, that flag is set in the build artifacts. v3-engine then looks at that flag to enable partial supergraph mode. This means a `/build/partial` build via MBS just works when you run it locally via v3-engine. ### How `metadata_resolve`'s `Configuration.allow_unknown_subgraphs` has been removed, and `metadata_resolve` now looks at OpenDD's new `Flags.allow_partial_supergraph` instead. In MBS, usage of `ValidationMode` (the enum that enables partial builds) previously used to set `Configuration.allow_unknown_subgraphs`; now it is used in `compute_open_dds_flags` in order to set `Flags.allow_partial_supergraph`. The existing metadata_resolve test that tested partial supergraphs has been modified to use the flags rather than the removed configuration option (`crates/metadata-resolve/tests/passing/missing_subgraph_when_ignoring_unknown_subgraphs`). A new `metadata_resolve` test has been added that checks that comparable relationships in `BooleanExpressionType` properly respects the `allow_partial_subgraphs` flag (this functionality was added in #1182). V3_GIT_ORIGIN_REV_ID: 2c984eb791263a1fb0606c6c44a2a1ae4a5e7370
- Loading branch information
1 parent
62d9cba
commit 7c4d34d
Showing
16 changed files
with
3,840 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.