Skip to content
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

Merged
merged 8 commits into from
Aug 9, 2024

Conversation

EmilyGavrilenko
Copy link
Contributor

Description

Create an endpoint to dynamically load the workflow schema to be used in the JSON editor syntax checker

Todo:

  • Create tests

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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

  • Docs updated? What were the changes:

@@ -943,6 +945,17 @@ async def describe_workflows_blocks(
dynamic_blocks_definitions=dynamic_blocks_definitions
)

@app.get(
"/workflows/blocks/schema",
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Collaborator

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

Copy link
Contributor Author

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",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that change needed

Copy link
Contributor Author

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

Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a 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

Copy link
Collaborator

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a 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

@PawelPeczek-Roboflow PawelPeczek-Roboflow merged commit 1621874 into main Aug 9, 2024
58 checks passed
@PawelPeczek-Roboflow PawelPeczek-Roboflow deleted the dynamic-workflow-schema branch August 9, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants