Add Multiversion support to Pages internal API
What does this MR do and why?
Add Multiversion support to Pages internal API
With the work to introduce Gitlab Pages Multiple Versions, a project
now have to support multiple PagesDeployment
at the same time.
For this reason, instead of using
ProjectPagesMetadatum#pages_deployment_id
to identify valid deployment
the PagesDeployment#deleted_at
field was introduced.
Now, when multiple versions is enabled for the project, we're making all
the active PagesDeployment
available to GitLab Pages render.
Related to: #416494 (closed)
Changelog: changed
PS.: A big portion of the original change was extracted to: Serve pages deployments without going through P... (!135993 - merged)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Screen_Recording_2023-11-13_at_18.54.27
- I tried to edit the file without in edit mode
- The 404 in the recording is because I was faster the the deploy itself, that's why the reload made it work.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- You need a license (https://about.gitlab.com/handbook/developer-onboarding/#working-on-gitlab-ee-developer-licenses)
- You need GitLab Runner (https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/runner.md?ref_type=heads)
- Enable
pages_multiple_versions_setting
feature flag - Create a public project using the
html
template (root/html
for example)- the reason to be public is to avoid having to set Access Control
- Run the pipeline on that project (to ensure the pages is created)
- Navigate to
Settings > Pages
(http://gdk.test:3000/root/html/pages
, for example)- Disable
Force HTTPS (requires valid certificates)
- Enable
Use multiple versions
- [optional] Click on the
Access pages
URL to see your GitLab Pages site
- Disable
- Edit your
gitlab-ci.yml
adding thepages_path_prefix
to thepages
job:image: busybox pages: stage: deploy pages: path_prefix: "$PAGES_PREFIX" artifacts: paths: - public script: - echo "This pages version will have this prefix > $PAGES_PREFIX <" - echo "Pages accessible through > ${CI_PAGES_URL}/${PAGES_PREFIX} <" variables: PAGES_PREFIX: "" # no prefix by default (master) rules: - if: $CI_COMMIT_BRANCH == "master" # ensure to run on master (with default PAGES_PREFIX) - if: $CI_PIPELINE_SOURCE == "merge_request_event" # conditionally change the prefix on Merge Requests variables: PAGES_PREFIX: 'mr$CI_MERGE_REQUEST_IID' # prefix with the mr<iid>, like `mr123`
- Create a merge request editing the
public/index.html
file - When the merge request pipeline finishes, access the pages link printed on the
pages
job output. It looks something like (with mr at the end):http://root.pages.gdk.test:3000/html/mr1
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %16.5
assigned to @kassio
- A deleted user
added backend databasereview pending labels
Allure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 79a84329expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Verify | 32 | 0 | 0 | 0 | 32 | ✅ | | Create | 40 | 0 | 7 | 0 | 47 | ✅ | | Govern | 57 | 0 | 0 | 0 | 57 | ✅ | | Data Stores | 22 | 0 | 0 | 0 | 22 | ✅ | | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | | Plan | 55 | 0 | 0 | 0 | 55 | ✅ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 214 | 0 | 10 | 0 | 224 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
added 127 commits
-
ebf45aa2...c1aeb05c - 126 commits from branch
master
- 4ec2a67e - Add Multiversion support to Pages internal API
-
ebf45aa2...c1aeb05c - 126 commits from branch
added 224 commits
-
4ec2a67e...df79753a - 223 commits from branch
master
- 42d46552 - Add Multiversion support to Pages internal API
-
4ec2a67e...df79753a - 223 commits from branch
added 59 commits
-
42d46552...04290d90 - 58 commits from branch
master
- be4d915e - Add Multiversion support to Pages internal API
-
42d46552...04290d90 - 58 commits from branch
added 79 commits
-
be4d915e...fce5a1b5 - 78 commits from branch
master
- 9607e649 - Add Multiversion support to Pages internal API
-
be4d915e...fce5a1b5 - 78 commits from branch
added 77 commits
-
9607e649...33c234ae - 76 commits from branch
master
- 3f0d8398 - Add Multiversion support to Pages internal API
-
9607e649...33c234ae - 76 commits from branch
added 39 commits
-
3f0d8398...175d2996 - 38 commits from branch
master
- 0657d3b6 - Add Multiversion support to Pages internal API
-
3f0d8398...175d2996 - 38 commits from branch
added 51 commits
-
0657d3b6...60fde97a - 50 commits from branch
master
- d101696b - Add Multiversion support to Pages internal API
-
0657d3b6...60fde97a - 50 commits from branch
added 375 commits
-
d101696b...a59fad6c - 373 commits from branch
master
- 1964d345 - Enable multiple pages jobs
- 634f38ba - Add Multiversion support to Pages internal API
-
d101696b...a59fad6c - 373 commits from branch
added 79 commits
-
634f38ba...4da802e2 - 78 commits from branch
kassio/enable-multiple-pages-jobs
- 53d3f068 - Add Multiversion support to Pages internal API
-
634f38ba...4da802e2 - 78 commits from branch
mentioned in merge request !133624 (closed)
mentioned in issue #428018 (closed)
added 867 commits
- 3c03d38d...0113715f - 857 earlier commits
- b27c39cc - Add Cloud Connector service design doc
- f709170d - Merge branch '425423-cc-service-design-doc' into 'master'
- 75261a84 - Merge branch 'bmarjanovic/add-integration-logo-jira' into 'master'
- d6d6939d - Correct punctuation on the 'Project wikis API' page
- e7673c71 - Merge branch 'docs/323607-update-project-wikis-api-page' into 'master'
- aca5b0ae - Merge branch '416065-migrate-button-danmh' into 'master'
- 0fe2cbbb - Migrate GlDropdown component to use GlCollapsibleListbox
- 706ddd7d - Merge branch 'jivanvl-migrate-minutes-usage-dropdowns' into 'master'
- f95c23e8 - Merge branch 'allow-chevron-clickable-again' into 'master'
- f14709d7 - Add Multiversion support to Pages internal API
Toggle commit listadded 183 commits
-
f14709d7...ae8267e1 - 182 commits from branch
master
- 479756bd - Add Multiversion support to Pages internal API
-
f14709d7...ae8267e1 - 182 commits from branch
changed milestone to %16.6
added missed:16.5 label
added 457 commits
-
479756bd...615ab293 - 456 commits from branch
master
- 92069359 - Add Multiversion support to Pages internal API
-
479756bd...615ab293 - 456 commits from branch
mentioned in merge request !134445 (merged)
added 126 commits
-
92069359...460121c1 - 125 commits from branch
master
- a289f926 - Add Multiversion support to Pages internal API
-
92069359...460121c1 - 125 commits from branch
added 1 commit
- d6dbb22d - Add Multiversion support to Pages internal API
added 305 commits
-
d6dbb22d...0cb6a16c - 304 commits from branch
master
- 53db1ef9 - Add Multiversion support to Pages internal API
-
d6dbb22d...0cb6a16c - 304 commits from branch
added 1149 commits
-
53db1ef9...edfaa1db - 1148 commits from branch
master
- de0477d5 - Add Multiversion support to Pages internal API
-
53db1ef9...edfaa1db - 1148 commits from branch
added 388 commits
-
de0477d5...8c7343d2 - 387 commits from branch
master
- ddaa8cbe - Add Multiversion support to Pages internal API
-
de0477d5...8c7343d2 - 387 commits from branch
added 1 commit
- e87fddda - Add Multiversion support to Pages internal API
added 33 commits
-
e87fddda...c731a23f - 32 commits from branch
master
- c07e20ae - Add Multiversion support to Pages internal API
-
e87fddda...c731a23f - 32 commits from branch
added 52 commits
-
c07e20ae...f4bc6896 - 51 commits from branch
master
- acb55f67 - Add Multiversion support to Pages internal API
-
c07e20ae...f4bc6896 - 51 commits from branch
added 1 commit
- 5b3801ab - Add Multiversion support to Pages internal API
mentioned in commit f57f4486
mentioned in merge request !135993 (merged)
mentioned in commit 8e4f699c
mentioned in commit c7e88dd4
added 24 commits
-
5b3801ab...260fe9fb - 22 commits from branch
master
- c7e88dd4 - Serve pages deployments without going through PagesMetadatum
- 9137fb09 - Add Multiversion support to Pages internal API
-
5b3801ab...260fe9fb - 22 commits from branch
mentioned in commit 7e8b6652
mentioned in commit 0164b926
added 1 commit
- dd9c6b06 - Add Multiversion support to Pages internal API
mentioned in commit 70836192
added 1 commit
- 5df2f036 - Add Multiversion support to Pages internal API
added 1 commit
- eafebc20 - Add Multiversion support to Pages internal API
mentioned in commit 80dc4527
added 1 commit
- c61b97be - Add Multiversion support to Pages internal API
mentioned in commit 8de23c0d
mentioned in commit 8546bcef
mentioned in commit 4529dbca
mentioned in epic &10914
mentioned in commit 82adf3b3
added 146 commits
-
f1bfc9af...82adf3b3 - 145 commits from branch
kassio/get-pages-deployment-directly
- 5a36b6d5 - Add Multiversion support to Pages internal API
-
f1bfc9af...82adf3b3 - 145 commits from branch
mentioned in commit d6a1ce6c
mentioned in commit 0c48f6f3
- Resolved by Kassio Borges
2 Warnings 79a84329: The commit subject must start with a capital letter. For more information, take a look at our Commit message guidelines. featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend @hmerscher
(UTC+1, 1 hour ahead of author)
@mayra-cabrera
(UTC-6, 6 hours behind author)
Please check reviewer's status!
Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangeradded 1169 commits
-
5a36b6d5...5174e399 - 1168 commits from branch
master
- 01dcdd67 - Add Multiversion support to Pages internal API
-
5a36b6d5...5174e399 - 1168 commits from branch
added 13 commits
-
01dcdd67...f0dc0e47 - 12 commits from branch
master
- 9f47d0a8 - Add Multiversion support to Pages internal API
-
01dcdd67...f0dc0e47 - 12 commits from branch
added 13 commits
-
9f47d0a8...bb3eeaea - 12 commits from branch
master
- 71f16758 - Add Multiversion support to Pages internal API
-
9f47d0a8...bb3eeaea - 12 commits from branch
added 1 commit
- eef2b2ce - Add Multiversion support to Pages internal API
- Resolved by Kassio Borges
@janis, could you do the initial review of this one, please?
requested review from @janis
removed databasereview pending label
mentioned in commit 58384757
changed milestone to %16.7
added missed:16.6 label
removed review request for @janis
- Resolved by Vasilii Iakliushin
@janis
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipeline:mr-approved label
- Resolved by Kassio Borges
- Resolved by Kassio Borges
- Resolved by Kassio Borges
@kassio Some end-to-end (E2E) tests should run based on the stage label.
Please start the
trigger-omnibus-and-follow-up-e2e
job in theqa
stage and ensure tests in thefollow-up-e2e:package-and-test-ee
pipeline pass before this MR is merged. (E2E tests are computationally intensive and don't run automatically for every push/rebase, so we ask you to run this job manually at least once.)To run all E2E tests, apply the pipeline:run-all-e2e label and run a new pipeline.
E2E test jobs are allowed to fail due to flakiness. See current failures at the latest pipeline triage issue.
Once done, apply the
emoji on this comment.Team members only: for any questions or help, reach out on the internal
#quality
Slack channel.added pipeline:run-all-rspec label
- Resolved by Vasilii Iakliushin
@vyaklushin, could you do the maintainer review of this one, please?
requested review from @vyaklushin
mentioned in issue gitlab-docs#1732 (closed)
- Resolved by Vasilii Iakliushin
- Resolved by Vasilii Iakliushin
added 1 commit
- 79a84329 - use `find` instead of `select` for better performance
enabled an automatic merge when the pipeline for 10c42b66 succeeds
mentioned in commit a444a9f9
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!2678 (merged)