Entrypoint swaps feature#1063
Draft
keithmanville wants to merge 4 commits intodevfrom
Draft
Conversation
90d2137 to
405fc2e
Compare
This commit adds a function to the sdk for rendering swappable entrypoint graphs into a task graph used by the task engine. It also adds a new test suite for the added functionality.
This commit adds a JSON schema for validating swappable task graphs. Tasks graphs with no swaps specified should still validate. It adds new tests with example task graphs.
To support entrypoint task swaps, we need to a way to retrieve a dynamic list of global params that
is dependent on which tasks are specified for each swap. This will allow us to notify the user of
any unused global parameters.
The implementation parses an entrypoint graph YAML and cross reference declared global params for
the entrypoint with the dereferenced variable names in the graph YAML.
The new endpoint is at `/entrypoints/{id}/snapshots/{snapshotId}/dynamicGlobalParameters`. It
returns the list of entrypoint params for the snapshot with the provided swaps, the topologically
sorted graph steps, and the list of active plugins.
The Python client has been updated for the new endpoint.
This commit includes tests for the new functionality.
405fc2e to
437814d
Compare
This feature updates the entrypoints swaps schema to add swap name aliases. The aliases are the key values under a swap definition. The full task definition is then nested under the alias. This allows tasks to be defined via any of the task invocation methods (e.g. mixed invocation). The alias of the swap is what is passed to the render function to specify the swap, not the task name. The json schema is updated to specify swaps. The render function is updated to properly generate task graphs from the new schema. New tests are added for the other task invocation types.
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.
#757