fix: workflow id and name usage
Related to #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_idto useworkflow.get("id")for id andworkflow.get("name")for name. - Add logic to generate a different UUID if
workflow.get("id")is not provided. - Update
_parse_workflowto useworkflow.get("name")for name.
- Update
-
keep/api/models/db/workflow.py
- Add a new field
invalidto mark workflows with configuration errors. - Update the
Workflowclass to include theinvalidfield.
- Add a new field
-
keep/api/routes/workflows.py
- Update
create_workflowandcreate_workflow_from_bodyto generate a different UUID ifworkflow.get("id")is not provided. - Add validation logic to mark workflows with configuration errors as
invalid.
- Update
-
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.
- Add test cases to verify that a different UUID is generated if
@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.
Use GitHub automation to close the issue when a PR is merged
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| keep | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 9, 2024 7:53am |
This is open for more than a month. Closing for now, please re-open if it's relevant cc: @vishwamartur @Matvey-Kuk