Expose the versioned pages site URL during the ci build
What does this MR do and why?
CI_PAGES_URL
variable always return the full deployment URL, including path_prefix
Make the Currently the CI_PAGES_URL
only returns the main pages deployment path. If the user leverages parallel deployments, it does not include the user-specified path_prefix
. This MR moves the creation of said variable to models/build.rb
where we have access to the job spec to be able to deduct the full deployment URL from (ahead of its deployment). We also leverage the Gitlab::Pages::UrlBuilder
that generates the path for real after the pages deployment has been build so we have a SSOT for the deployment URL spec.
CI_PAGES_HOSTNAME
with the full projects domain, not just the instance default
Introduce a new variable The existing CI_PAGES_DOMAIN
variable always returned the instance's pages domain, not the project's domain. Seeing as this has been there for a while, I thought it safe to keep this behaviour as-is and instead introduce a new variable CI_PAGES_HOSTNAME
that returns the full domain.
Gitlab::Pages::UrlBuilder
refactor the The above changes required major changes in the Gitlab::Pages::UrlBuilder
, which had organically grown to include more and more functionalities and special use-cases. I took this as an opportunity to refactor the class to a more declarative instead of a functional style. this will allow easier maintenance for future changes such as what might result from #498446
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #416493 (closed)
Merge request reports
Activity
changed milestone to %17.5
assigned to @janis
added 5592 commits
-
fad7da76...283f36ee - 5591 commits from branch
master
- a3b4a9a6 - Expose pages deployment URL as CI_PAGES_DEPLOYMENT_URL variable
-
fad7da76...283f36ee - 5591 commits from branch
2 Warnings This MR changes code in ee/
, but its Changelog commit is missing theEE: true
trailer. Consider adding it to your Changelog commits.This merge request is quite big (656 lines changed), please consider splitting it into multiple merge requests. 1 Message This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
-
doc/ci/variables/predefined_variables.md
(Link to current live version)
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Category Reviewer Maintainer backend @syarynovskyi
(UTC+2, 1 hour ahead of author)
@harsimarsandhu
(UTC+5.5, 4.5 hours ahead of author)
~"Verify" Reviewer review is optional for ~"Verify" @hfyngvason
(UTC-5, 6 hours behind author)
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger-
added 1 commit
- 7f012a43 - Expose pages deployment URL as CI_PAGES_DEPLOYMENT_URL variable
changed milestone to %17.6
added missed:17.5 label
added 1 commit
- 4b1b365c - Remove with_unique_domain parameter from pages_url method
- A deleted user
added frontend label
added 1 commit
- b9e9312a - Remove with_unique_domain parameter from pages_url method
added 1752 commits
-
b9e9312a...989f9972 - 1748 commits from branch
master
- 92c6bee6 - Expose pages deployment URL as CI_PAGES_DEPLOYMENT_URL variable
- adf35f0f - Remove with_unique_domain parameter from pages_url method
- e86aab82 - Use prefixed url as Pages URL and delegate to URL builder
- d2f4a018 - Move the CI_PAGES_ variables logic to URL builder
Toggle commit list-
b9e9312a...989f9972 - 1748 commits from branch
mentioned in issue #499687 (closed)
added 1 commit
- 37bcce63 - use scoped_variables to escape infinite loop
added 2 commits
- Resolved by Janis Altherr
- Resolved by Janis Altherr
mentioned in issue #416493 (closed)
added 3881 commits
-
7cb8b5d4...5514e8d2 - 3868 commits from branch
master
- 5514e8d2...2a72a13d - 3 earlier commits
- 1a344d3e - Move the CI_PAGES_ variables logic to URL builder
- 5bec8e83 - Add tests to build spec
- 48bcd756 - use scoped_variables to escape infinite loop
- c712edfa - remove variable test from project spec
- 9c19d55d - refactor url_builder for better readability
- a70172d8 - Fix linting errors
- 7d548dba - Refactor for readability
- 6e6711df - Fix failing build tests
- 97b5f5df - Add specs for project methods
- 28d59e51 - Fix failing project_spec
Toggle commit list-
7cb8b5d4...5514e8d2 - 3868 commits from branch
added 6 commits
-
28d59e51...eb297634 - 4 commits from branch
master
- 80507682 - Fix CI_PAGES_DOMAIN and CI_PAGES_URL for parallel deployments
- 735c818d - Introduce fix_pages_ci_variables feature flag
-
28d59e51...eb297634 - 4 commits from branch
- A deleted user
added feature flag label
added 275 commits
-
735c818d...f86b0540 - 273 commits from branch
master
- f479e636 - Fix CI_PAGES_DOMAIN and CI_PAGES_URL for parallel deployments
- 8f7de7a2 - Introduce fix_pages_ci_variables feature flag
-
735c818d...f86b0540 - 273 commits from branch
added 1 commit
- e7144894 - Fix CI_PAGES_DOMAIN and CI_PAGES_URL for parallel deployments
requested review from @ngala
- Resolved by Janis Altherr
- Resolved by Janis Altherr
- Resolved by Janis Altherr
- Resolved by Naman Jagdish Gala
- Resolved by Naman Jagdish Gala
- Resolved by Janis Altherr
@janis Thank you for all the efforts here. I have left two questions and two recommendations in my review, covering topics such as environment conditions, namespace functionality, and testing considerations.
changed milestone to %17.7
added missed:17.6 label
requested review from @ngala
- Resolved by Janis Altherr
@msedlakjakubowski, would you do a Technical Writing review here?
requested review from @msedlakjakubowski
added twfinished workflowin review labels and removed twtriaged workflowin dev labels
removed review request for @msedlakjakubowski
requested review from @pskorupa
- Resolved by Naman Jagdish Gala
removed review request for @kassio
requested review from @ngala
- Resolved by Janis Altherr
added pipeline:mr-approved label
added pipelinetier-2 label
- Resolved by Janis Altherr
- Resolved by Janis Altherr
mentioned in issue #507423 (closed)
requested review from @pedropombeiro
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
I see
@grzesiek
is stillbusy
, @pedropombeiro would you have time for a ~verify review instead?
removed review request for @grzesiek
- Resolved by Janis Altherr
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
- Resolved by Janis Altherr
- Resolved by Janis Altherr
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
- Resolved by Janis Altherr
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
- Resolved by Pedro Pombeiro (OOO from Feb 17th-21st)
requested review from @pedropombeiro
added pipelinetier-3 pipeline:run-e2e-omnibus-once labels and removed pipelinetier-2 label
Before you set this MR to auto-merge
This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.
Before you set this MR to auto-merge, please check the following:
- You are the last maintainer of this merge request
- The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
- This pipeline is recent enough (created in the last 8 hours)
If all the criteria above apply, please set auto-merge for this merge request.
See pipeline tiers and merging a merge request for more details.
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 08f2cdecexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Verify | 84 | 0 | 2 | 0 | 86 | ✅ | | Create | 232 | 0 | 4 | 0 | 236 | ✅ | | Plan | 150 | 0 | 0 | 0 | 150 | ✅ | | Package | 50 | 0 | 0 | 0 | 50 | ✅ | | Govern | 136 | 0 | 6 | 0 | 142 | ✅ | | Monitor | 16 | 0 | 0 | 0 | 16 | ✅ | | Data Stores | 62 | 0 | 0 | 0 | 62 | ✅ | | Secure | 8 | 0 | 0 | 0 | 8 | ✅ | | Release | 10 | 0 | 0 | 0 | 10 | ✅ | | Fulfillment | 2 | 0 | 0 | 0 | 2 | ✅ | | Manage | 2 | 0 | 0 | 0 | 2 | ✅ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 754 | 0 | 12 | 0 | 766 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-test-on-cng:
test report for 08f2cdecexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Plan | 86 | 0 | 8 | 0 | 94 | ✅ | | Verify | 49 | 0 | 16 | 0 | 65 | ✅ | | Govern | 84 | 0 | 9 | 1 | 93 | ✅ | | Create | 140 | 0 | 20 | 1 | 160 | ✅ | | Data Stores | 33 | 0 | 10 | 0 | 43 | ✅ | | Secure | 2 | 0 | 5 | 0 | 7 | ✅ | | Growth | 0 | 0 | 2 | 0 | 2 | ➖ | | Package | 24 | 0 | 14 | 0 | 38 | ✅ | | Configure | 0 | 0 | 3 | 0 | 3 | ➖ | | Release | 5 | 0 | 1 | 0 | 6 | ✅ | | Manage | 1 | 0 | 9 | 0 | 10 | ✅ | | Fulfillment | 2 | 0 | 7 | 1 | 9 | ✅ | | Ai-powered | 0 | 0 | 2 | 0 | 2 | ➖ | | Monitor | 8 | 0 | 12 | 0 | 20 | ✅ | | Analytics | 2 | 0 | 0 | 1 | 2 | ✅ | | ModelOps | 0 | 0 | 1 | 0 | 1 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 436 | 0 | 119 | 4 | 555 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
requested review from @pskorupa
reset approvals from @pedropombeiro by pushing to the branch
added 3803 commits
-
a94e0c49...d168e5f2 - 3802 commits from branch
master
- 6c167333 - Merge branch 'master' into '416493-expose-the-versioned-pages-site-url-during-the-ci-build'
-
a94e0c49...d168e5f2 - 3802 commits from branch
reset approvals from @pskorupa by pushing to the branch
added 1 commit
- 08f2cdec - Disable code coverage test for overriden method
requested review from @pskorupa
requested review from @pedropombeiro
added this merge request to the merge train at position 2
removed this merge request from the merge train because the pipeline did not succeed. Learn more.
started a merge train
mentioned in commit 5ac69f51
added workflowstaging-canary label and removed workflowin review label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
mentioned in commit 1221635a
mentioned in merge request !175216 (closed)
mentioned in issue #508608 (closed)
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
mentioned in merge request !175256 (merged)
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in issue gitlab-org/quality/triage-reports#21527 (closed)
mentioned in issue #513154 (closed)
mentioned in merge request !178174 (merged)
mentioned in merge request !178987 (merged)
mentioned in issue gitlab-org/quality/triage-reports#22025 (closed)