-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically load the workflow schema #550
Conversation
@@ -943,6 +945,17 @@ async def describe_workflows_blocks( | |||
dynamic_blocks_definitions=dynamic_blocks_definitions | |||
) | |||
|
|||
@app.get( | |||
"/workflows/blocks/schema", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the path be /workflows/spec/schema
or similar since the schema is for the spec rather than blocks per se
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also need to add the new endpoint to the API gateway for this to work with hosted workflows.
This needs to be done in roboflow-infra, I think in this file: https://github.com/roboflow/roboflow-infra/blob/1ab773c66633dbc0311443200877d5768fd0ef61/aws/serverless/modules/containerlambda/main.tf#L110
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We call the JSON workflow definition, so maybe GET /workflows/definition/schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming to /workflows/definition/schema
@@ -51,9 +52,15 @@ def build_workflow_definition_entity( | |||
block_manifest_types_union = Union[steps_manifests] | |||
block_type = Annotated[block_manifest_types_union, Field(discriminator="type")] | |||
return create_model( | |||
"WorkflowSpecificationV1", | |||
"WorkflowSpecificationV2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that change needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initially added to make sure it was fetching the new version on the frontend, will revert back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but let's agree on the endpoint name and clarify change in the model name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's drag this into my changes on gateway side
Description
Create an endpoint to dynamically load the workflow schema to be used in the JSON editor syntax checker
Todo:
Type of change
How has this change been tested, please provide a testcase or example of how you tested the change?
Locally
Any specific deployment considerations
For example, documentation changes, usability, usage/costs, secrets, etc.
Docs