litmus
litmus copied to clipboard
Re-run schedule does not work if user is an email address
What happened:
I am using the DEX server so all users are authenticated/created using information from the 3rd party providers
I log in as an editor to the project, go to Workflows > Schedules, and click Rerun schedule, but nothing happens. UI just redirects me to the Runs tab, but the new Run is not created.
Backend ACKs the request:
{"data":{"reRunChaosWorkFlow":"Request for re-run acknowledged, workflowID: dae6de43-13e0-475f-9ea8-8e4ad71d9980"}}
Subscriber has an error:
time="2022-05-27T06:56:50Z" level=error msg="Error on processing request" error="error performing cluster operation: Workflow.argoproj.io \"custom-chaos-workflow-1653598244-1653634610\" is invalid: metadata.labels: Invalid value: \"[email protected]\": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')"
What you expected to happen:
I expect that the workflow will be executed
Where can this issue be corrected? (optional)
N/A
How to reproduce it (as minimally and precisely as possible):
- Have a user with an editor role that has a username that is an email ([email protected]).
- Try to re-run workflow
- Check subscriber logs
Anything else we need to know?:
The manifest consists of a label named executed_by which is the username. Since the username came from 3rd party and is an email, it is not valid according to the label regex. Maybe it makes sense to sanitize the username before submitting it to the Workflow
PR for the fix https://github.com/litmuschaos/litmus/pull/3648 Thanks @brnck for reporting this issue!
Hi. Same issue for me. Is there any action that I could do until the fix is merged? I tried to remove the host part of the email so that I could run the experiment, but when I log in again using SSO, Litmus tries to create another user for me (it looks for username not email) :\
https://github.com/litmuschaos/litmus/pull/3648#issuecomment-1171059941
Hi @amityt, I proposed a different solution for this problem, without breaking the audit. #3705