Fix generating incorrect names for Jobs when generateName is used#718
Fix generating incorrect names for Jobs when generateName is used#718pnovitskiy wants to merge 3 commits intoargoproj:masterfrom
generateName is used#718Conversation
pkg/sync/sync_context.go
Outdated
| var syncRevision string | ||
| if len(sc.revision) >= 8 { | ||
| syncRevision = sc.revision[0:7] | ||
| syncRevision = strings.Trim(sc.revision[0:7], ".") |
There was a problem hiding this comment.
Semver also allows dashes (-) and plus (+), I would trim for that too.
There was a problem hiding this comment.
Dashes should be fine. Let's keep only letters, numbers and -.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #718 +/- ##
==========================================
- Coverage 54.26% 53.65% -0.61%
==========================================
Files 64 64
Lines 6164 6476 +312
==========================================
+ Hits 3345 3475 +130
- Misses 2549 2725 +176
- Partials 270 276 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The gitops-engine repository is migrating to https://github.com/argoproj/argo-cd. Can you please update the PR by resolving the SonarCloud analytis error(s) / If it's not relevant anymore, feel free to close it |


Discovered a case when processing of
generateNameproduces incorrect results.For example if you have revision
1.1515.1it's being cut a1.1515.and combined with suffix that starts with-character produces name that does not comply with RFC1123.