Skip to content
Snippets Groups Projects
Commit 8713b704 authored by Alex Ives's avatar Alex Ives :speech_balloon:
Browse files

Bump tested pg versions in preparation of pg14

- Adds postgres 14 based spec runs to nightly
- Makes postgres 13 the default testing version
- Adds postgres 12 database library specs
- Moves postgres 12 tests to nightly
- Updates helpers and docs that mention pg12 pipelines to reference pg13/pg14
parent 92b85f42
No related branches found
No related tags found
No related merge requests found
Pipeline #812368784 failed
This commit is part of merge request !114624. Comments created here will be created in the context of that merge request.
Showing
with 444 additions and 297 deletions
...@@ -130,7 +130,7 @@ workflow: ...@@ -130,7 +130,7 @@ workflow:
PIPELINE_NAME: 'Ruby 3 $CI_COMMIT_BRANCH branch pipeline' PIPELINE_NAME: 'Ruby 3 $CI_COMMIT_BRANCH branch pipeline'
variables: variables:
PG_VERSION: "12" PG_VERSION: "13"
DEFAULT_CI_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}.patched-golang-${GO_VERSION}-rust-${RUST_VERSION}-node-16.14-postgresql-${PG_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-yarn-1.22-graphicsmagick-1.3.36" DEFAULT_CI_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}.patched-golang-${GO_VERSION}-rust-${RUST_VERSION}-node-16.14-postgresql-${PG_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-yarn-1.22-graphicsmagick-1.3.36"
# We set $GITLAB_DEPENDENCY_PROXY to another variable (since it's set at the group level and has higher precedence than .gitlab-ci.yml) # We set $GITLAB_DEPENDENCY_PROXY to another variable (since it's set at the group level and has higher precedence than .gitlab-ci.yml)
# so that we can override $GITLAB_DEPENDENCY_PROXY_ADDRESS in workflow rules. # so that we can override $GITLAB_DEPENDENCY_PROXY_ADDRESS in workflow rules.
......
...@@ -4,7 +4,7 @@ templates-shellcheck: ...@@ -4,7 +4,7 @@ templates-shellcheck:
- .default-before_script - .default-before_script
- .default-retry - .default-retry
- .ruby-cache - .ruby-cache
- .use-pg13 - .use-pg14
stage: test stage: test
needs: needs:
- setup-test-env - setup-test-env
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- .default-retry - .default-retry
- .rails-cache - .rails-cache
- .default-before_script - .default-before_script
- .use-pg12 - .use-pg13
stage: test stage: test
needs: ["setup-test-env"] needs: ["setup-test-env"]
variables: variables:
...@@ -29,7 +29,7 @@ run-dev-fixtures-ee: ...@@ -29,7 +29,7 @@ run-dev-fixtures-ee:
extends: extends:
- .run-dev-fixtures - .run-dev-fixtures
- .dev-fixtures:rules:ee-only - .dev-fixtures:rules:ee-only
- .use-pg12-es7-ee - .use-pg13-es7-ee
script: script:
- cp ee/db/fixtures/development/* $FIXTURE_PATH - cp ee/db/fixtures/development/* $FIXTURE_PATH
- *run-dev-fixtures-script - *run-dev-fixtures-script
...@@ -142,7 +142,7 @@ retrieve-frontend-fixtures: ...@@ -142,7 +142,7 @@ retrieve-frontend-fixtures:
- .default-retry - .default-retry
- .default-before_script - .default-before_script
- .rails-cache - .rails-cache
- .use-pg12 - .use-pg13
stage: fixtures stage: fixtures
needs: ["setup-test-env", "retrieve-tests-metadata"] needs: ["setup-test-env", "retrieve-tests-metadata"]
variables: variables:
......
...@@ -2,7 +2,7 @@ glfm-verify: ...@@ -2,7 +2,7 @@ glfm-verify:
extends: extends:
- .rails-job-base - .rails-job-base
- .glfm:rules:glfm-verify - .glfm:rules:glfm-verify
- .use-pg12 - .use-pg13
stage: test stage: test
needs: ["setup-test-env"] needs: ["setup-test-env"]
script: script:
......
...@@ -229,7 +229,6 @@ ...@@ -229,7 +229,6 @@
- *node-modules-cache # We don't push this cache as it's already rebuilt by `update-assets-compile-*-cache` - *node-modules-cache # We don't push this cache as it's already rebuilt by `update-assets-compile-*-cache`
- *storybook-node-modules-cache-push - *storybook-node-modules-cache-push
.use-pg12: .use-pg12:
services: services:
- name: postgres:12 - name: postgres:12
...@@ -248,6 +247,15 @@ ...@@ -248,6 +247,15 @@
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "13" PG_VERSION: "13"
.use-pg14:
services:
- name: postgres:14
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.2-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "14"
.use-pg12-es7-ee: .use-pg12-es7-ee:
services: services:
- name: postgres:12 - name: postgres:12
...@@ -278,9 +286,24 @@ ...@@ -278,9 +286,24 @@
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
.use-pg12-es8-ee: .use-pg14-es7-ee:
services: services:
- name: postgres:12 - name: postgres:14
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.2-alpine
- name: elasticsearch:7.17.6
command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "14"
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
.use-pg13-es8-ee:
services:
- name: postgres:13
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.0-alpine - name: redis:6.0-alpine
- name: elasticsearch:8.6.2 - name: elasticsearch:8.6.2
...@@ -288,15 +311,15 @@ ...@@ -288,15 +311,15 @@
alias: zoekt-ci-image alias: zoekt-ci-image
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "12" PG_VERSION: "13"
ES_SETTING_DISCOVERY_TYPE: "single-node" ES_SETTING_DISCOVERY_TYPE: "single-node"
ES_SETTING_XPACK_SECURITY_ENABLED: "false" ES_SETTING_XPACK_SECURITY_ENABLED: "false"
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
.use-pg12-opensearch1-ee: .use-pg13-opensearch1-ee:
services: services:
- name: postgres:12 - name: postgres:13
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.0-alpine - name: redis:6.0-alpine
- name: opensearchproject/opensearch:1.3.5 - name: opensearchproject/opensearch:1.3.5
...@@ -306,13 +329,13 @@ ...@@ -306,13 +329,13 @@
alias: zoekt-ci-image alias: zoekt-ci-image
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "12" PG_VERSION: "13"
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
.use-pg12-opensearch2-ee: .use-pg13-opensearch2-ee:
services: services:
- name: postgres:12 - name: postgres:13
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.0-alpine - name: redis:6.0-alpine
- name: opensearchproject/opensearch:2.2.1 - name: opensearchproject/opensearch:2.2.1
...@@ -322,7 +345,7 @@ ...@@ -322,7 +345,7 @@
alias: zoekt-ci-image alias: zoekt-ci-image
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "12" PG_VERSION: "13"
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
......
...@@ -20,7 +20,7 @@ memory-on-boot: ...@@ -20,7 +20,7 @@ memory-on-boot:
extends: extends:
- .only-code-memory-job-base - .only-code-memory-job-base
- .production - .production
- .use-pg12 - .use-pg13
stage: test stage: test
needs: ["setup-test-env", "compile-test-assets"] needs: ["setup-test-env", "compile-test-assets"]
variables: variables:
......
...@@ -23,7 +23,7 @@ rails-production-server-boot: ...@@ -23,7 +23,7 @@ rails-production-server-boot:
- .production - .production
- .ruby-cache - .ruby-cache
- .setup:rules:rails-production-server-boot - .setup:rules:rails-production-server-boot
- .use-pg12 - .use-pg13
variables: variables:
BUNDLE_WITHOUT: "development:test" BUNDLE_WITHOUT: "development:test"
BUNDLE_WITH: "production" BUNDLE_WITH: "production"
......
This diff is collapsed.
...@@ -22,7 +22,7 @@ dont-interrupt-me: ...@@ -22,7 +22,7 @@ dont-interrupt-me:
- echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible." - echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible."
.base-rspec-foss-impact: .base-rspec-foss-impact:
extends: .rspec-base-pg12-as-if-foss extends: .rspec-base-pg13-as-if-foss
needs: needs:
- pipeline: $PARENT_PIPELINE_ID - pipeline: $PARENT_PIPELINE_ID
job: detect-tests job: detect-tests
......
...@@ -105,11 +105,16 @@ include: ...@@ -105,11 +105,16 @@ include:
- .rspec-base - .rspec-base
- .use-pg12 - .use-pg12
.rspec-base-pg12-as-if-foss: .rspec-base-pg13:
extends:
- .rspec-base
- .use-pg13
.rspec-base-pg13-as-if-foss:
extends: extends:
- .rspec-base - .rspec-base
- .as-if-foss - .as-if-foss
- .use-pg12 - .use-pg13
needs: needs:
- job: "setup-test-env" - job: "setup-test-env"
- job: "retrieve-tests-metadata" - job: "retrieve-tests-metadata"
...@@ -117,44 +122,49 @@ include: ...@@ -117,44 +122,49 @@ include:
- job: "detect-tests" - job: "detect-tests"
optional: true optional: true
.rspec-base-pg13: .rspec-base-pg14:
extends: extends:
- .rspec-base - .rspec-base
- .use-pg13 - .use-pg14
.rspec-ee-base-pg12: .rspec-ee-base-pg12:
extends: extends:
- .rspec-base - .rspec-base
- .use-pg12-es7-ee - .use-pg12-es7-ee
.rspec-ee-base-pg12-es8: .rspec-ee-base-pg13:
extends:
- .rspec-base
- .use-pg13-es7-ee
.rspec-ee-base-pg13-es8:
extends: extends:
- .rspec-base - .rspec-base
- .use-pg12-es8-ee - .use-pg13-es8-ee
- .rails:rules:run-search-tests - .rails:rules:run-search-tests
.rspec-ee-base-pg12-opensearch1: .rspec-ee-base-pg13-opensearch1:
extends: extends:
- .rspec-base - .rspec-base
- .use-pg12-opensearch1-ee - .use-pg13-opensearch1-ee
- .rails:rules:run-search-tests - .rails:rules:run-search-tests
.rspec-ee-base-pg12-opensearch2: .rspec-ee-base-pg13-opensearch2:
extends: extends:
- .rspec-base - .rspec-base
- .use-pg12-opensearch2-ee - .use-pg13-opensearch2-ee
- .rails:rules:run-search-tests - .rails:rules:run-search-tests
.rspec-ee-base-pg13: .rspec-ee-base-pg14:
extends: extends:
- .rspec-base - .rspec-base
- .use-pg13-es7-ee - .use-pg14-es7-ee
.db-job-base: .db-job-base:
extends: extends:
- .rails-job-base - .rails-job-base
- .rails:rules:ee-and-foss-migration - .rails:rules:ee-and-foss-migration
- .use-pg12 - .use-pg13
stage: test stage: test
needs: ["setup-test-env"] needs: ["setup-test-env"]
# rspec job base specs # rspec job base specs
......
...@@ -85,6 +85,9 @@ ...@@ -85,6 +85,9 @@
.if-merge-request-labels-run-review-app: &if-merge-request-labels-run-review-app .if-merge-request-labels-run-review-app: &if-merge-request-labels-run-review-app
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-review-app/' if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-review-app/'
.if-merge-request-labels-run-on-pg12: &if-merge-request-labels-run-on-pg12
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-on-pg12/'
.if-merge-request-labels-skip-undercoverage: &if-merge-request-labels-skip-undercoverage .if-merge-request-labels-skip-undercoverage: &if-merge-request-labels-skip-undercoverage
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:skip-undercoverage/' if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:skip-undercoverage/'
...@@ -1662,6 +1665,7 @@ ...@@ -1662,6 +1665,7 @@
- <<: *if-default-refs - <<: *if-default-refs
changes: *db-library-patterns changes: *db-library-patterns
- <<: *if-merge-request-labels-run-all-rspec - <<: *if-merge-request-labels-run-all-rspec
- <<: *if-merge-request-labels-run-on-pg12
.rails:rules:ee-mr-and-default-branch-only: .rails:rules:ee-mr-and-default-branch-only:
rules: rules:
...@@ -1751,6 +1755,11 @@ ...@@ -1751,6 +1755,11 @@
- <<: *if-merge-request - <<: *if-merge-request
changes: *backend-patterns changes: *backend-patterns
.rails:rules:rspec-on-pg12:
rules:
- <<: *if-merge-request-labels-run-on-pg12
- !reference [".rails:rules:default-branch-schedule-nightly--code-backstage-default-rules", rules]
.rails:rules:default-branch-schedule-nightly--code-backstage-default-rules: .rails:rules:default-branch-schedule-nightly--code-backstage-default-rules:
rules: rules:
- <<: *if-default-branch-schedule-nightly - <<: *if-default-branch-schedule-nightly
......
...@@ -83,7 +83,7 @@ verify-approvals: ...@@ -83,7 +83,7 @@ verify-approvals:
generate-frontend-fixtures-mapping: generate-frontend-fixtures-mapping:
extends: extends:
- .setup:rules:generate-frontend-fixtures-mapping - .setup:rules:generate-frontend-fixtures-mapping
- .use-pg12 - .use-pg13
- .rails-cache - .rails-cache
needs: ["setup-test-env"] needs: ["setup-test-env"]
stage: prepare stage: prepare
......
...@@ -45,7 +45,7 @@ static-verification-with-database: ...@@ -45,7 +45,7 @@ static-verification-with-database:
- .static-analysis-base - .static-analysis-base
- .rubocop-job-cache - .rubocop-job-cache
- .static-analysis:rules:static-verification-with-database - .static-analysis:rules:static-verification-with-database
- .use-pg12 - .use-pg13
script: script:
- bundle exec rake lint:static_verification_with_database - bundle exec rake lint:static_verification_with_database
variables: variables:
......
...@@ -32,17 +32,17 @@ update-tests-metadata: ...@@ -32,17 +32,17 @@ update-tests-metadata:
- retrieve-tests-metadata - retrieve-tests-metadata
- generate-frontend-fixtures-mapping - generate-frontend-fixtures-mapping
- setup-test-env - setup-test-env
- rspec migration pg12 - rspec migration pg13
- rspec-all frontend_fixture - rspec-all frontend_fixture
- rspec unit pg12 - rspec unit pg13
- rspec integration pg12 - rspec integration pg13
- rspec system pg12 - rspec system pg13
- rspec background_migration pg12 - rspec background_migration pg13
- rspec-ee migration pg12 - rspec-ee migration pg13
- rspec-ee unit pg12 - rspec-ee unit pg13
- rspec-ee integration pg12 - rspec-ee integration pg13
- rspec-ee system pg12 - rspec-ee system pg13
- rspec-ee background_migration pg12 - rspec-ee background_migration pg13
script: script:
- run_timed_command "retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document" - run_timed_command "retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document"
- source ./scripts/rspec_helpers.sh - source ./scripts/rspec_helpers.sh
......
...@@ -150,8 +150,8 @@ This number can be overridden by setting a CI/CD variable named `RSPEC_FAIL_FAST ...@@ -150,8 +150,8 @@ This number can be overridden by setting a CI/CD variable named `RSPEC_FAIL_FAST
## Re-run previously failed tests in merge request pipelines ## Re-run previously failed tests in merge request pipelines
In order to reduce the feedback time after resolving failed tests for a merge request, the `rspec rspec-pg12-rerun-previous-failed-tests` In order to reduce the feedback time after resolving failed tests for a merge request, the `rspec rspec-pg13-rerun-previous-failed-tests`
and `rspec rspec-ee-pg12-rerun-previous-failed-tests` jobs run the failed tests from the previous MR pipeline. and `rspec rspec-ee-pg13-rerun-previous-failed-tests` jobs run the failed tests from the previous MR pipeline.
This was introduced on August 25th 2021, with <https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69053>. This was introduced on August 25th 2021, with <https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69053>.
...@@ -159,7 +159,7 @@ This was introduced on August 25th 2021, with <https://gitlab.com/gitlab-org/git ...@@ -159,7 +159,7 @@ This was introduced on August 25th 2021, with <https://gitlab.com/gitlab-org/git
1. The `detect-previous-failed-tests` job (`prepare` stage) detects the test files associated with failed RSpec 1. The `detect-previous-failed-tests` job (`prepare` stage) detects the test files associated with failed RSpec
jobs from the previous MR pipeline. jobs from the previous MR pipeline.
1. The `rspec rspec-pg12-rerun-previous-failed-tests` and `rspec rspec-ee-pg12-rerun-previous-failed-tests` jobs 1. The `rspec rspec-pg13-rerun-previous-failed-tests` and `rspec rspec-ee-pg13-rerun-previous-failed-tests` jobs
will run the test files gathered by the `detect-previous-failed-tests` job. will run the test files gathered by the `detect-previous-failed-tests` job.
```mermaid ```mermaid
...@@ -169,8 +169,8 @@ graph LR ...@@ -169,8 +169,8 @@ graph LR
end end
subgraph "test stage"; subgraph "test stage";
B["rspec rspec-pg12-rerun-previous-failed-tests"]; B["rspec rspec-pg13-rerun-previous-failed-tests"];
C["rspec rspec-ee-pg12-rerun-previous-failed-tests"]; C["rspec rspec-ee-pg13-rerun-previous-failed-tests"];
end end
A --"artifact: list of test files"--> B & C A --"artifact: list of test files"--> B & C
...@@ -483,20 +483,22 @@ This should let us: ...@@ -483,20 +483,22 @@ This should let us:
### PostgreSQL versions testing ### PostgreSQL versions testing
Our test suite runs against PG12 as GitLab.com runs on PG12 and Our test suite runs against PG13 as GitLab.com runs on PG13 and
[Omnibus defaults to PG12 for new installs and upgrades](../../administration/package_information/postgresql_versions.md). [Omnibus defaults to PG13 for new installs and upgrades](../../administration/package_information/postgresql_versions.md).
We do run our test suite against PG13 on nightly scheduled pipelines. We do run our test suite against PG13 on nightly scheduled pipelines.
We also run our test suite against PG13 upon specific database library changes in MRs and `main` pipelines (with the `rspec db-library-code pg13` job).
#### Current versions testing #### Current versions testing
| Where? | PostgreSQL version | Ruby version | | Where? | PostgreSQL version | Ruby version |
|------------------------------------------------------------------------------------------------|--------------------------|-----------------------| |------------------------------------------------------------------------------------------------|-------------------------------------------------|-----------------------|
| Merge requests | 12 (default version) | 3.0 (default version) | | Merge requests | 13 (default version), 12 for DB library changes | 3.0 (default version) |
| `master` branch commits | 12 (default version) | 3.0 (default version) | | `master` branch commits | 13 (default version), 12 for DB library changes | 3.0 (default version) |
| `maintenance` scheduled pipelines for the `master` branch (every even-numbered hour) | 12 (default version) | 3.0 (default version) | | `maintenance` scheduled pipelines for the `master` branch (every even-numbered hour) | 13 (default version), 12 for DB library changes | 3.0 (default version) |
| `maintenance` scheduled pipelines for the `ruby2` branch (every odd-numbered hour), see below. | 12 (default version) | 2.7 | | `maintenance` scheduled pipelines for the `ruby2` branch (every odd-numbered hour), see below. | 13 (default version), 12 for DB library changes | 2.7 |
| `nightly` scheduled pipelines for the `master` branch | 12 (default version), 13 | 3.0 (default version) | | `nightly` scheduled pipelines for the `master` branch | 13 (default version), 12, 14 | 3.0 (default version) |
There are 2 pipeline schedules used for testing Ruby 2.7. One is triggering a There are 2 pipeline schedules used for testing Ruby 2.7. One is triggering a
pipeline in `ruby2-sync` branch, which updates the `ruby2` branch with latest pipeline in `ruby2-sync` branch, which updates the `ruby2` branch with latest
...@@ -511,15 +513,6 @@ The `gitlab` job in the `ruby2-sync` branch uses a `gitlab-org/gitlab` project ...@@ -511,15 +513,6 @@ The `gitlab` job in the `ruby2-sync` branch uses a `gitlab-org/gitlab` project
token with `write_repository` scope and `Maintainer` role with no expiration. token with `write_repository` scope and `Maintainer` role with no expiration.
The token is stored in the `RUBY2_SYNC_TOKEN` variable in `gitlab-org/gitlab`. The token is stored in the `RUBY2_SYNC_TOKEN` variable in `gitlab-org/gitlab`.
#### Long-term plan
We follow the [PostgreSQL versions shipped with Omnibus GitLab](../../administration/package_information/postgresql_versions.md):
| PostgreSQL version | 14.1 (July 2021) | 14.2 (August 2021) | 14.3 (September 2021) | 14.4 (October 2021) | 14.5 (November 2021) | 14.6 (December 2021) |
| -------------------| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
| PG12 | MRs/`2-hour`/`nightly` | MRs/`2-hour`/`nightly` | MRs/`2-hour`/`nightly` | MRs/`2-hour`/`nightly` | MRs/`2-hour`/`nightly` | MRs/`2-hour`/`nightly` |
| PG13 | `nightly` | `nightly` | `nightly` | `nightly` | `nightly` | `nightly` |
### Redis versions testing ### Redis versions testing
Our test suite runs against Redis 6 as GitLab.com runs on Redis 6 and Our test suite runs against Redis 6 as GitLab.com runs on Redis 6 and
......
...@@ -136,10 +136,10 @@ that are scoped to a single [configuration keyword](../../ci/yaml/index.md#job-k ...@@ -136,10 +136,10 @@ that are scoped to a single [configuration keyword](../../ci/yaml/index.md#job-k
| `.qa-cache` | Allows a job to use a default `cache` definition suitable for QA tasks. | | `.qa-cache` | Allows a job to use a default `cache` definition suitable for QA tasks. |
| `.yarn-cache` | Allows a job to use a default `cache` definition suitable for frontend jobs that do a `yarn install`. | | `.yarn-cache` | Allows a job to use a default `cache` definition suitable for frontend jobs that do a `yarn install`. |
| `.assets-compile-cache` | Allows a job to use a default `cache` definition suitable for frontend jobs that compile assets. | | `.assets-compile-cache` | Allows a job to use a default `cache` definition suitable for frontend jobs that compile assets. |
| `.use-pg12` | Allows a job to use the `postgres` 12 and `redis` services (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific versions of the services). |
| `.use-pg12-ee` | Same as `.use-pg12` but also use an `elasticsearch` service (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific version of the service). |
| `.use-pg13` | Allows a job to use the `postgres` 13 and `redis` services (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific versions of the services). | | `.use-pg13` | Allows a job to use the `postgres` 13 and `redis` services (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific versions of the services). |
| `.use-pg13-ee` | Same as `.use-pg13` but also use an `elasticsearch` service (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific version of the service). | | `.use-pg13-ee` | Same as `.use-pg13` but also use an `elasticsearch` service (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific version of the service). |
| `.use-pg14` | Allows a job to use the `postgres` 14 and `redis` services (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific versions of the services). |
| `.use-pg14-ee` | Same as `.use-pg14` but also use an `elasticsearch` service (see [`.gitlab/ci/global.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/global.gitlab-ci.yml) for the specific version of the service). |
| `.use-kaniko` | Allows a job to use the `kaniko` tool to build Docker images. | | `.use-kaniko` | Allows a job to use the `kaniko` tool to build Docker images. |
| `.as-if-foss` | Simulate the FOSS project by setting the `FOSS_ONLY='1'` CI/CD variable. | | `.as-if-foss` | Simulate the FOSS project by setting the `FOSS_ONLY='1'` CI/CD variable. |
| `.use-docker-in-docker` | Allows a job to use Docker in Docker. | | `.use-docker-in-docker` | Allows a job to use Docker in Docker. |
......
...@@ -12,8 +12,8 @@ class FailedTests ...@@ -12,8 +12,8 @@ class FailedTests
previous_tests_report_path: 'test_results/previous/test_reports.json', previous_tests_report_path: 'test_results/previous/test_reports.json',
output_directory: 'tmp/previous_failed_tests/', output_directory: 'tmp/previous_failed_tests/',
format: :oneline, format: :oneline,
rspec_pg_regex: /rspec .+ pg12( .+)?/, rspec_pg_regex: /rspec .+ pg13( .+)?/,
rspec_ee_pg_regex: /rspec-ee .+ pg12( .+)?/ rspec_ee_pg_regex: /rspec-ee .+ pg13( .+)?/
}.freeze }.freeze
def initialize(options) def initialize(options)
......
...@@ -163,7 +163,7 @@ function rspec_paralellized_job() { ...@@ -163,7 +163,7 @@ function rspec_paralellized_job() {
read -ra job_name <<< "${CI_JOB_NAME}" read -ra job_name <<< "${CI_JOB_NAME}"
local test_tool="${job_name[0]}" local test_tool="${job_name[0]}"
local test_level="${job_name[1]}" local test_level="${job_name[1]}"
local report_name=$(echo "${CI_JOB_NAME}" | sed -E 's|[/ ]|_|g') # e.g. 'rspec unit pg12 1/24' would become 'rspec_unit_pg12_1_24' local report_name=$(echo "${CI_JOB_NAME}" | sed -E 's|[/ ]|_|g') # e.g. 'rspec unit pg13 1/24' would become 'rspec_unit_pg13_1_24'
local rspec_opts="${1:-}" local rspec_opts="${1:-}"
local rspec_tests_mapping_enabled="${RSPEC_TESTS_MAPPING_ENABLED:-}" local rspec_tests_mapping_enabled="${RSPEC_TESTS_MAPPING_ENABLED:-}"
local spec_folder_prefixes="" local spec_folder_prefixes=""
...@@ -187,7 +187,7 @@ function rspec_paralellized_job() { ...@@ -187,7 +187,7 @@ function rspec_paralellized_job() {
export KNAPSACK_REPORT_PATH="${knapsack_folder_path}${report_name}_report.json" export KNAPSACK_REPORT_PATH="${knapsack_folder_path}${report_name}_report.json"
# There's a bug where artifacts are sometimes not downloaded. Since specs can run without the Knapsack report, we can # There's a bug where artifacts are sometimes not downloaded. Since specs can run without the Knapsack report, we can
# handle the missing artifact gracefully here. See https://gitlab.com/gitlab-org/gitlab/-/issues/212349. # handle the missing artifact gracefully here. See https://gitlab.com/gitlab-org/gitlab/-/issues/213349.
if [[ ! -f "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" ]]; then if [[ ! -f "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" ]]; then
echo "{}" > "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" echo "{}" > "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}"
fi fi
...@@ -241,7 +241,7 @@ function retry_failed_rspec_examples() { ...@@ -241,7 +241,7 @@ function retry_failed_rspec_examples() {
# Keep track of the tests that are retried, later consolidated in a single file by the `rspec:flaky-tests-report` job # Keep track of the tests that are retried, later consolidated in a single file by the `rspec:flaky-tests-report` job
local failed_examples=$(grep " failed" ${RSPEC_LAST_RUN_RESULTS_FILE}) local failed_examples=$(grep " failed" ${RSPEC_LAST_RUN_RESULTS_FILE})
local report_name=$(echo "${CI_JOB_NAME}" | sed -E 's|[/ ]|_|g') # e.g. 'rspec unit pg12 1/24' would become 'rspec_unit_pg12_1_24' local report_name=$(echo "${CI_JOB_NAME}" | sed -E 's|[/ ]|_|g') # e.g. 'rspec unit pg13 1/24' would become 'rspec_unit_pg13_1_24'
local rspec_flaky_folder_path="$(dirname "${FLAKY_RSPEC_SUITE_REPORT_PATH}")/" local rspec_flaky_folder_path="$(dirname "${FLAKY_RSPEC_SUITE_REPORT_PATH}")/"
export RETRIED_TESTS_REPORT_PATH="${rspec_flaky_folder_path}retried_tests_${report_name}_report.txt" export RETRIED_TESTS_REPORT_PATH="${rspec_flaky_folder_path}retried_tests_${report_name}_report.txt"
......
{ {
"suites": [ "suites": [
{ {
"name": "rspec unit pg12", "name": "rspec unit pg13",
"total_time": 975.6635620000018, "total_time": 975.6635620000018,
"total_count": 3811, "total_count": 3811,
"success_count": 3800, "success_count": 3800,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment