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

launch: improve validation warning for unexpected properties #366

Merged

Conversation

giuseppe-steduto
Copy link
Member

@giuseppe-steduto giuseppe-steduto commented Nov 22, 2023

Change the validation warning issued when unexpected properties are
found in the REANA specification to include the path to were the
invalidating keywords were found.

Closes reanahub/reana-client#679.


How to test:

  • No validation warnings: use any REANA demo
  • Validation warning without displaying the path: you can use launch?url=https://github.com/giuseppe-steduto/reana-demo-root6-roofit/tree/reana-yaml-allow-unexpected-props&specification=reana-cwl.yaml
  • Validation warning of multiple unexpected properties, displaying the path to the invalidating property: you can use launch?name=roofit-warning-spec&url=https%3A%2F%2Fgithub.com%2Fgiuseppe-steduto%2Freana-demo-root6-roofit%2Ftree%2Fvalidation-tests

const properties = validation_warnings[key]
.map(
(additionalProperty) =>
`${additionalProperty.property} (at ${additionalProperty.path})`,
Copy link
Member

Choose a reason for hiding this comment

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

Note that sometime the path is empty, so we should not show (at )

@giuseppe-steduto giuseppe-steduto force-pushed the validate-fix-environment-misplaced branch from f8f7ba1 to 153562e Compare November 28, 2023 11:36
Comment on lines 31 to 33
`${api}/api/workflows?include_progress=true&include_workspace_size=true&${stringifyQueryParams(
params,
)}`;
Copy link
Member

@mdonadoni mdonadoni Nov 28, 2023

Choose a reason for hiding this comment

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

We should remove the first commit so that this URL goes back to the original one, as otherwise open interactive sessions would not be shown in the UI

Change the validation warning issued when unexpected properties are
found in the REANA specification to include the path to were the
invalidating keywords were found.

Closes reanahub/reana-client#679.
@giuseppe-steduto giuseppe-steduto force-pushed the validate-fix-environment-misplaced branch from 153562e to 47bdd5e Compare November 28, 2023 15:01
@mdonadoni mdonadoni merged commit 47bdd5e into reanahub:master Nov 30, 2023
9 checks passed
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.

validate: detecting misplaced environment clause for Serial workflows
2 participants