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

Add workflow for entrypoint yaml validation #615

Open
5 tasks
keithmanville opened this issue Aug 16, 2024 · 0 comments
Open
5 tasks

Add workflow for entrypoint yaml validation #615

keithmanville opened this issue Aug 16, 2024 · 0 comments
Assignees
Labels
feature New feature to add to project

Comments

@keithmanville
Copy link
Collaborator

keithmanville commented Aug 16, 2024

Add a new workflow for validating the task_graph portion of the entrypoint yaml

This should make use of the existing validation functions here:
https://github.com/usnistgov/dioptra/blob/main/src/dioptra/task_engine/validation.py

The endpoint should look something like: POST /workflows/entrypointValidate { "task_graph": "contents", "plugin_ids" [...], "entrypoint_parameters": { .. } }
With the response being a message stating the either the yaml is valid or not (with the reason provided by the validation function).

We want to be able to validate an entrypoint yaml before an Entrypoint Resource has been created by the user. To accomplish this the user will need to provide some details of the entrypoint.

See here for an example of constructing the full task engine yaml:

Additionally, the entrypoint services should be updated to prevent the creation of snapshots with invalid yaml. They should return an appropriate error message containing the validation errors from the validation function.

Definition of Done:

  • The schema, controller, service, and errors are added to implement the yaml validation workflow
  • task graph yaml is integrated into the entrypoint services to prevent invalid yaml from being commited in a snapshot
  • New tests are added to cover this feature
  • All tests pass
  • Feature is merged into dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to add to project
Projects
None yet
Development

No branches or pull requests

2 participants