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

Input Parameter Validation #13493

Open
FloSchick opened this issue Aug 22, 2024 · 3 comments
Open

Input Parameter Validation #13493

FloSchick opened this issue Aug 22, 2024 · 3 comments
Labels
area/api Argo Server API area/cli The `argo` CLI area/ui type/feature Feature request

Comments

@FloSchick
Copy link

Summary

I would like to propose a new feature for Argo Workflows that enhances user experience by adding input parameter validation directly within the UI.

The idea is to enable real-time validation of input parameters against predefined patterns (such as regular expressions) directly in the UI. If a user inputs a parameter that does not match the specified regex pattern, an error message should be immediately displayed, preventing the workflow from being submitted until the input is corrected.

This feature would be particularly useful for workflows that require strict input formats. By validating input parameters in real time, users can avoid common mistakes and ensure that their workflows are submitted with correct and valid data. This could significantly reduce errors and the need for re-runs, improving overall efficiency.

Use Cases

Imagine a scenario where non-technical users are responsible for initiating Argo Workflows. These users may not be familiar with the exact formatting requirements for input parameters. Without validation, they might input data that causes the workflow to fail, leading to additional manual effort to diagnose the issue and rerun the workflow. With input parameter validation directly in the UI, these users receive immediate feedback if their input is incorrect, preventing the workflow from failing. This ensures that the workflow runs smoothly the first time, reducing errors and saving time.


Message from the maintainers:

Love this feature request? Give it a 👍. We prioritise the proposals with the most 👍.

@FloSchick FloSchick added the type/feature Feature request label Aug 22, 2024
@agilgur5
Copy link

agilgur5 commented Aug 23, 2024

I've mentioned doing this before too on Slack and probably elsewhere too.

I was thinking to validate input params everywhere, and not just in the UI.
Re-using expr expressions would be preferable for validation, but they're only supported in the back-end right now and not in the UI, so I was thinking maybe we just do regex validation, which can be implemented everywhere.

@agilgur5 agilgur5 changed the title Implement Input Parameter Validation in the UI Input Parameter Validation Aug 23, 2024
@agilgur5 agilgur5 added area/api Argo Server API area/ui area/cli The `argo` CLI labels Aug 23, 2024
@MasonM
Copy link
Contributor

MasonM commented Jan 2, 2025

This could be done using validating admission policy without any changes to Argo. The main problem right now is they require using the full CRDs, which are currently broken, so I entered I entered #14044 to fix them. See #14045 for an example ValidatingAdmissionPolicy.

@FloSchick
Copy link
Author

FloSchick commented Jan 3, 2025

Thanks, @MasonM for sharing this! It’s a very clever solution, and I’ll definitely give it a try once the PR is merged. That said, I still hope to see native support from Argo in the future. My request is more focused on user-friendliness rather than security.

For example, a non-technical user submitting a workflow via the UI, as described in my scenario, could still be confused if the workflow is blocked by the validation admission policy. In such cases, it would be helpful to know how the UI will handle this scenario. Will it display a 401 error, or will there be another user-friendly way to communicate the rejection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Argo Server API area/cli The `argo` CLI area/ui type/feature Feature request
Projects
None yet
Development

No branches or pull requests

3 participants