deis / builder

Git server and application builder for Deis Workflow
https://deis.com
MIT License
40 stars 41 forks source link

fix(builder): truncate slugbuilder and dockerbuilder pod name length #505

Closed bacongobbler closed 7 years ago

bacongobbler commented 7 years ago

kubernetes has a name length limit of 63 characters. We must truncate the name such that it stays below that limit with the new app name length bump.

closes #504

deis-bot commented 7 years ago

@aledbf, @arschles and @zinuzoid are potential reviewers of this pull request based on my analysis of git blame information. Thanks @bacongobbler!

mboersma commented 7 years ago

Could this also add some tests in k8s_util_test.go? Looks like that would be straightforward. :+1: otherwise.

bacongobbler commented 7 years ago

I did so shortly after your comment :)

bacongobbler commented 7 years ago

manually tested and things are working once more.

><> git push deis master
Counting objects: 102, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (58/58), done.
Writing objects: 100% (102/102), 22.81 KiB | 0 bytes/s, done.
Total 102 (delta 39), reused 102 (delta 39)
remote: Resolving deltas: 100% (39/39), done.
Starting build... but first, coffee!
...
><> kd get po
NAME                                                              READY     STATUS              RESTARTS   AGE
deis-builder-877588361-7mfz1                                      1/1       Running             0          4m
deis-controller-3205907661-dzww6                                  1/1       Running             2          2h
deis-database-223698169-19l5r                                     1/1       Running             0          2h
deis-logger-343314728-pjnpc                                       1/1       Running             0          2h
deis-logger-fluentd-zdxfc                                         1/1       Running             0          2h
deis-logger-redis-304849759-w6262                                 1/1       Running             0          2h
deis-minio-676004970-z35v1                                        1/1       Running             0          2h
deis-monitor-grafana-541875647-sf8ls                              1/1       Running             0          2h
deis-monitor-influxdb-2881701064-7z5jv                            1/1       Running             0          2h
deis-monitor-telegraf-q7nqt                                       1/1       Running             0          2h
deis-nsqd-3764030276-4p1xh                                        1/1       Running             0          2h
deis-registry-245622726-vbjvs                                     1/1       Running             0          2h
deis-registry-proxy-nn02h                                         1/1       Running             0          2h
deis-router-1180749038-ht03q                                      1/1       Running             0          2h
deis-workflow-manager-374439079-5cv3n                             1/1       Running             0          2h
slugbuild-this-name-has-more-than-24-characte-e91bdc46-46af02e2   0/1       ContainerCreating   0          7s
codecov-io commented 7 years ago

Codecov Report

Merging #505 into master will increase coverage by 0.22%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #505      +/-   ##
=========================================
+ Coverage   56.38%   56.6%   +0.22%     
=========================================
  Files          29      29              
  Lines        1238    1242       +4     
=========================================
+ Hits          698     703       +5     
+ Misses        502     501       -1     
  Partials       38      38
Impacted Files Coverage Δ
pkg/gitreceive/k8s_util.go 71.51% <100%> (+0.67%) :arrow_up:
pkg/healthsrv/circuit_state.go 88.88% <0%> (+11.11%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 089eb67...1ff9245. Read the comment docs.