diff --git a/.gitignore b/.gitignore index 8d4ec85f3b2..032f8785e3d 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,6 @@ jest-snapshot-test-report.json # CSS compilation for cssbundling app/assets/builds/ + +# ruby-lsp +.index.yml diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml index 63edfd20044..67b4bf7a054 100644 --- a/.gitlab/ci/qa.gitlab-ci.yml +++ b/.gitlab/ci/qa.gitlab-ci.yml @@ -208,6 +208,20 @@ e2e:test-on-gdk: SKIP_MESSAGE: Skipping test-on-gdk due to mr containing only quarantine changes! GDK_IMAGE: "${CI_REGISTRY_IMAGE}/gitlab-qa-gdk:${CI_COMMIT_SHA}" +e2e:test-on-cng: + extends: + - .e2e-trigger-base + - .qa:rules:e2e:test-on-cng + stage: qa + needs: + - build-assets-image + - e2e-test-pipeline-generate + variables: + QA_RUN_TYPE: e2e-test-on-cng + PIPELINE_NAME: E2E CNG + DYNAMIC_PIPELINE_YML: test-on-cng-pipeline.yml + SKIP_MESSAGE: Skipping test-on-cng due to mr containing only quarantine changes! + e2e:code-suggestions-eval: extends: - .qa:rules:code-suggestions-eval diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index eaf746be8d1..2f9050e9fbf 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -418,6 +418,7 @@ .qa-patterns: &qa-patterns - ".dockerignore" - "{,jh/}qa/**/*" + - ".gitlab/ci/{package-and-test,qa-common,test-on-cng,test-on-gdk}/*" # Frontend view patterns + .qa-patterns .frontend-qa-patterns: &frontend-qa-patterns @@ -1725,6 +1726,13 @@ - !reference [".qa:rules:e2e-blocking", rules] - !reference [".qa:rules:e2e-schedule-blocking", rules] +.qa:rules:e2e:test-on-cng: + rules: + - !reference [".qa:rules:package-and-test-never-run", rules] + - <<: [*if-default-branch-schedule-nightly, *qa-e2e-test-schedule-variables] + - <<: *if-merge-request + changes: *qa-patterns + .qa:rules:package-and-test-nightly: rules: - !reference [".qa:rules:package-and-test-never-run", rules] diff --git a/.gitlab/ci/test-on-cng/main.gitlab-ci.yml b/.gitlab/ci/test-on-cng/main.gitlab-ci.yml new file mode 100644 index 00000000000..a251f19a621 --- /dev/null +++ b/.gitlab/ci/test-on-cng/main.gitlab-ci.yml @@ -0,0 +1,107 @@ +# This pipeline runs E2E tests against CNG build which is deployed via helm chart on a job local kind kubernetes cluster + +include: + - local: .gitlab/ci/cng/main.gitlab-ci.yml + - local: .gitlab/ci/qa-common/main.gitlab-ci.yml + - local: .gitlab/ci/qa-common/variables.gitlab-ci.yml + - local: .gitlab/ci/qa-common/rules.gitlab-ci.yml + +workflow: + rules: + - when: always + +.cng-base: + image: registry.gitlab.com/gitlab-org/gitlab-build-images/${BUILD_OS}-${OS_VERSION}-ruby-${RUBY_VERSION}:bundler-${BUNDLER_VERSION}-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-kubectl-1.23-helm-3.14-kind-0.20 + stage: test + extends: .qa-cache + needs: [build-cng] + tags: [saas-linux-2xlarge-amd64] + services: + - docker:${DOCKER_VERSION}-dind + variables: + DOCKER_HOST: tcp://docker:2375 + FF_NETWORK_PER_BUILD: "true" + NAMESPACE: gitlab + KUBECONFIG: /root/.kube/config + BUNDLE_WITHOUT: development + GITLAB_USERNAME: root + GITLAB_PASSWORD: 5iveL!fe + GITLAB_ADMIN_USERNAME: root + GITLAB_ADMIN_PASSWORD: 5iveL!fe + GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN + QA_DOCKER_NETWORK: host + QA_GENERATE_ALLURE_REPORT: "true" + QA_CAN_TEST_PRAEFECT: "false" + before_script: + - export GITLAB_DOMAIN="$(getent hosts docker | awk '{ print $1 }' | head -n1).nip.io" + - export QA_GITLAB_URL="http://gitlab.${GITLAB_DOMAIN}" + - source scripts/qa/cng_deploy/cng-kind.sh + - setup_cluster "scripts/qa/cng_deploy/config/kind-config.yml" + - deploy "${GITLAB_DOMAIN}" + - cd qa && bundle install + script: + - export QA_COMMAND="bundle exec bin/qa ${QA_SCENARIO:=Test::Instance::All} $QA_GITLAB_URL -- $QA_TESTS --force-color --order random --format documentation --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml" + - echo "Running - '$QA_COMMAND'" + - eval "$QA_COMMAND" + after_script: + - source scripts/qa/cng_deploy/cng-kind.sh + - echo -e "\e[0Ksection_start:`date +%s`:log_deploy[collapsed=true]\r\e[0KDeployment info" + - save_install_logs + - echo -e "\e[0Ksection_end:`date +%s`:log_deploy\r\e[0K" + artifacts: + expire_in: 1 day + when: always + reports: + junit: qa/tmp/rspec-*.xml + paths: + - "*.log" + - qa/tmp/allure-results + +# ========================================== +# Pre stage +# ========================================== +build-cng-env: + stage: .pre + extends: .build-cng-env + +build-cng: + stage: .pre + extends: .build-cng + needs: [build-cng-env] + +# ========================================== +# Test stage +# ========================================== +cng-qa-smoke: + extends: + - .cng-base + variables: + QA_SCENARIO: Test::Instance::Smoke + +# Test run against environment with minimum supported redis version defined in lib/system_check/app/redis_version_check.rb +cng-qa-min-redis-version: + extends: cng-qa-smoke + variables: + REDIS_VERSION_TYPE: MIN_REDIS_VERSION + +# ========================================== +# Post test stage +# ========================================== +e2e-test-report: + extends: .rules:report:allure-report + variables: + ALLURE_REPORT_RESULTS_GLOB: "qa/tmp/allure-results" + +export-test-metrics: + extends: + - .export-test-metrics + - .rules:report:process-results + variables: + QA_METRICS_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/test-metrics-*.json + +notify-slack: + extends: + - .notify-slack + - .rules:report:process-results + variables: + QA_RSPEC_XML_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/rspec-*.xml diff --git a/.index.yml.example b/.index.yml.example new file mode 100644 index 00000000000..2070a8f99bb --- /dev/null +++ b/.index.yml.example @@ -0,0 +1,8 @@ +included_patterns: + - "**/*.rb" + +excluded_patterns: + - "**/spec/**/*" + - qa/qa/specs/features/**/* + - vendor/**/* + - ".bundle/**/*" diff --git a/.rubocop_todo/gitlab/avoid_gitlab_instance_checks.yml b/.rubocop_todo/gitlab/avoid_gitlab_instance_checks.yml index 476489b2846..a8390f4cc81 100644 --- a/.rubocop_todo/gitlab/avoid_gitlab_instance_checks.yml +++ b/.rubocop_todo/gitlab/avoid_gitlab_instance_checks.yml @@ -91,7 +91,6 @@ Gitlab/AvoidGitlabInstanceChecks: - 'ee/app/services/llm/base_service.rb' - 'ee/app/services/namespaces/service_accounts/create_service.rb' - 'ee/app/workers/ee/ci/build_finished_worker.rb' - - 'ee/app/workers/elastic_remove_expired_namespace_subscriptions_from_index_cron_worker.rb' - 'ee/app/workers/gitlab_subscriptions/add_on_purchases/bulk_refresh_user_assignments_worker.rb' - 'ee/app/workers/gitlab_subscriptions/add_on_purchases/schedule_bulk_refresh_user_assignments_worker.rb' - 'ee/app/workers/gitlab_subscriptions/refresh_seats_worker.rb' diff --git a/Gemfile b/Gemfile index 923512cd577..777e95217e8 100644 --- a/Gemfile +++ b/Gemfile @@ -378,7 +378,10 @@ gem 'thrift', '>= 0.16.0' # rubocop:todo Gemfile/MissingFeatureCategory # I18n gem 'rails-i18n', '~> 7.0', feature_category: :internationalization gem 'gettext_i18n_rails', '~> 1.11.0', feature_category: :internationalization -gem 'gettext', '~> 3.3', require: false, group: [:development, :test], feature_category: :internationalization +gem 'gettext', '~> 3.4', '>= 3.4.9', + require: false, + group: [:development, :test], + feature_category: :internationalization gem 'batch-loader', '~> 2.0.1' # rubocop:todo Gemfile/MissingFeatureCategory diff --git a/Gemfile.lock b/Gemfile.lock index 8a98e3ad6cd..cd96a5d7be5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1905,7 +1905,7 @@ DEPENDENCIES fog-local (~> 0.8) fugit (~> 1.8.1) fuubar (~> 2.2.0) - gettext (~> 3.3) + gettext (~> 3.4, >= 3.4.9) gettext_i18n_rails (~> 1.11.0) gitaly (~> 16.9.1) gitlab-backup-cli! diff --git a/app/assets/javascripts/authentication/password/components/password_input.vue b/app/assets/javascripts/authentication/password/components/password_input.vue index 7f2a2beaa47..874566ff302 100644 --- a/app/assets/javascripts/authentication/password/components/password_input.vue +++ b/app/assets/javascripts/authentication/password/components/password_input.vue @@ -81,7 +81,7 @@ export default { /> diff --git a/app/assets/javascripts/ci/catalog/graphql/fragments/catalog_resource.fragment.graphql b/app/assets/javascripts/ci/catalog/graphql/fragments/catalog_resource.fragment.graphql index 64c965c08d0..6e6e193f73c 100644 --- a/app/assets/javascripts/ci/catalog/graphql/fragments/catalog_resource.fragment.graphql +++ b/app/assets/javascripts/ci/catalog/graphql/fragments/catalog_resource.fragment.graphql @@ -19,6 +19,7 @@ fragment CatalogResourceFields on CiCatalogResource { author { id name + username webUrl } } diff --git a/app/assets/javascripts/ci/pipeline_details/dag/components/dag_annotations.vue b/app/assets/javascripts/ci/pipeline_details/dag/components/dag_annotations.vue index a1500166cdc..27f0694afc9 100644 --- a/app/assets/javascripts/ci/pipeline_details/dag/components/dag_annotations.vue +++ b/app/assets/javascripts/ci/pipeline_details/dag/components/dag_annotations.vue @@ -31,7 +31,7 @@ export default { 'gl-flex-direction-column', 'gl-fixed', 'gl-right-1', - 'gl-top-66vh', + 'gl-deprecated-top-66vh', 'gl-w-max-content', 'gl-px-5', 'gl-py-4', diff --git a/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_stage.vue b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_stage.vue index 2c8cd23ae1c..06b44d96206 100644 --- a/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_stage.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_stage.vue @@ -25,7 +25,7 @@ export default { errorMessage: __('Something went wrong on our end.'), loadingText: __('Loading...'), mergeTrainMessage: s__('Pipeline|Merge train pipeline jobs can not be retried'), - stage: __('Stage:'), + stage: __('Stage'), viewStageLabel: __('View Stage: %{title}'), }, components: { @@ -133,8 +133,13 @@ export default {
- {{ $options.i18n.stage }} - {{ stageName }} + +
@@ -150,6 +155,7 @@ export default { v-else class="mini-pipeline-graph-dropdown-menu gl-overflow-y-auto gl-m-0 gl-p-0" data-testid="mini-pipeline-graph-dropdown-menu-list" + @click.stop > diff --git a/app/assets/javascripts/environments/environment_details/components/deployment_history.vue b/app/assets/javascripts/environments/environment_details/components/deployment_history.vue index b963b72957e..324aae62c79 100644 --- a/app/assets/javascripts/environments/environment_details/components/deployment_history.vue +++ b/app/assets/javascripts/environments/environment_details/components/deployment_history.vue @@ -176,7 +176,7 @@ export default { v-if="isLoading" class="gl-absolute gl-top-0 gl-left-0 gl-w-full gl-h-full gl-z-index-200 gl-bg-gray-10 gl-opacity-3" > - +
diff --git a/app/assets/javascripts/merge_requests/components/sticky_header.vue b/app/assets/javascripts/merge_requests/components/sticky_header.vue index 55a371837c9..756f7766a04 100644 --- a/app/assets/javascripts/merge_requests/components/sticky_header.vue +++ b/app/assets/javascripts/merge_requests/components/sticky_header.vue @@ -139,7 +139,7 @@ export default {