-
Notifications
You must be signed in to change notification settings - Fork 32
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
[WIP] V1 entrypoint workflow yaml validation #652
Conversation
Added kwargs for use of log
Changed a dependacy from plugin id service to plugin file id service.
Added kwargs for use of log
Changed a dependacy from plugin id service to plugin file id service.
…ub.com/usnistgov/dioptra into v1-entrypoint-workflow-yaml-validation
Need to resolve merge conflicts with new error handling methods before rebase. |
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.
Did an initial pass on this and left comments.
The additional feature to add to this PR is using the validation in the entrypoint create and modify services to prevent invalid entrypoints from being created.
def handle_entrypoint_workflow_validation_error(error): | ||
issues = error.args | ||
print (issues) | ||
message = "\n".join(str(issue) for issue in issues) |
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 should create a "detail" dictionary that extracts the relevant information from task engine issues.
See Harold's error handling refactor:
dioptra/src/dioptra/restapi/errors.py
Line 341 in a66cad4
"detail": detail, |
This lets use return more structured information instead of just string-ifiying the issues directly.
|
||
parameters = {param['name']: param['default_value'] for param in entrypoint_parameters} | ||
|
||
tasks: dict[str, Any] = {} |
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.
I think we should move this block (line 132 to 161) to export_task_engine_yaml.py
. It would be a function similar to export_task_engine_yaml
but with different inputs.
"parameterType": "string", | ||
}, | ||
] | ||
expected_message = "[ValidationIssue(IssueType.SEMANTIC, IssueSeverity.ERROR, 'In step \"hello_step\": unrecognized task plugin: hello_wrld')]" |
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.
I don't think we should match the error text exactly. Maybe just check response code and the issue type.
fix: plugins dropdown in entrypoints form fix
Added kwargs for use of log
Changed a dependacy from plugin id service to plugin file id service.
Added kwargs for use of log
Changed a dependacy from plugin id service to plugin file id service.
…ub.com/usnistgov/dioptra into v1-entrypoint-workflow-yaml-validation
Moved to new PR #673 after rebase issues. |
No description provided.