-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Resource name too long, cannot create taskrun #481
Comments
Use generateName for the pipeline run. This must be used in combination with kubectl create (instead of apply) so that the name is generated. Shorten the name to avoid hitting tektoncd/pipeline#481.
interesting 🤔 specifically talking about the automatically created taskruns (generated by a pipelinerun) we could probably give them way less meaningful names and get away with it. but we also need a solution names ppl explicitly set 🤔 🤔🤔, tho maybe it's better to tell the user their name is too long and let them pick something else if they are creating a taskrun or pipelinerun manually? |
FWIW we've run into similar issues in the context of Jenkins X integrating with Build Pipeline. For now we are leaning towards generating machine-friendly unique names for the CRDs, and then storing metadata somewhere else to associate the user-specified names with those generated names. Perhaps an additional label or description field on the CRDs that users can set to whatever they'd like would be useful? If the full name is stored somewhere, then maybe truncating if it's too long for the name field is a decent compromise? Otherwise an explicit error message seems fine. |
Yeah, I'm a +1 on distinguishing between "name of the actual CRD" and "display name for human beings". |
That's a good idea! |
This actually gets hairier - the |
hm interesting point - okay controversial idea, do steps actually need names? what if we numbered them sequentially instead 🤔 (+ @imjasonh @shashwathi @pivotal-nader-ziada @tejal29 @vdemeester @dlorenc ) |
I like step names because it makes debugging easy. We can consider truncating resource names if it's too long. |
If the steps had clear names like |
we can make sure generated name, for steps or taskruns, have a max number of characters |
(Added some more detail in the description re. the "names" and "resources" effected by this issue) |
/assign worked with @bobcatfish on idea on how to fix this issue, PR coming soon |
remove hrishin from owners
- Update examples to use v1beta1 by default. - Add an explicit v1alpha1 example. - Use v1beta1 Pipeline types for Params and tests. Fixes tektoncd#481 Signed-off-by: Dibyo Mukherjee <[email protected]>
Expected Behavior
The pipelinerun automatically creates taskruns for every task. It sets up the taskrun name using -. The pod name will be even longer with --pod. When then name is longer then 63 characters it fails to setup the taskrun.
I think we should have some logic to automatically truncated the names, or at least we should create shorter names, e.g. instead of including the whole pipeline name include the uuid.
This applies to multiple "names" in our system, including:
Actual Behavior
Pipeline fails to reconcile.
Steps to Reproduce the Problem
Additional Info
I initially didn't hit this as I was using static pipelinerun names. When I switched to generateName, it added enough characters to go over 63.
The text was updated successfully, but these errors were encountered: