diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e39fa9c4d76fa069afebc45f3a1c1d55228afcfe..b9442c00e5957a40f569a3c485c37aa6af91f085 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,7 @@ workflow: PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline' 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" # 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. diff --git a/.gitlab/ci/ci-templates.gitlab-ci.yml b/.gitlab/ci/ci-templates.gitlab-ci.yml index d6e2fdf2fbe1ca69082529b1c1acc28d9d98cd95..c6681db96856c6ca168dba7ce17d60aefe338b1f 100644 --- a/.gitlab/ci/ci-templates.gitlab-ci.yml +++ b/.gitlab/ci/ci-templates.gitlab-ci.yml @@ -4,7 +4,7 @@ templates-shellcheck: - .default-before_script - .default-retry - .ruby-cache - - .use-pg13 + - .use-pg14 stage: test needs: - setup-test-env diff --git a/.gitlab/ci/dev-fixtures.gitlab-ci.yml b/.gitlab/ci/dev-fixtures.gitlab-ci.yml index 0ff469d71143d1ee6069a789b54de8c9f7d7a70c..f89456a18fb98c871c124eb27e05ee9b0f0634e4 100644 --- a/.gitlab/ci/dev-fixtures.gitlab-ci.yml +++ b/.gitlab/ci/dev-fixtures.gitlab-ci.yml @@ -3,7 +3,7 @@ - .default-retry - .rails-cache - .default-before_script - - .use-pg12 + - .use-pg13 stage: test needs: ["setup-test-env"] variables: @@ -29,7 +29,7 @@ run-dev-fixtures-ee: extends: - .run-dev-fixtures - .dev-fixtures:rules:ee-only - - .use-pg12-es7-ee + - .use-pg13-es7-ee script: - cp ee/db/fixtures/development/* $FIXTURE_PATH - *run-dev-fixtures-script diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 88dbd1649b0ffbfe73409bb462de9a8ccaafaca5..76fae2f00cdbb6c0cb8f00a542e850c627de92ff 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -122,7 +122,7 @@ retrieve-frontend-fixtures: - .default-retry - .default-before_script - .rails-cache - - .use-pg12 + - .use-pg13 stage: fixtures needs: ["setup-test-env", "retrieve-tests-metadata"] variables: diff --git a/.gitlab/ci/glfm.gitlab-ci.yml b/.gitlab/ci/glfm.gitlab-ci.yml index 6ff60f2473059e4a59145ae44cb47231112ba39a..008bb03de251edee071428fb25d61ddab56a98f9 100644 --- a/.gitlab/ci/glfm.gitlab-ci.yml +++ b/.gitlab/ci/glfm.gitlab-ci.yml @@ -2,7 +2,7 @@ glfm-verify: extends: - .rails-job-base - .glfm:rules:glfm-verify - - .use-pg12 + - .use-pg13 stage: test needs: ["setup-test-env"] script: diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index 14fa0fc3671af8d9e4723c676f0d9a0f4a07bc61..d31573b8c700430b70963b0d0a3be042d22150c5 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -229,7 +229,6 @@ - *node-modules-cache # We don't push this cache as it's already rebuilt by `update-assets-compile-*-cache` - *storybook-node-modules-cache-push - .use-pg12: services: - name: postgres:12 @@ -248,6 +247,15 @@ POSTGRES_HOST_AUTH_METHOD: trust 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: services: - name: postgres:12 @@ -278,9 +286,24 @@ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 -.use-pg12-es8-ee: +.use-pg14-es7-ee: 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"] - name: redis:6.0-alpine - name: elasticsearch:8.6.2 @@ -288,15 +311,31 @@ alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust - PG_VERSION: "12" + PG_VERSION: "13" ES_SETTING_DISCOVERY_TYPE: "single-node" ES_SETTING_XPACK_SECURITY_ENABLED: "false" ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 -.use-pg12-opensearch1-ee: +.use-pg14-es8-ee: services: - - name: postgres:12 + - name: postgres:14 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + - name: redis:6.0-alpine + - name: elasticsearch:8.6.2 + - 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" + ES_SETTING_DISCOVERY_TYPE: "single-node" + ES_SETTING_XPACK_SECURITY_ENABLED: "false" + ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 + ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 + +.use-pg13-opensearch1-ee: + services: + - name: postgres:13 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - name: redis:6.0-alpine - name: opensearchproject/opensearch:1.3.5 @@ -306,13 +345,13 @@ alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust - PG_VERSION: "12" + PG_VERSION: "13" ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 -.use-pg12-opensearch2-ee: +.use-pg13-opensearch2-ee: services: - - name: postgres:12 + - name: postgres:13 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] - name: redis:6.0-alpine - name: opensearchproject/opensearch:2.2.1 @@ -322,7 +361,39 @@ alias: zoekt-ci-image variables: POSTGRES_HOST_AUTH_METHOD: trust - PG_VERSION: "12" + PG_VERSION: "13" + ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060 + ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070 + +.use-pg14-opensearch1-ee: + services: + - name: postgres:14 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + - name: redis:6.0-alpine + - name: opensearchproject/opensearch:1.3.5 + alias: elasticsearch + command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] + - 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-pg14-opensearch2-ee: + services: + - name: postgres:14 + command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] + - name: redis:6.0-alpine + - name: opensearchproject/opensearch:2.2.1 + alias: elasticsearch + command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"] + - 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 diff --git a/.gitlab/ci/memory.gitlab-ci.yml b/.gitlab/ci/memory.gitlab-ci.yml index 5d6b90d107d5dda63b5b599efe6197884c98dbec..afef2b11ee788536e571ed2dac22f210bc238293 100644 --- a/.gitlab/ci/memory.gitlab-ci.yml +++ b/.gitlab/ci/memory.gitlab-ci.yml @@ -20,7 +20,7 @@ memory-on-boot: extends: - .only-code-memory-job-base - .production - - .use-pg12 + - .use-pg13 stage: test needs: ["setup-test-env", "compile-test-assets"] variables: diff --git a/.gitlab/ci/preflight.gitlab-ci.yml b/.gitlab/ci/preflight.gitlab-ci.yml index 8c1cb44807a66b183ca45e779d8d34e28cd68a42..526492a75c75047304f41a4b219ece81f391a29e 100644 --- a/.gitlab/ci/preflight.gitlab-ci.yml +++ b/.gitlab/ci/preflight.gitlab-ci.yml @@ -23,7 +23,7 @@ rails-production-server-boot: - .production - .ruby-cache - .setup:rules:rails-production-server-boot - - .use-pg12 + - .use-pg13 variables: BUNDLE_WITHOUT: "development:test" BUNDLE_WITH: "production" diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 0049917ce81de26f92c7c14194a8de7d921bca63..393f7c2f6a7d9b01880edacd88b57c5cf206a0fb 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -67,163 +67,173 @@ update-gitaly-binaries-cache: - export BUNDLE_WITHOUT="${BUNDLE_WITHOUT}:default:test:puma:kerberos:metrics:omnibus:ed25519" - bundle_install_script -rspec migration pg12: +rspec migration pg13: extends: - - .rspec-base-pg12 + - .rspec-base-pg13 - .rspec-base-migration - .rails:rules:ee-and-foss-migration - .rspec-migration-parallel -rspec migration pg12 predictive: +rspec migration pg13 predictive: extends: - - rspec migration pg12 + - rspec migration pg13 - .predictive-rspec-tests - .rails:rules:ee-and-foss-migration:predictive -rspec background_migration pg12: +rspec background_migration pg13: extends: - - .rspec-base-pg12 + - .rspec-base-pg13 - .rspec-base-migration - .rails:rules:ee-and-foss-background-migration - .rspec-background-migration-parallel -rspec background_migration pg12 predictive: +rspec background_migration pg13 predictive: extends: - - rspec background_migration pg12 + - rspec background_migration pg13 - .predictive-rspec-tests - .rails:rules:ee-and-foss-background-migration:predictive -rspec migration pg12 single-db: +rspec migration pg13 single-db: extends: - - rspec migration pg12 + - rspec migration pg13 - .single-db-rspec - .rails:rules:single-db -rspec background_migration pg12 single-db: +rspec background_migration pg13 single-db: extends: - - rspec background_migration pg12 + - rspec background_migration pg13 - .single-db-rspec - .rails:rules:single-db -rspec migration pg12 single-db-ci-connection: +rspec migration pg13 single-db-ci-connection: extends: - - rspec migration pg12 + - rspec migration pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec background_migration pg12 single-db-ci-connection: +rspec background_migration pg13 single-db-ci-connection: extends: - - rspec background_migration pg12 + - rspec background_migration pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec migration pg12 praefect: +rspec migration pg13 praefect: extends: - - rspec migration pg12 + - rspec migration pg13 - .praefect-with-db - .rails:rules:praefect-with-db -rspec background_migration pg12 praefect: +rspec background_migration pg13 praefect: extends: - - rspec background_migration pg12 + - rspec background_migration pg13 - .praefect-with-db - .rails:rules:praefect-with-db -rspec unit pg12: +rspec unit pg13: extends: - - .rspec-base-pg12 + - .rspec-base-pg13 - .rails:rules:ee-and-foss-unit - .rspec-unit-parallel -rspec unit pg12 predictive: +rspec unit pg13 predictive: extends: - - rspec unit pg12 + - rspec unit pg13 - .predictive-rspec-tests - .rails:rules:ee-and-foss-unit:predictive -rspec unit pg12 single-db: +rspec unit pg13 single-db: extends: - - rspec unit pg12 + - rspec unit pg13 - .single-db-rspec - .rails:rules:single-db -rspec unit pg12 single-db-ci-connection: +rspec unit pg13 single-db-ci-connection: extends: - - rspec unit pg12 + - rspec unit pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec unit pg12 praefect: +rspec unit pg13 praefect: extends: - - rspec unit pg12 + - rspec unit pg13 - .praefect-with-db - .rails:rules:praefect-with-db -rspec integration pg12: +rspec integration pg13: extends: - - .rspec-base-pg12 + - .rspec-base-pg13 - .rails:rules:ee-and-foss-integration - .rspec-integration-parallel -rspec integration pg12 predictive: +rspec integration pg13 predictive: extends: - - rspec integration pg12 + - rspec integration pg13 - .predictive-rspec-tests - .rails:rules:ee-and-foss-integration:predictive -rspec integration pg12 single-db: +rspec integration pg13 single-db: extends: - - rspec integration pg12 + - rspec integration pg13 - .single-db-rspec - .rails:rules:single-db -rspec integration pg12 single-db-ci-connection: +rspec integration pg13 single-db-ci-connection: extends: - - rspec integration pg12 + - rspec integration pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec integration pg12 praefect: +rspec integration pg13 praefect: extends: - - rspec integration pg12 + - rspec integration pg13 - .praefect-with-db - .rails:rules:praefect-with-db -rspec system pg12: +rspec system pg13: extends: - - .rspec-base-pg12 + - .rspec-base-pg13 - .rails:rules:ee-and-foss-system - .rspec-system-parallel variables: DEBUG_GITLAB_TRANSACTION_STACK: "true" -rspec system pg12 predictive: +rspec system pg13 predictive: extends: - - rspec system pg12 + - rspec system pg13 - .predictive-rspec-tests - .rails:rules:ee-and-foss-system:predictive -rspec system pg12 single-db: +rspec system pg13 single-db: extends: - - rspec system pg12 + - rspec system pg13 - .single-db-rspec - .rails:rules:single-db -rspec system pg12 single-db-ci-connection: +rspec system pg13 single-db-ci-connection: extends: - - rspec system pg12 + - rspec system pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec system pg12 praefect: +rspec system pg13 praefect: extends: - - rspec system pg12 + - rspec system pg13 - .praefect-with-db - .rails:rules:praefect-with-db -rspec fast_spec_helper: +# Dedicated job to test DB library code against PG12. +# Note that these are already tested against PG12 in the `rspec unit pg12` / `rspec-ee unit pg12` jobs. +rspec db-library-code pg12: extends: - .rspec-base-pg12 + - .rails:rules:ee-and-foss-db-library-code + script: + - !reference [.base-script, script] + - rspec_db_library_code + +rspec fast_spec_helper: + extends: + - .rspec-base-pg13 - .rails:rules:ee-and-foss-fast_spec_helper script: - fast_spec_helper_specs=$(git grep -l -E '^require.*fast_spec_helper') @@ -258,16 +268,16 @@ rspec:deprecations: # We cannot use needs since it would mean needing 84 jobs (since most are parallelized) # so we use `dependencies` here. dependencies: - - rspec migration pg12 - - rspec background_migration pg12 - - rspec unit pg12 - - rspec integration pg12 - - rspec system pg12 - - rspec-ee migration pg12 - - rspec-ee background_migration pg12 - - rspec-ee unit pg12 - - rspec-ee integration pg12 - - rspec-ee system pg12 + - rspec migration pg13 + - rspec background_migration pg13 + - rspec unit pg13 + - rspec integration pg13 + - rspec system pg13 + - rspec-ee migration pg13 + - rspec-ee background_migration pg13 + - rspec-ee unit pg13 + - rspec-ee integration pg13 + - rspec-ee system pg13 variables: SETUP_DB: "false" script: @@ -290,76 +300,76 @@ rspec:coverage: dependencies: - setup-test-env # FOSS/EE jobs - - rspec migration pg12 - - rspec background_migration pg12 - - rspec unit pg12 - - rspec integration pg12 - - rspec system pg12 + - rspec migration pg13 + - rspec background_migration pg13 + - rspec unit pg13 + - rspec integration pg13 + - rspec system pg13 # FOSS/EE predictive jobs - - rspec migration pg12 predictive - - rspec background_migration pg12 predictive - - rspec unit pg12 predictive - - rspec integration pg12 predictive - - rspec system pg12 predictive + - rspec migration pg13 predictive + - rspec background_migration pg13 predictive + - rspec unit pg13 predictive + - rspec integration pg13 predictive + - rspec system pg13 predictive # FOSS/EE single-db jobs - - rspec migration pg12 single-db - - rspec background_migration pg12 single-db - - rspec unit pg12 single-db - - rspec integration pg12 single-db - - rspec system pg12 single-db + - rspec migration pg13 single-db + - rspec background_migration pg13 single-db + - rspec unit pg13 single-db + - rspec integration pg13 single-db + - rspec system pg13 single-db # FOSS/EE single-db-ci-connection jobs - - rspec migration pg12 single-db-ci-connection - - rspec background_migration pg12 single-db-ci-connection - - rspec unit pg12 single-db-ci-connection - - rspec integration pg12 single-db-ci-connection - - rspec system pg12 single-db-ci-connection + - rspec migration pg13 single-db-ci-connection + - rspec background_migration pg13 single-db-ci-connection + - rspec unit pg13 single-db-ci-connection + - rspec integration pg13 single-db-ci-connection + - rspec system pg13 single-db-ci-connection # EE jobs - - rspec-ee migration pg12 - - rspec-ee background_migration pg12 - - rspec-ee unit pg12 - - rspec-ee integration pg12 - - rspec-ee system pg12 + - rspec-ee migration pg13 + - rspec-ee background_migration pg13 + - rspec-ee unit pg13 + - rspec-ee integration pg13 + - rspec-ee system pg13 # EE predictive jobs - - rspec-ee migration pg12 predictive - - rspec-ee background_migration pg12 predictive - - rspec-ee unit pg12 predictive - - rspec-ee integration pg12 predictive - - rspec-ee system pg12 predictive + - rspec-ee migration pg13 predictive + - rspec-ee background_migration pg13 predictive + - rspec-ee unit pg13 predictive + - rspec-ee integration pg13 predictive + - rspec-ee system pg13 predictive # EE single-db jobs - - rspec-ee migration pg12 single-db - - rspec-ee background_migration pg12 single-db - - rspec-ee unit pg12 single-db - - rspec-ee integration pg12 single-db - - rspec-ee system pg12 single-db + - rspec-ee migration pg13 single-db + - rspec-ee background_migration pg13 single-db + - rspec-ee unit pg13 single-db + - rspec-ee integration pg13 single-db + - rspec-ee system pg13 single-db # EE single-db-ci-connection jobs - - rspec-ee migration pg12 single-db-ci-connection - - rspec-ee background_migration pg12 single-db-ci-connection - - rspec-ee unit pg12 single-db-ci-connection - - rspec-ee integration pg12 single-db-ci-connection - - rspec-ee system pg12 single-db-ci-connection + - rspec-ee migration pg13 single-db-ci-connection + - rspec-ee background_migration pg13 single-db-ci-connection + - rspec-ee unit pg13 single-db-ci-connection + - rspec-ee integration pg13 single-db-ci-connection + - rspec-ee system pg13 single-db-ci-connection # Memory jobs - memory-on-boot # As-if-FOSS jobs - - rspec migration pg12-as-if-foss - - rspec migration pg12-as-if-foss predictive - - rspec migration pg12-as-if-foss single-db - - rspec migration pg12-as-if-foss single-db-ci-connection - - rspec background_migration pg12-as-if-foss - - rspec background_migration pg12-as-if-foss predictive - - rspec background_migration pg12-as-if-foss single-db - - rspec background_migration pg12-as-if-foss single-db-ci-connection - - rspec unit pg12-as-if-foss - - rspec unit pg12-as-if-foss predictive - - rspec unit pg12-as-if-foss single-db - - rspec unit pg12-as-if-foss single-db-ci-connection - - rspec integration pg12-as-if-foss - - rspec integration pg12-as-if-foss predictive - - rspec integration pg12-as-if-foss single-db - - rspec integration pg12-as-if-foss single-db-ci-connection - - rspec system pg12-as-if-foss - - rspec system pg12-as-if-foss predictive - - rspec system pg12-as-if-foss single-db - - rspec system pg12-as-if-foss single-db-ci-connection + - rspec migration pg13-as-if-foss + - rspec migration pg13-as-if-foss predictive + - rspec migration pg13-as-if-foss single-db + - rspec migration pg13-as-if-foss single-db-ci-connection + - rspec background_migration pg13-as-if-foss + - rspec background_migration pg13-as-if-foss predictive + - rspec background_migration pg13-as-if-foss single-db + - rspec background_migration pg13-as-if-foss single-db-ci-connection + - rspec unit pg13-as-if-foss + - rspec unit pg13-as-if-foss predictive + - rspec unit pg13-as-if-foss single-db + - rspec unit pg13-as-if-foss single-db-ci-connection + - rspec integration pg13-as-if-foss + - rspec integration pg13-as-if-foss predictive + - rspec integration pg13-as-if-foss single-db + - rspec integration pg13-as-if-foss single-db-ci-connection + - rspec system pg13-as-if-foss + - rspec system pg13-as-if-foss predictive + - rspec system pg13-as-if-foss single-db + - rspec system pg13-as-if-foss single-db-ci-connection script: - run_timed_command "bundle exec scripts/merge-simplecov" coverage: '/LOC \((\d+\.\d+%)\) covered.$/' @@ -437,274 +447,274 @@ rspec:flaky-tests-report: ################################################## # EE: default refs (MRs, default branch, schedules) jobs # -rspec migration pg12-as-if-foss: +rspec migration pg13-as-if-foss: extends: - - .rspec-base-pg12-as-if-foss + - .rspec-base-pg13-as-if-foss - .rspec-base-migration - .rails:rules:as-if-foss-migration - .rspec-migration-parallel -rspec migration pg12-as-if-foss predictive: +rspec migration pg13-as-if-foss predictive: extends: - - rspec migration pg12-as-if-foss + - rspec migration pg13-as-if-foss - .predictive-rspec-tests - .rails:rules:as-if-foss-migration:predictive -rspec background_migration pg12-as-if-foss: +rspec background_migration pg13-as-if-foss: extends: - - .rspec-base-pg12-as-if-foss + - .rspec-base-pg13-as-if-foss - .rspec-base-migration - .rails:rules:as-if-foss-background-migration - .rspec-background-migration-parallel -rspec background_migration pg12-as-if-foss predictive: +rspec background_migration pg13-as-if-foss predictive: extends: - - rspec background_migration pg12-as-if-foss + - rspec background_migration pg13-as-if-foss - .predictive-rspec-tests - .rails:rules:as-if-foss-background-migration:predictive -rspec migration pg12-as-if-foss single-db: +rspec migration pg13-as-if-foss single-db: extends: - - rspec migration pg12-as-if-foss + - rspec migration pg13-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec background_migration pg12-as-if-foss single-db: +rspec background_migration pg13-as-if-foss single-db: extends: - - rspec background_migration pg12-as-if-foss + - rspec background_migration pg13-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec migration pg12-as-if-foss single-db-ci-connection: +rspec migration pg13-as-if-foss single-db-ci-connection: extends: - - rspec migration pg12-as-if-foss + - rspec migration pg13-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec background_migration pg12-as-if-foss single-db-ci-connection: +rspec background_migration pg13-as-if-foss single-db-ci-connection: extends: - - rspec background_migration pg12-as-if-foss + - rspec background_migration pg13-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec unit pg12-as-if-foss: +rspec unit pg13-as-if-foss: extends: - - .rspec-base-pg12-as-if-foss + - .rspec-base-pg13-as-if-foss - .rails:rules:as-if-foss-unit - .rspec-unit-parallel -rspec unit pg12-as-if-foss predictive: +rspec unit pg13-as-if-foss predictive: extends: - - rspec unit pg12-as-if-foss + - rspec unit pg13-as-if-foss - .predictive-rspec-tests - .rails:rules:as-if-foss-unit:predictive -rspec unit pg12-as-if-foss single-db: +rspec unit pg13-as-if-foss single-db: extends: - - rspec unit pg12-as-if-foss + - rspec unit pg13-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec unit pg12-as-if-foss single-db-ci-connection: +rspec unit pg13-as-if-foss single-db-ci-connection: extends: - - rspec unit pg12-as-if-foss + - rspec unit pg13-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec integration pg12-as-if-foss: +rspec integration pg13-as-if-foss: extends: - - .rspec-base-pg12-as-if-foss + - .rspec-base-pg13-as-if-foss - .rails:rules:as-if-foss-integration - .rspec-integration-parallel -rspec integration pg12-as-if-foss predictive: +rspec integration pg13-as-if-foss predictive: extends: - - rspec integration pg12-as-if-foss + - rspec integration pg13-as-if-foss - .predictive-rspec-tests - .rails:rules:as-if-foss-integration:predictive -rspec integration pg12-as-if-foss single-db: +rspec integration pg13-as-if-foss single-db: extends: - - rspec integration pg12-as-if-foss + - rspec integration pg13-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec integration pg12-as-if-foss single-db-ci-connection: +rspec integration pg13-as-if-foss single-db-ci-connection: extends: - - rspec integration pg12-as-if-foss + - rspec integration pg13-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec system pg12-as-if-foss: +rspec system pg13-as-if-foss: extends: - - .rspec-base-pg12-as-if-foss + - .rspec-base-pg13-as-if-foss - .rails:rules:as-if-foss-system - .rspec-system-parallel -rspec system pg12-as-if-foss predictive: +rspec system pg13-as-if-foss predictive: extends: - - rspec system pg12-as-if-foss + - rspec system pg13-as-if-foss - .predictive-rspec-tests - .rails:rules:as-if-foss-system:predictive -rspec system pg12-as-if-foss single-db: +rspec system pg13-as-if-foss single-db: extends: - - rspec system pg12-as-if-foss + - rspec system pg13-as-if-foss - .single-db-rspec - .rails:rules:single-db -rspec system pg12-as-if-foss single-db-ci-connection: +rspec system pg13-as-if-foss single-db-ci-connection: extends: - - rspec system pg12-as-if-foss + - rspec system pg13-as-if-foss - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee migration pg12: +rspec-ee migration pg13: extends: - - .rspec-ee-base-pg12 + - .rspec-ee-base-pg13 - .rspec-base-migration - .rails:rules:ee-only-migration - .rspec-ee-migration-parallel -rspec-ee migration pg12 predictive: +rspec-ee migration pg13 predictive: extends: - - rspec-ee migration pg12 + - rspec-ee migration pg13 - .predictive-rspec-tests - .rails:rules:ee-only-migration:predictive -rspec-ee background_migration pg12: +rspec-ee background_migration pg13: extends: - - .rspec-ee-base-pg12 + - .rspec-ee-base-pg13 - .rspec-base-migration - .rails:rules:ee-only-background-migration - .rspec-ee-background-migration-parallel -rspec-ee background_migration pg12 predictive: +rspec-ee background_migration pg13 predictive: extends: - - rspec-ee background_migration pg12 + - rspec-ee background_migration pg13 - .predictive-rspec-tests - .rails:rules:ee-only-background-migration:predictive -rspec-ee migration pg12 single-db: +rspec-ee migration pg13 single-db: extends: - - rspec-ee migration pg12 + - rspec-ee migration pg13 - .single-db-rspec - .rails:rules:single-db -rspec-ee background_migration pg12 single-db: +rspec-ee background_migration pg13 single-db: extends: - - rspec-ee background_migration pg12 + - rspec-ee background_migration pg13 - .single-db-rspec - .rails:rules:single-db -rspec-ee migration pg12 single-db-ci-connection: +rspec-ee migration pg13 single-db-ci-connection: extends: - - rspec-ee migration pg12 + - rspec-ee migration pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee background_migration pg12 single-db-ci-connection: +rspec-ee background_migration pg13 single-db-ci-connection: extends: - - rspec-ee background_migration pg12 + - rspec-ee background_migration pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee migration pg12 praefect: +rspec-ee migration pg13 praefect: extends: - - rspec migration pg12 + - rspec migration pg13 - .praefect-with-db - .rails:rules:praefect-with-db -rspec-ee background_migration pg12 praefect: +rspec-ee background_migration pg13 praefect: extends: - - rspec background_migration pg12 + - rspec background_migration pg13 - .praefect-with-db - .rails:rules:praefect-with-db -rspec-ee unit pg12: +rspec-ee unit pg13: extends: - - .rspec-ee-base-pg12 + - .rspec-ee-base-pg13 - .rails:rules:ee-only-unit - .rspec-ee-unit-parallel -rspec-ee unit pg12 es8: +rspec-ee unit pg13 es8: extends: - - .rspec-ee-base-pg12-es8 + - .rspec-ee-base-pg13-es8 - .rspec-ee-unit-parallel -rspec-ee unit pg12 predictive: +rspec-ee unit pg13 predictive: extends: - - rspec-ee unit pg12 + - rspec-ee unit pg13 - .predictive-rspec-tests - .rails:rules:ee-only-unit:predictive -rspec-ee unit pg12 single-db: +rspec-ee unit pg13 single-db: extends: - - rspec-ee unit pg12 + - rspec-ee unit pg13 - .single-db-rspec - .rails:rules:single-db -rspec-ee unit pg12 single-db-ci-connection: +rspec-ee unit pg13 single-db-ci-connection: extends: - - rspec-ee unit pg12 + - rspec-ee unit pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee integration pg12: +rspec-ee integration pg13: extends: - - .rspec-ee-base-pg12 + - .rspec-ee-base-pg13 - .rails:rules:ee-only-integration - .rspec-ee-integration-parallel -rspec-ee integration pg12 es8: +rspec-ee integration pg13 es8: extends: - - .rspec-ee-base-pg12-es8 + - .rspec-ee-base-pg13-es8 - .rspec-ee-integration-parallel -rspec-ee integration pg12 predictive: +rspec-ee integration pg13 predictive: extends: - - rspec-ee integration pg12 + - rspec-ee integration pg13 - .predictive-rspec-tests - .rails:rules:ee-only-integration:predictive -rspec-ee integration pg12 single-db: +rspec-ee integration pg13 single-db: extends: - - rspec-ee integration pg12 + - rspec-ee integration pg13 - .single-db-rspec - .rails:rules:single-db -rspec-ee integration pg12 single-db-ci-connection: +rspec-ee integration pg13 single-db-ci-connection: extends: - - rspec-ee integration pg12 + - rspec-ee integration pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection -rspec-ee system pg12: +rspec-ee system pg13: extends: - - .rspec-ee-base-pg12 + - .rspec-ee-base-pg13 - .rails:rules:ee-only-system - .rspec-ee-system-parallel -rspec-ee system pg12 es8: +rspec-ee system pg13 es8: extends: - - .rspec-ee-base-pg12-es8 + - .rspec-ee-base-pg13-es8 - .rspec-ee-system-parallel -rspec-ee system pg12 predictive: +rspec-ee system pg13 predictive: extends: - - rspec-ee system pg12 + - rspec-ee system pg13 - .predictive-rspec-tests - .rails:rules:ee-only-system:predictive -rspec-ee system pg12 single-db: +rspec-ee system pg13 single-db: extends: - - rspec-ee system pg12 + - rspec-ee system pg13 - .single-db-rspec - .rails:rules:single-db -rspec-ee system pg12 single-db-ci-connection: +rspec-ee system pg13 single-db-ci-connection: extends: - - rspec-ee system pg12 + - rspec-ee system pg13 - .single-db-ci-connection-rspec - .rails:rules:single-db-ci-connection # EE: default refs (MRs, default branch, schedules) jobs # @@ -713,36 +723,69 @@ rspec-ee system pg12 single-db-ci-connection: ########################################## # EE/FOSS: default branch nightly scheduled jobs # -# PG13 -rspec migration pg13: +# PG12 +rspec migration pg12: extends: - - .rspec-base-pg13 + - .rspec-base-pg12 + - .rspec-base-migration + - .rails:rules:rspec-on-pg12 + - .rspec-migration-parallel + +rspec background_migration pg12: + extends: + - .rspec-base-pg12 + - .rspec-base-migration + - .rails:rules:rspec-on-pg12 + - .rspec-background-migration-parallel + +rspec unit pg12: + extends: + - .rspec-base-pg12 + - .rails:rules:rspec-on-pg12 + - .rspec-unit-parallel + +rspec integration pg12: + extends: + - .rspec-base-pg12 + - .rails:rules:rspec-on-pg12 + - .rspec-integration-parallel + +rspec system pg12: + extends: + - .rspec-base-pg12 + - .rails:rules:rspec-on-pg12 + - .rspec-system-parallel + +# PG14 +rspec migration pg14: + extends: + - .rspec-base-pg14 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-migration-parallel -rspec background_migration pg13: +rspec background_migration pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-background-migration-parallel -rspec unit pg13: +rspec unit pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-unit-parallel -rspec integration pg13: +rspec integration pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-integration-parallel -rspec system pg13: +rspec system pg14: extends: - - .rspec-base-pg13 + - .rspec-base-pg14 - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-system-parallel # EE/FOSS: default branch nightly scheduled jobs # @@ -752,68 +795,152 @@ rspec system pg13: # EE: default branch nightly scheduled jobs # # PG12 -rspec-ee unit pg12 opensearch1: +rspec-ee migration pg12: + extends: + - .rspec-ee-base-pg12 + - .rspec-base-migration + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + - .rspec-ee-migration-parallel + +rspec-ee background_migration pg12: + extends: + - .rspec-ee-base-pg12 + - .rspec-base-migration + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + - .rspec-ee-background-migration-parallel + +rspec-ee unit pg12: extends: - - .rspec-ee-base-pg12-opensearch1 + - .rspec-ee-base-pg12 + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-unit-parallel -rspec-ee unit pg12 opensearch2: +rspec-ee integration pg12: extends: - - .rspec-ee-base-pg12-opensearch2 + - .rspec-ee-base-pg12 + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + - .rspec-ee-integration-parallel + +rspec-ee system pg12: + extends: + - .rspec-ee-base-pg12 + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + - .rspec-ee-system-parallel + +# PG13 +rspec-ee unit pg13 opensearch1: + extends: + - .rspec-ee-base-pg13-opensearch1 + - .rspec-ee-unit-parallel + +rspec-ee unit pg13 opensearch2: + extends: + - .rspec-ee-base-pg13-opensearch2 - .rspec-ee-unit-parallel -rspec-ee integration pg12 opensearch1: +rspec-ee integration pg13 opensearch1: extends: - - .rspec-ee-base-pg12-opensearch1 + - .rspec-ee-base-pg13-opensearch1 - .rspec-ee-integration-parallel -rspec-ee integration pg12 opensearch2: +rspec-ee integration pg13 opensearch2: extends: - - .rspec-ee-base-pg12-opensearch2 + - .rspec-ee-base-pg13-opensearch2 - .rspec-ee-integration-parallel -rspec-ee system pg12 opensearch1: +rspec-ee system pg13 opensearch1: extends: - - .rspec-ee-base-pg12-opensearch1 + - .rspec-ee-base-pg13-opensearch1 - .rspec-ee-system-parallel -rspec-ee system pg12 opensearch2: +rspec-ee system pg13 opensearch2: extends: - - .rspec-ee-base-pg12-opensearch2 + - .rspec-ee-base-pg13-opensearch2 - .rspec-ee-system-parallel -# PG13 -rspec-ee migration pg13: +# PG14 +rspec-ee unit pg14 opensearch1: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14-opensearch1 + - .rspec-ee-unit-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee unit pg14 opensearch2: + extends: + - .rspec-ee-base-pg14-opensearch2 + - .rspec-ee-unit-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee integration pg14 opensearch1: + extends: + - .rspec-ee-base-pg14-opensearch1 + - .rspec-ee-integration-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee integration pg14 opensearch2: + extends: + - .rspec-ee-base-pg14-opensearch2 + - .rspec-ee-integration-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee system pg14 opensearch1: + extends: + - .rspec-ee-base-pg14-opensearch1 + - .rspec-ee-system-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee system pg14 opensearch2: + extends: + - .rspec-ee-base-pg14-opensearch2 + - .rspec-ee-system-parallel + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only + +rspec-ee migration pg14: + extends: + - .rspec-ee-base-pg14 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-migration-parallel -rspec-ee background_migration pg13: +rspec-ee background_migration pg14: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rspec-base-migration - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-background-migration-parallel -rspec-ee unit pg13: +rspec-ee unit pg14: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14 - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-unit-parallel -rspec-ee integration pg13: +rspec-ee unit pg14 es8: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14-es8 + - .rspec-ee-unit-parallel + +rspec-ee integration pg14: + extends: + - .rspec-ee-base-pg14 - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-integration-parallel -rspec-ee system pg13: +rspec-ee integration pg14 es8: extends: - - .rspec-ee-base-pg13 + - .rspec-ee-base-pg14-es8 + - .rspec-ee-integration-parallel + +rspec-ee system pg14: + extends: + - .rspec-ee-base-pg14 - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-system-parallel + +rspec-ee system pg14 es8: + extends: + - .rspec-ee-base-pg14-es8 + - .rspec-ee-system-parallel # EE: default branch nightly scheduled jobs # ##################################### @@ -830,15 +957,15 @@ rspec-ee system pg13: rspec fail-fast: extends: - - .rspec-base-pg12 - - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-base-pg12 + - .rspec-base-pg13 + - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-base-pg13 variables: MATCHING_TESTS_PATH: "${RSPEC_MATCHING_TESTS_FOSS_PATH}" rspec-ee fail-fast: extends: - - .rspec-ee-base-pg12 - - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-ee-base-pg12 + - .rspec-ee-base-pg13 + - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-ee-base-pg13 variables: MATCHING_TESTS_PATH: "${RSPEC_MATCHING_TESTS_EE_PATH}" @@ -894,7 +1021,7 @@ fail-pipeline-early: script: - fail_pipeline_early -.base-rspec-pg12-rerun-previous-failed-tests: +.base-rspec-pg13-rerun-previous-failed-tests: extends: - .rails:rules:rerun-previous-failed-tests stage: test @@ -903,17 +1030,17 @@ fail-pipeline-early: - !reference [.base-script, script] - rspec_rerun_previous_failed_tests "${PREVIOUS_FAILED_TESTS_FILE}" -rspec rspec-pg12-rerun-previous-failed-tests: +rspec rspec-pg13-rerun-previous-failed-tests: extends: - - .rspec-base-pg12 - - .base-rspec-pg12-rerun-previous-failed-tests + - .rspec-base-pg13 + - .base-rspec-pg13-rerun-previous-failed-tests variables: PREVIOUS_FAILED_TESTS_FILE: tmp/previous_failed_tests/rspec_failed_tests.txt -rspec rspec-ee-pg12-rerun-previous-failed-tests: +rspec rspec-ee-pg13-rerun-previous-failed-tests: extends: - - .rspec-ee-base-pg12 - - .base-rspec-pg12-rerun-previous-failed-tests + - .rspec-ee-base-pg13 + - .base-rspec-pg13-rerun-previous-failed-tests variables: PREVIOUS_FAILED_TESTS_FILE: tmp/previous_failed_tests/rspec_ee_failed_files.txt # EE: Canonical MR pipelines diff --git a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb index 02b7d61a4fafbcd73f0e1145963a0a58f6ea54ff..38d964af62acceef175a05fcc8841d4d58e1b4b2 100644 --- a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb +++ b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb @@ -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." .base-rspec-foss-impact: - extends: .rspec-base-pg12-as-if-foss + extends: .rspec-base-pg13-as-if-foss needs: - pipeline: $PARENT_PIPELINE_ID job: detect-tests diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml index 0fa65b0be9002e53f416914b4c529ca1e3260ca2..62e8547fa5af4ac4add77d76ecefa2835ae1ad05 100644 --- a/.gitlab/ci/rails/shared.gitlab-ci.yml +++ b/.gitlab/ci/rails/shared.gitlab-ci.yml @@ -105,11 +105,16 @@ include: - .rspec-base - .use-pg12 -.rspec-base-pg12-as-if-foss: +.rspec-base-pg13: + extends: + - .rspec-base + - .use-pg13 + +.rspec-base-pg13-as-if-foss: extends: - .rspec-base - .as-if-foss - - .use-pg12 + - .use-pg13 needs: - job: "setup-test-env" - job: "retrieve-tests-metadata" @@ -117,44 +122,67 @@ include: - job: "detect-tests" optional: true -.rspec-base-pg13: +.rspec-base-pg14: extends: - .rspec-base - - .use-pg13 + - .use-pg14 .rspec-ee-base-pg12: extends: - .rspec-base - .use-pg12-es7-ee -.rspec-ee-base-pg12-es8: +.rspec-ee-base-pg13: extends: - .rspec-base - - .use-pg12-es8-ee + - .use-pg13-es7-ee + +.rspec-ee-base-pg13-es8: + extends: + - .rspec-base + - .use-pg13-es8-ee - .rails:rules:run-search-tests -.rspec-ee-base-pg12-opensearch1: +.rspec-ee-base-pg13-opensearch1: extends: - .rspec-base - - .use-pg12-opensearch1-ee + - .use-pg13-opensearch1-ee - .rails:rules:run-search-tests -.rspec-ee-base-pg12-opensearch2: +.rspec-ee-base-pg13-opensearch2: extends: - .rspec-base - - .use-pg12-opensearch2-ee + - .use-pg13-opensearch2-ee - .rails:rules:run-search-tests -.rspec-ee-base-pg13: +.rspec-ee-base-pg14: extends: - .rspec-base - - .use-pg13-es7-ee + - .use-pg14-es7-ee + +.rspec-ee-base-pg14-es8: + extends: + - .rspec-base + - .use-pg14-es8-ee + - .rails:rules:run-search-tests + +.rspec-ee-base-pg14-opensearch1: + extends: + - .rspec-base + - .use-pg14-opensearch1-ee + - .rails:rules:run-search-tests + +.rspec-ee-base-pg14-opensearch2: + extends: + - .rspec-base + - .use-pg14-opensearch2-ee + - .rails:rules:run-search-tests .db-job-base: extends: - .rails-job-base - .rails:rules:ee-and-foss-migration - - .use-pg12 + - .use-pg13 stage: test needs: ["setup-test-env"] # rspec job base specs diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 7fdb2ad41ec133d1328ca7fd288f4b619d4cacc3..6eab6472ed16243550af6a8efd531b635ebde84b 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -85,6 +85,9 @@ .if-merge-request-labels-run-review-app: &if-merge-request-labels-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: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:skip-undercoverage/' @@ -1668,6 +1671,7 @@ - <<: *if-default-refs changes: *db-library-patterns - <<: *if-merge-request-labels-run-all-rspec + - <<: *if-merge-request-labels-run-on-pg12 .rails:rules:ee-mr-and-default-branch-only: rules: @@ -1757,6 +1761,11 @@ - <<: *if-merge-request 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: rules: - <<: *if-default-branch-schedule-nightly diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml index 9620f0b87bd8f4f57c6ca7d6eee829925a126861..35172faa6dffae0425161a4786ad63bce7e87e3b 100644 --- a/.gitlab/ci/setup.gitlab-ci.yml +++ b/.gitlab/ci/setup.gitlab-ci.yml @@ -83,7 +83,7 @@ verify-approvals: generate-frontend-fixtures-mapping: extends: - .setup:rules:generate-frontend-fixtures-mapping - - .use-pg12 + - .use-pg13 - .rails-cache needs: ["setup-test-env"] stage: prepare diff --git a/.gitlab/ci/static-analysis.gitlab-ci.yml b/.gitlab/ci/static-analysis.gitlab-ci.yml index d546c79aab9afd7a8dbd77b7fb67e99abaf7fbdd..b9c9200d78b3a9a468f8abd6b0b59e4052d67bb4 100644 --- a/.gitlab/ci/static-analysis.gitlab-ci.yml +++ b/.gitlab/ci/static-analysis.gitlab-ci.yml @@ -45,7 +45,7 @@ static-verification-with-database: - .static-analysis-base - .rubocop-job-cache - .static-analysis:rules:static-verification-with-database - - .use-pg12 + - .use-pg13 script: - bundle exec rake lint:static_verification_with_database variables: diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml index 176a0b67d66c02b79b5a6ba51191923080c2c756..20d768c9e907a3153863d0126336531e9897aa7e 100644 --- a/.gitlab/ci/test-metadata.gitlab-ci.yml +++ b/.gitlab/ci/test-metadata.gitlab-ci.yml @@ -32,17 +32,17 @@ update-tests-metadata: - retrieve-tests-metadata - generate-frontend-fixtures-mapping - setup-test-env - - rspec migration pg12 + - rspec migration pg13 - rspec-all frontend_fixture - - rspec unit pg12 - - rspec integration pg12 - - rspec system pg12 - - rspec background_migration pg12 - - rspec-ee migration pg12 - - rspec-ee unit pg12 - - rspec-ee integration pg12 - - rspec-ee system pg12 - - rspec-ee background_migration pg12 + - rspec unit pg13 + - rspec integration pg13 + - rspec system pg13 + - rspec background_migration pg13 + - rspec-ee migration pg13 + - rspec-ee unit pg13 + - rspec-ee integration pg13 + - rspec-ee system pg13 + - rspec-ee background_migration pg13 script: - run_timed_command "retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document" - source ./scripts/rspec_helpers.sh diff --git a/doc/development/pipelines/index.md b/doc/development/pipelines/index.md index b56259dbdaf02cdc877e589246c7b454111871d0..9fcbe8c55e42e268dc3ea83556b9a6058a494843 100644 --- a/doc/development/pipelines/index.md +++ b/doc/development/pipelines/index.md @@ -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 -In order to reduce the feedback time after resolving failed tests for a merge request, the `rspec rspec-pg12-rerun-previous-failed-tests` -and `rspec rspec-ee-pg12-rerun-previous-failed-tests` jobs run the failed tests from the previous MR pipeline. +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-pg13-rerun-previous-failed-tests` jobs run the failed tests from the previous MR pipeline. This was introduced on August 25th 2021, with . @@ -159,7 +159,7 @@ This was introduced on August 25th 2021, with B & C @@ -483,20 +483,22 @@ This should let us: ### PostgreSQL versions testing -Our test suite runs against PG12 as GitLab.com runs on PG12 and -[Omnibus defaults to PG12 for new installs and upgrades](../../administration/package_information/postgresql_versions.md). +Our test suite runs against PG13 as GitLab.com runs on PG13 and +[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 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 -| Where? | PostgreSQL version | Ruby version | -|------------------------------------------------------------------------------------------------|--------------------------|-----------------------| -| Merge requests | 12 (default version) | 3.0 (default version) | -| `master` branch commits | 12 (default version) | 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 `ruby2` branch (every odd-numbered hour), see below. | 12 (default version) | 2.7 | -| `nightly` scheduled pipelines for the `master` branch | 12 (default version), 13 | 3.0 (default version) | +| Where? | PostgreSQL version | Ruby version | +|------------------------------------------------------------------------------------------------|-------------------------------------------------|-----------------------| +| Merge requests | 13 (default version), 12 for DB library changes | 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) | 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. | 13 (default version), 12 for DB library changes | 2.7 | +| `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 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 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`. -#### 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 Our test suite runs against Redis 6 as GitLab.com runs on Redis 6 and diff --git a/doc/development/pipelines/internals.md b/doc/development/pipelines/internals.md index bd96f2f2872c1772085bfcb603b1c655fb937bb3..81b95eb204fa1d95cd62292798ff7f7cad71bd30 100644 --- a/doc/development/pipelines/internals.md +++ b/doc/development/pipelines/internals.md @@ -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. | | `.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. | -| `.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-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. | | `.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. | diff --git a/lib/gitlab/analytics/cycle_analytics/aggregated/stage_query_helpers.rb b/lib/gitlab/analytics/cycle_analytics/aggregated/stage_query_helpers.rb index b00925495f2115662d3e87de130958b86aca1b82..1d041e762770008f3608bc01e468b13c0fa8ad32 100644 --- a/lib/gitlab/analytics/cycle_analytics/aggregated/stage_query_helpers.rb +++ b/lib/gitlab/analytics/cycle_analytics/aggregated/stage_query_helpers.rb @@ -32,7 +32,7 @@ def in_progress? end def duration_in_seconds(duration_expression = duration) - Arel::Nodes::Extract.new(duration_expression, :epoch) + Arel::Nodes::NamedFunction.new('CAST', [Arel::Nodes::Extract.new(duration_expression, :epoch).as('double precision')]) end end end diff --git a/scripts/failed_tests.rb b/scripts/failed_tests.rb index 786d3c24c74543196df7d3d7199b11082c5c44f2..0ba454894b77c008876c5ad2c14d456df59e0a18 100755 --- a/scripts/failed_tests.rb +++ b/scripts/failed_tests.rb @@ -12,8 +12,8 @@ class FailedTests previous_tests_report_path: 'test_results/previous/test_reports.json', output_directory: 'tmp/previous_failed_tests/', format: :oneline, - rspec_pg_regex: /rspec .+ pg12( .+)?/, - rspec_ee_pg_regex: /rspec-ee .+ pg12( .+)?/ + rspec_pg_regex: /rspec .+ pg13( .+)?/, + rspec_ee_pg_regex: /rspec-ee .+ pg13( .+)?/ }.freeze def initialize(options) diff --git a/scripts/rspec_helpers.sh b/scripts/rspec_helpers.sh index f96f96c47253617f602af8a8fb1de28e0ee69f8f..c6ec773cf78020a33b67d77d9022836b2d57b4c7 100644 --- a/scripts/rspec_helpers.sh +++ b/scripts/rspec_helpers.sh @@ -163,7 +163,7 @@ function rspec_paralellized_job() { read -ra job_name <<< "${CI_JOB_NAME}" local test_tool="${job_name[0]}" 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_tests_mapping_enabled="${RSPEC_TESTS_MAPPING_ENABLED:-}" local spec_folder_prefixes="" @@ -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 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}")/" export RETRIED_TESTS_REPORT_PATH="${rspec_flaky_folder_path}retried_tests_${report_name}_report.txt" diff --git a/spec/fixtures/scripts/test_report.json b/spec/fixtures/scripts/test_report.json index 29fd9a4bcb52e2227a5edc71a846b0813526e1a7..520ab3a857853499f60202ec25a5a4f16bb3e1ce 100644 --- a/spec/fixtures/scripts/test_report.json +++ b/spec/fixtures/scripts/test_report.json @@ -1,7 +1,7 @@ { "suites": [ { - "name": "rspec unit pg12", + "name": "rspec unit pg13", "total_time": 975.6635620000018, "total_count": 3811, "success_count": 3800, diff --git a/spec/scripts/failed_tests_spec.rb b/spec/scripts/failed_tests_spec.rb index ce0ec66cdb6aeb706443fb6ad46f01285514d1cb..c9fe6eecd1113677e5371ef8eff8856d98adc8ef 100644 --- a/spec/scripts/failed_tests_spec.rb +++ b/spec/scripts/failed_tests_spec.rb @@ -13,7 +13,7 @@ 'suites' => [ { 'failed_count' => 1, - 'name' => 'rspec unit pg12 10/12', + 'name' => 'rspec unit pg13 10/12', 'test_cases' => [ { 'status' => 'failed', @@ -23,7 +23,7 @@ }, { 'failed_count' => 1, - 'name' => 'rspec-ee unit pg12', + 'name' => 'rspec-ee unit pg13', 'test_cases' => [ { 'status' => 'failed', @@ -33,7 +33,7 @@ }, { 'failed_count' => 1, - 'name' => 'rspec unit pg13 10/12', + 'name' => 'rspec unit pg14 10/12', 'test_cases' => [ { 'status' => 'failed',