Review app dns generation creating non reachable apps
Summary
Seemingly intermittently, an Auto DevOps pipeline will complete successfully up to "review" but then the dast and performance jobs will fail. Whent his happens, trying to go to the review app returns something like:
This site can’t be reached lighthouse-roadshow-lighthouse-chicago-1-review-4-lighthou-h1c4mz.35.233.188.173.nip.io’s server IP address could not be found.
But in this situation the staging app still comes up when clicking the link to it.
It appears, through trial and error, that the issue happens due to the DNS name length exceeding the legal number of characters on review apps. DNS defines that sections between the dots can be basically 63 chars each.
Review apps puts together the --<review-#>-<some other sequence of chars I don't get>.
If the total of these > 63 then when trying to get to the review app by DNS fails, which is why DAST and performance also fail.
Steps to reproduce
- Create project in a group with a long project name (eg. lighthouse-roadshow)
- Create a k8s cluster with a long name (eg. lighthouse-chicago-1)
- Run Auto DevOps pipeline
- After review job finishes, DAST and perf will fail
- try to go to the review app by link = fail = message above
Example Project
Please do not touch this project until AFTER Sept 25, 2018 at 3:30 PM Pacific. It might be used for a demo until then: https://gitlab.com/lighthouse-roadshow/lighthouse-chicago-1
What is the current bug behavior?
DNS failure for review apps (see above explanation)
What is the expected correct behavior?
Users and DAST and Performance monitoring should be able to get to the review app by DNS name.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
I don't have access to do this on gitlab.com. But here's the version number as of the time the issue was seen: GitLab Enterprise Edition 11.3.0-ee 4e822ac
Results of GitLab application Check
Expand for output related to the GitLab application check
I don't have access to do this on gitlab.com.
Fix
Replace $CI_PROJECT_PATH_SLUG
with $CI_PROJECT_ID
in the environment URL for Review Apps - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25990