-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
kubernetes backend - step name with spaces causes label error #3272
Comments
What is expected behavior, apart from |
@zc-devs I don't expect a certain label on pods (for steps). That's not the problem. The actual issue is: all pipelines which have spaces in the step-name fail with that error. I'm a bit blocked because I have some pipelines with spaces in the name of steps. All of them failed. |
I understand. As there are couple of solutions, I'm just trying to find out preferable.
So, would choose auto translation space to hyphen. |
Yes I think that was the behaviour before. The problem has been introduced by #3204 I think, where the step name is now used to label the pod. That wasn't the case before. Now when a step name doesn't correspond to valid k8s-label regex (([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), it will fail. A translation of non-valid characters (according to label spec) to hyphens would be the best solution for now IMO. It might be worth adding a test in pod_test.go, where a step has a non basic naming, like "build & deploy". |
Component
agent
Describe the bug
Having a pipline like:
on a woodpecker 2.2.2 server with kubernetes backend I get the following error:
This has worked before on the 2.1.x version
System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: