-
Notifications
You must be signed in to change notification settings - Fork 785
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
fix: workflow id and name usage #2685
Conversation
Related to keephq#1885 Update workflow parsing to use `id` as id and `name` as name, generate different UUID if `id` is not provided, and add validation for configuration errors. * **keep/parser/parser.py** - Update `_get_workflow_id` to use `workflow.get("id")` for id and `workflow.get("name")` for name. - Add logic to generate a different UUID if `workflow.get("id")` is not provided. - Update `_parse_workflow` to use `workflow.get("name")` for name. * **keep/api/models/db/workflow.py** - Add a new field `invalid` to mark workflows with configuration errors. - Update the `Workflow` class to include the `invalid` field. * **keep/api/routes/workflows.py** - Update `create_workflow` and `create_workflow_from_body` to generate a different UUID if `workflow.get("id")` is not provided. - Add validation logic to mark workflows with configuration errors as `invalid`. * **tests/test_parser.py** - Add test cases to verify that a different UUID is generated if `workflow.get("id")` is not provided. - Add test cases to verify that workflows with configuration errors are marked as `invalid`.
@vishwamartur is attempting to deploy a commit to the KeepHQ Team on Vercel. A member of the Team first needs to authorize it. |
No linked issues found. Please add the corresponding issues in the pull request description. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This is open for more than a month. Closing for now, please re-open if it's relevant |
Related to #1885
Update workflow parsing to use
id
as id andname
as name, generate different UUID ifid
is not provided, and add validation for configuration errors.keep/parser/parser.py
_get_workflow_id
to useworkflow.get("id")
for id andworkflow.get("name")
for name.workflow.get("id")
is not provided._parse_workflow
to useworkflow.get("name")
for name.keep/api/models/db/workflow.py
invalid
to mark workflows with configuration errors.Workflow
class to include theinvalid
field.keep/api/routes/workflows.py
create_workflow
andcreate_workflow_from_body
to generate a different UUID ifworkflow.get("id")
is not provided.invalid
.tests/test_parser.py
workflow.get("id")
is not provided.invalid
.