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

bug: Unable to create AnalysisRun due to long Stage name #3202

Open
4 tasks done
aidan-canva opened this issue Jan 2, 2025 · 1 comment
Open
4 tasks done

bug: Unable to create AnalysisRun due to long Stage name #3202

aidan-canva opened this issue Jan 2, 2025 · 1 comment

Comments

@aidan-canva
Copy link

aidan-canva commented Jan 2, 2025

Checklist

  • I've searched the issue queue to verify this is not a duplicate bug report.
  • I've included steps to reproduce the bug.
  • I've pasted the output of kargo version.
  • I've pasted logs, if applicable.

Description

Execution of stages with long name (>=30 characters) and spec.verification configured results in failure to create AnalysisRun resources. This is due to the kargo.akuity.io/promotion label value exceeding the 63 character limit.

Steps to Reproduce

  1. Create a Stage with a sufficiently long name (>30 characters)
  2. Configure a spec.verification step that triggers an AnalysisTemplate - any configuration will do.
  3. Promote a Freight to the Stage with the long name.
  4. Note that the verification step fails to create the AnalysisRun resource.

Version

v1.1.2

Logs

Error message:

error creating AnalysisRun "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.01jgjn7248tgmb6xq3wxzrqp9s.43776e4" in namespace "kargo-xxxxx": AnalysisRun.argoproj.io "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.01jgjn7248tgmb6xq3wxzrqp9s.43776e4" is invalid: metadata.labels: Invalid value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.01jgjn66w0kkacc9yaajzc0713.56d0e7f": must be no more than 63 characters

Investigation

The long name generation looks to come from the generateName method here. It's being set as a label on the AnalysisRun here from the previous promotion value.

The ULID + Freight ID take a fair chunk of the available real estate - perhaps generateName() should simply truncate (or hash + truncate) long prefixes. Not sure what the implications of diverging from the 1:1 Stage name are though.

For a workaround, I will likely do some internal truncating of the Stage name to keep it <=29 chars though this may impact readability and identification of the stages running (and what environment they represent). Are there plans to display additional Stage metadata in the UI via something like annotations?

@RohanMishra315
Copy link
Contributor

Hey @krancour could a take a look ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants