diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8bb09825e6..c722f0a597 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ stages: # in cases where jobs require Docker-in-Docker, the job # definition must be extended with `.use-docker-in-docker` default: - image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34" + image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36" tags: - gitlab-org # All jobs are interruptible by default @@ -38,7 +38,7 @@ workflow: when: never # For merge requests, create a pipeline. - if: '$CI_MERGE_REQUEST_IID' - # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.). + # For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.). - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # For tags, create a pipeline. - if: '$CI_COMMIT_TAG' @@ -53,6 +53,8 @@ workflow: variables: RAILS_ENV: "test" NODE_ENV: "test" + # we override the max_old_space_size to prevent OOM errors + NODE_OPTIONS: --max_old_space_size=3584 SIMPLECOV: "true" GIT_DEPTH: "20" GIT_SUBMODULE_STRATEGY: "none" @@ -100,6 +102,7 @@ include: - local: .gitlab/ci/qa.gitlab-ci.yml - local: .gitlab/ci/reports.gitlab-ci.yml - local: .gitlab/ci/rails.gitlab-ci.yml + - local: .gitlab/ci/vendored-gems.gitlab-ci.yml - local: .gitlab/ci/review.gitlab-ci.yml - local: .gitlab/ci/rules.gitlab-ci.yml - local: .gitlab/ci/setup.gitlab-ci.yml @@ -111,4 +114,7 @@ include: - local: .gitlab/ci/dast.gitlab-ci.yml - local: .gitlab/ci/workhorse.gitlab-ci.yml - local: .gitlab/ci/graphql.gitlab-ci.yml - - remote: 'https://gitlab.com/gitlab-org/frontend/untamper-my-lockfile/-/raw/main/.gitlab-ci-template.yml' + # switch the remote include to a local include until this is resolved: + # https://gitlab.com/gitlab-org/gitlab/-/issues/327299 + # - remote: 'https://gitlab.com/gitlab-org/frontend/untamper-my-lockfile/-/raw/main/.gitlab-ci-template.yml' + - local: .gitlab/ci/untamper-my-lockfile.yml diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index 2eda1a890d..6432640570 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -135,7 +135,7 @@ /doc/api/invitations.md @aqualls /doc/api/experiments.md @aqualls /doc/development/experiment_guide/ @aqualls -/doc/development/snowplow.md @aqualls +/doc/development/snowplow/ @aqualls /doc/development/usage_ping/ @aqualls /doc/user/admin_area/license.md @aqualls @@ -193,7 +193,7 @@ Dangerfile @gl-quality/eng-prod /lib/gitlab/auth/ldap/ @dblessing @mkozono [Templates] -/lib/gitlab/ci/templates/ @nolith @shinya.maeda +/lib/gitlab/ci/templates/ @nolith @shinya.maeda @matteeyah /lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah /lib/gitlab/ci/templates/Security/ @plafoucriere @gonzoyumo @twoodham @sethgitlab @@ -277,6 +277,7 @@ Dangerfile @gl-quality/eng-prod /lib/gitlab/experimentation/ @gitlab-org/growth/experiment-devs /lib/gitlab/experimentation.rb @gitlab-org/growth/experiment-devs /lib/gitlab/experimentation_logger.rb @gitlab-org/growth/experiment-devs +/ee/spec/requests/api/experiments_spec.rb @gitlab-org/growth/experiment-devs [Legal] /config/dependency_decisions.yml @gitlab-org/legal-reviewers diff --git a/.gitlab/changelog_config.yml b/.gitlab/changelog_config.yml new file mode 100644 index 0000000000..7aa18cc8f3 --- /dev/null +++ b/.gitlab/changelog_config.yml @@ -0,0 +1,38 @@ +--- +# Settings for generating changelogs using the GitLab API. See +# https://docs.gitlab.com/ee/api/repositories.html#generate-changelog-data for +# more information. +categories: + added: Added + fixed: Fixed + changed: Changed + deprecated: Deprecated + removed: Removed + security: Security + performance: Performance + other: Other +template: | + {% if categories %} + {% each categories %} + ### {{ title }} ({% if single_change %}1 change{% else %}{{ count }} changes{% end %}) + + {% each entries %} + - [{{ title }}]({{ commit.reference }})\ + {% if author.contributor %} by {{ author.reference }}{% end %}\ + {% if commit.trailers.MR %}\ + ([merge request]({{ commit.trailers.MR }}))\ + {% else %}\ + {% if merge_request %}\ + ([merge request]({{ merge_request.reference }}))\ + {% end %}\ + {% end %}\ + {% if commit.trailers.EE %}\ + **GitLab Enterprise Edition**\ + {% end %} + + {% end %} + + {% end %} + {% else %} + No changes. + {% end %} diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index e6c3e7598d..4e35247204 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -1,6 +1,8 @@ -# This image is used by the `review-qa-*` jobs. Not currently used by the `omnibus-gitlab` pipelines which rebuild this -# image, e.g. https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/-/jobs/587107399, which we could probably avoid. -# See https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5429. +# This image is used by the `review-qa-*` jobs. The image name is also passed to the downstream `omnibus-gitlab-mirror` pipeline +# triggered by `package-and-qa` so that it doesn't have to rebuild it a second time. The downstream `omnibus-gitlab-mirror` pipeline +# itself passes the image name to the `gitlab-qa-mirror` pipeline so that it can use it instead of inferring an end-to-end image +# from the GitLab image built by the downstream `omnibus-gitlab-mirror` pipeline. +# See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#testing-code-in-merge-requests for more details. build-qa-image: extends: - .use-kaniko diff --git a/.gitlab/ci/cache-repo.gitlab-ci.yml b/.gitlab/ci/cache-repo.gitlab-ci.yml index 324c861508..475cbca315 100644 --- a/.gitlab/ci/cache-repo.gitlab-ci.yml +++ b/.gitlab/ci/cache-repo.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Builds a cached .tar.gz of the master branch with full history and +# Builds a cached .tar.gz of the $CI_DEFAULT_BRANCH branch with full history and # uploads it to Google Cloud Storage. This archive is downloaded by a # script defined by a CI/CD variable named CI_PRE_CLONE_SCRIPT. This has # two benefits: @@ -41,6 +41,7 @@ cache-repo: cd $CI_PROJECT_NAME; time git repack -d; echo "Archiving $CI_PROJECT_NAME into /tmp/$SHALLOW_CLONE_TAR_FILENAME."; + time git remote rm origin; time tar cf /tmp/$SHALLOW_CLONE_TAR_FILENAME .; echo "GZipping /tmp/$SHALLOW_CLONE_TAR_FILENAME."; time gzip /tmp/$SHALLOW_CLONE_TAR_FILENAME; @@ -52,7 +53,9 @@ cache-repo: echo "Cloning $CI_REPOSITORY_URL into $CI_PROJECT_NAME."; time git clone --progress $CI_REPOSITORY_URL $CI_PROJECT_NAME; cd $CI_PROJECT_NAME; + time git repack -d; echo "Archiving $CI_PROJECT_NAME into /tmp/$FULL_CLONE_TAR_FILENAME."; + time git remote rm origin; time tar cf /tmp/$FULL_CLONE_TAR_FILENAME .; echo "GZipping /tmp/$FULL_CLONE_TAR_FILENAME."; time gzip /tmp/$FULL_CLONE_TAR_FILENAME; diff --git a/.gitlab/ci/dast.gitlab-ci.yml b/.gitlab/ci/dast.gitlab-ci.yml index 33778b9cbd..a8a201bd1f 100644 --- a/.gitlab/ci/dast.gitlab-ci.yml +++ b/.gitlab/ci/dast.gitlab-ci.yml @@ -97,7 +97,7 @@ DAST-fullscan-ruleset5: variables: DAST_USERNAME: "user5" script: - - export DAST_EXCLUDE_RULES=$(echo $DAST_RULES | enable_rule 10010 | enable_rule 10011 | enable_rule 10015 | enable_rule 10017 | enable_rule 10019) + - export DAST_EXCLUDE_RULES=$(echo $DAST_RULES | enable_rule 10010 | enable_rule 10011 | enable_rule 10017 | enable_rule 10019) - echo $DAST_EXCLUDE_RULES - /analyze -t $DAST_WEBSITE -d diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index b42b32ea44..8f70127be6 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -10,17 +10,18 @@ # because some repos are private and CI_JOB_TOKEN cannot access files. # See https://gitlab.com/gitlab-org/gitlab/issues/191273 GIT_DEPTH: 1 + # By default, deploy the Review App using the `master` branch of the `gitlab-org/gitlab-docs` project + DOCS_BRANCH: master environment: - name: review-docs/$DOCS_GITLAB_REPO_SUFFIX-$CI_MERGE_REQUEST_IID + name: review-docs/mr-${CI_MERGE_REQUEST_IID} # DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are CI variables # Discussion: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/14236/diffs#note_40140693 auto_stop_in: 2 weeks - url: http://docs-preview-$DOCS_GITLAB_REPO_SUFFIX-$CI_MERGE_REQUEST_IID.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX + url: http://${DOCS_BRANCH}-${DOCS_GITLAB_REPO_SUFFIX}-${CI_MERGE_REQUEST_IID}.${DOCS_REVIEW_APPS_DOMAIN}/${DOCS_GITLAB_REPO_SUFFIX} on_stop: review-docs-cleanup before_script: - - apk add --update openssl - - gem install httparty --no-document --version 0.17.3 - - gem install gitlab --no-document --version 4.13.0 + - source ./scripts/utils.sh + - install_gitlab_gem # Always trigger a docs build in gitlab-docs only on docs-only branches. # Useful to preview the docs changes live. @@ -33,7 +34,7 @@ review-docs-deploy: review-docs-cleanup: extends: .review-docs environment: - name: review-docs/$DOCS_GITLAB_REPO_SUFFIX-$CI_MERGE_REQUEST_IID + name: review-docs/mr-${CI_MERGE_REQUEST_IID} action: stop script: - ./scripts/trigger-build docs cleanup @@ -64,10 +65,8 @@ docs-lint links: - cd /tmp/gitlab-docs # Build HTML from Markdown - bundle exec nanoc - # Check the internal links - - bundle exec nanoc check internal_links - # Check the internal anchor links - - bundle exec nanoc check internal_anchors + # Check the internal links and anchors (in parallel) + - "parallel time bundle exec nanoc check ::: internal_links internal_anchors" ui-docs-links lint: extends: diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 910a58bcd0..c39f5cdce9 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -1,22 +1,15 @@ -.frontend-base: - extends: - - .default-retry - - .default-before_script - variables: - SETUP_DB: "false" - # we override the max_old_space_size to prevent OOM errors - NODE_OPTIONS: --max_old_space_size=3584 - .yarn-install: &yarn-install - source scripts/utils.sh - run_timed_command "retry yarn install --frozen-lockfile" .compile-assets-base: extends: - - .frontend-base + - .default-retry + - .default-before_script - .assets-compile-cache - image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-git-2.29-lfs-2.9-node-14.15-yarn-1.22-graphicsmagick-1.3.34 + image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-git-2.31-lfs-2.9-node-14.15-yarn-1.22-graphicsmagick-1.3.36 variables: + SETUP_DB: "false" WEBPACK_VENDOR_DLL: "true" stage: prepare script: @@ -93,13 +86,13 @@ update-yarn-cache: .frontend-fixtures-base: extends: - - .frontend-base + - .default-retry + - .default-before_script - .rails-cache - .use-pg11 stage: fixtures needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets"] variables: - SETUP_DB: "true" WEBPACK_VENDOR_DLL: "true" script: - run_timed_command "gem install knapsack --no-document" @@ -151,10 +144,8 @@ graphql-schema-dump: .frontend-test-base: extends: - - .frontend-base + - .default-retry - .yarn-cache - variables: - USE_BUNDLE_INSTALL: "false" stage: test eslint-as-if-foss: @@ -246,7 +237,7 @@ coverage-frontend: extends: - .default-retry - .yarn-cache - - .frontend:rules:ee-mr-and-master-only + - .frontend:rules:ee-mr-and-default-branch-only needs: ["jest"] stage: post-test before_script: diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index de4b609098..891457afe6 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -27,7 +27,7 @@ .rails-cache: cache: - key: "rails-v4" + key: "rails-v5" paths: - vendor/ruby/ - vendor/gitaly-ruby/ @@ -87,7 +87,7 @@ policy: pull .use-pg11: - image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34" + image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36" services: - name: postgres:11.6 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] @@ -96,7 +96,7 @@ POSTGRES_HOST_AUTH_METHOD: trust .use-pg12: - image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.34" + image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36" services: - name: postgres:12 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] @@ -105,7 +105,7 @@ POSTGRES_HOST_AUTH_METHOD: trust .use-pg11-ee: - image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34" + image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36" services: - name: postgres:11.6 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] @@ -116,7 +116,7 @@ POSTGRES_HOST_AUTH_METHOD: trust .use-pg12-ee: - image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.34" + image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36" services: - name: postgres:12 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] diff --git a/.gitlab/ci/memory.gitlab-ci.yml b/.gitlab/ci/memory.gitlab-ci.yml index ef6c9b9c8f..3e5639e4d6 100644 --- a/.gitlab/ci/memory.gitlab-ci.yml +++ b/.gitlab/ci/memory.gitlab-ci.yml @@ -44,8 +44,6 @@ memory-on-boot: NODE_ENV: "production" RAILS_ENV: "production" SETUP_DB: "true" - # we override the max_old_space_size to prevent OOM errors - NODE_OPTIONS: --max_old_space_size=3584 script: - PATH_TO_HIT="/users/sign_in" CUT_OFF=0.3 bundle exec derailed exec perf:mem >> 'tmp/memory_on_boot.txt' - scripts/generate-memory-metrics-on-boot tmp/memory_on_boot.txt >> 'tmp/memory_on_boot_metrics.txt' diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index e1ddefca99..064aa5a835 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -142,7 +142,7 @@ ############################ ####################################################### -# EE/FOSS: default refs (MRs, master, schedules) jobs # +# EE/FOSS: default refs (MRs, default branch, schedules) jobs # setup-test-env: extends: - .rails-job-base @@ -183,6 +183,7 @@ setup-test-env: - tmp/tests/gitlab-workhorse/gitlab-workhorse - tmp/tests/gitlab-workhorse/gitlab-resize-image - tmp/tests/gitlab-workhorse/config.toml + - tmp/tests/gitlab-workhorse/WORKHORSE_TREE - tmp/tests/repositories/ - tmp/tests/second_storage/ when: always @@ -256,17 +257,6 @@ static-analysis: - run_timed_command "retry yarn install --frozen-lockfile" - scripts/static-analysis -downtime_check: - extends: - - .rails-job-base - - .rails:rules:downtime_check - needs: [] - stage: test - variables: - SETUP_DB: "false" - script: - - bundle exec rake downtime_check - rspec migration pg11: extends: - .rspec-base-pg11 @@ -346,7 +336,7 @@ db:migrate:reset: db:check-schema: extends: - .db-job-base - - .rails:rules:ee-mr-and-master-only + - .rails:rules:ee-mr-and-default-branch-only script: - source scripts/schema_changed.sh @@ -358,32 +348,31 @@ db:check-migrations: - scripts/validate_migration_schema allow_failure: true -db:migrate-from-v12.10.0: +db:migrate-from-previous-major-version: extends: .db-job-base variables: + USE_BUNDLE_INSTALL: "false" SETUP_DB: "false" + PROJECT_TO_CHECKOUT: "gitlab-foss" + TAG_TO_CHECKOUT: "v12.10.14" script: - - export PROJECT_TO_CHECKOUT="gitlab" - - export TAG_TO_CHECKOUT="v12.10.0-ee" - - '[[ -d "ee/" ]] || export PROJECT_TO_CHECKOUT="gitlab-foss"' - - '[[ -d "ee/" ]] || export TAG_TO_CHECKOUT="v12.10.0"' + - '[[ -d "ee/" ]] || export PROJECT_TO_CHECKOUT="gitlab"' + - '[[ -d "ee/" ]] || export TAG_TO_CHECKOUT="${TAG_TO_CHECKOUT}-ee"' - retry 'git fetch https://gitlab.com/gitlab-org/$PROJECT_TO_CHECKOUT.git $TAG_TO_CHECKOUT' - git checkout -f FETCH_HEAD + # Patch Gemfile of the previous major version for compatibility. - sed -i -e "s/gem 'grpc', '~> 1.24.0'/gem 'grpc', '~> 1.30.2'/" Gemfile # Update gRPC for Ruby 2.7 - - sed -i -e "s/gem 'google-protobuf', '~> 3.8.0'/gem 'google-protobuf', '~> 3.12.0'/" Gemfile - - gem install bundler:1.17.3 - - bundle update google-protobuf grpc bootsnap - - bundle install $BUNDLE_INSTALL_FLAGS - - date + - sed -i -e "s/gem 'google-protobuf', '~> 3.8.0'/gem 'google-protobuf', '~> 3.12'/" Gemfile + - sed -i -e "s/gem 'nokogiri', '~> 1.10.5'/gem 'nokogiri', '~> 1.11.0'/" Gemfile + - sed -i -e "s/gem 'mimemagic', '~> 0.3.2'/gem 'ruby-magic', '~> 0.3.2'/" Gemfile + - run_timed_command "gem install bundler:1.17.3" + - run_timed_command "bundle update google-protobuf nokogiri grpc mimemagic bootsnap" + - run_timed_command "bundle install ${BUNDLE_INSTALL_FLAGS}" - cp config/gitlab.yml.example config/gitlab.yml - - bundle exec rake db:drop db:create db:structure:load db:seed_fu - - date + - run_timed_command "bundle exec rake db:drop db:create db:structure:load db:migrate db:seed_fu" - git checkout -f $CI_COMMIT_SHA - - bundle install $BUNDLE_INSTALL_FLAGS - - date - - . scripts/prepare_build.sh - - date - - bundle exec rake db:migrate + - run_timed_command "bundle install ${BUNDLE_INSTALL_FLAGS}" + - run_timed_command "bundle exec rake db:migrate" db:rollback: extends: .db-job-base @@ -535,11 +524,11 @@ rspec:feature-flags: run_timed_command "bundle exec scripts/used-feature-flags"; fi -# EE/FOSS: default refs (MRs, master, schedules) jobs # +# EE/FOSS: default refs (MRs, default branch, schedules) jobs # ####################################################### ################################################## -# EE: default refs (MRs, master, schedules) jobs # +# EE: default refs (MRs, default branch, schedules) jobs # rspec migration pg11-as-if-foss: extends: - .rspec-base-pg11-as-if-foss @@ -682,81 +671,81 @@ db:rollback geo: script: - bundle exec rake geo:db:migrate VERSION=20170627195211 - bundle exec rake geo:db:migrate -# EE: default refs (MRs, master, schedules) jobs # +# EE: default refs (MRs, default branch, schedules) jobs # ################################################## ########################################## -# EE/FOSS: master nightly scheduled jobs # +# EE/FOSS: default branch nightly scheduled jobs # rspec migration pg12: extends: - .rspec-base-pg12 - .rspec-base-migration - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-migration-parallel rspec unit pg12: extends: - .rspec-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-unit-parallel rspec integration pg12: extends: - .rspec-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-integration-parallel rspec system pg12: extends: - .rspec-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage + - .rails:rules:default-branch-schedule-nightly--code-backstage - .rspec-system-parallel -# EE/FOSS: master nightly scheduled jobs # +# EE/FOSS: default branch nightly scheduled jobs # ########################################## ##################################### -# EE: master nightly scheduled jobs # +# EE: default branch nightly scheduled jobs # rspec-ee migration pg12: extends: - .rspec-ee-base-pg12 - .rspec-base-migration - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-migration-parallel rspec-ee unit pg12: extends: - .rspec-ee-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-unit-parallel rspec-ee integration pg12: extends: - .rspec-ee-base-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .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:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-system-parallel rspec-ee unit pg12 geo: extends: - .rspec-ee-base-geo-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only - .rspec-ee-unit-geo-parallel rspec-ee integration pg12 geo: extends: - .rspec-ee-base-geo-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only rspec-ee system pg12 geo: extends: - .rspec-ee-base-geo-pg12 - - .rails:rules:master-schedule-nightly--code-backstage-ee-only -# EE: master nightly scheduled jobs # + - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only +# EE: default branch nightly scheduled jobs # ##################################### ################################################## @@ -799,7 +788,7 @@ fail-pipeline-early: GIT_DEPTH: 1 before_script: - source scripts/utils.sh - - install_api_client_dependencies_with_apt + - install_gitlab_gem script: - fail_pipeline_early # EE: Canonical MR pipelines diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 76191a923b..e1037edc32 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -29,7 +29,6 @@ review-build-cng: stage: review-prepare before_script: - source ./scripts/utils.sh - - install_api_client_dependencies_with_apk - install_gitlab_gem needs: - job: compile-production-assets @@ -161,7 +160,7 @@ review-qa-smoke: review-qa-all: extends: - .review-qa-base - - .review:rules:mr-only-manual + - .review:rules:review-qa-all parallel: 5 script: - export KNAPSACK_REPORT_PATH=knapsack/master_report.json @@ -198,7 +197,7 @@ review-performance: parallel-spec-reports: extends: - - .review:rules:mr-only-manual + - .review:rules:review-qa-all image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine stage: post-qa dependencies: ["review-qa-all"] @@ -234,7 +233,15 @@ danger-review: - run_timed_command "bundle install --jobs=$(nproc) --path=vendor --retry=3 --quiet --with danger" - run_timed_command "retry yarn install --frozen-lockfile" script: - - run_timed_command "bundle exec danger --fail-on-errors=true --verbose" + - > + if [ -z "$DANGER_GITLAB_API_TOKEN" ]; then + # Force danger to skip CI source GitLab and fallback to "local only git repo". + unset GITLAB_CI + # We need to base SHA to help danger determine the base commit for this shallow clone. + run_timed_command "bundle exec danger dry_run --fail-on-errors=true --verbose --base='$CI_MERGE_REQUEST_DIFF_BASE_SHA'" + else + run_timed_command "bundle exec danger --fail-on-errors=true --verbose" + fi update-danger-review-cache: extends: diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index e76b0f2d07..c2d16582a6 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -11,25 +11,25 @@ if: '$CI_PROJECT_NAME != "gitlab-foss" && $CI_PROJECT_NAME != "gitlab-ce" && $CI_PROJECT_NAME != "gitlabhq"' .if-default-refs: &if-default-refs - if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG || $FORCE_GITLAB_CI' + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG || $FORCE_GITLAB_CI' -.if-master-refs: &if-master-refs - if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main"' +.if-default-branch-refs: &if-default-branch-refs + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' -.if-master-push: &if-master-push - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_REF_NAME == "main") && $CI_PIPELINE_SOURCE == "push"' +.if-default-branch-push: &if-default-branch-push + if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"' -.if-master-schedule-2-hourly: &if-master-schedule-2-hourly - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_REF_NAME == "main") && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"' +.if-default-branch-schedule-2-hourly: &if-default-branch-schedule-2-hourly + if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"' -.if-master-schedule-nightly: &if-master-schedule-nightly - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_REF_NAME == "main") && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "nightly"' +.if-default-branch-schedule-nightly: &if-default-branch-schedule-nightly + if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "nightly"' .if-auto-deploy-branches: &if-auto-deploy-branches if: '$CI_COMMIT_BRANCH =~ /^\d+-\d+-auto-deploy-\d+$/' -.if-master-or-tag: &if-master-or-tag - if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main" || $CI_COMMIT_TAG' +.if-default-branch-or-tag: &if-default-branch-or-tag + if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_TAG' .if-merge-request: &if-merge-request if: '$CI_MERGE_REQUEST_IID' @@ -52,8 +52,8 @@ .if-dot-com-gitlab-org-schedule: &if-dot-com-gitlab-org-schedule if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"' -.if-dot-com-gitlab-org-master: &if-dot-com-gitlab-org-master - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && ($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "main")' +.if-dot-com-gitlab-org-default-branch: &if-dot-com-gitlab-org-default-branch + if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' .if-dot-com-gitlab-org-merge-request: &if-dot-com-gitlab-org-merge-request if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_MERGE_REQUEST_IID' @@ -101,6 +101,7 @@ - ".gitlab/ci/frontend.gitlab-ci.yml" - ".gitlab/ci/build-images.gitlab-ci.yml" - ".gitlab/ci/review.gitlab-ci.yml" + - "scripts/review_apps/base-config.yaml" - "scripts/trigger-build" .ci-qa-patterns: &ci-qa-patterns @@ -131,6 +132,14 @@ - "config/webpack.config.js" - "config/helpers/*.js" +.frontend-build-patterns: &frontend-build-patterns + - "{package.json,yarn.lock}" + - "babel.config.js" + - "config/webpack.config.js" + - "config/**/*.js" + - "vendor/assets/**/*" + - "{,ee/}app/assets/**/*" + .frontend-patterns: &frontend-patterns - "{package.json,yarn.lock}" - "babel.config.js" @@ -293,7 +302,7 @@ ################ .shared:rules:update-cache: rules: - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly - <<: *if-security-schedule - <<: *if-merge-request-title-update-caches @@ -314,6 +323,7 @@ rules: - <<: *if-not-canonical-namespace when: never + - <<: *if-auto-deploy-branches - changes: *ci-build-images-patterns - changes: *code-qa-patterns @@ -394,8 +404,8 @@ rules: - <<: *if-not-canonical-namespace when: never - - <<: *if-default-refs - changes: *code-qa-patterns + - <<: *if-auto-deploy-branches + - changes: *code-qa-patterns .frontend:rules:compile-test-assets: rules: @@ -434,26 +444,26 @@ - <<: *if-merge-request changes: *frontend-patterns -.frontend:rules:ee-mr-and-master-only: +.frontend:rules:ee-mr-and-default-branch-only: rules: - <<: *if-not-ee when: never - <<: *if-merge-request changes: *code-backstage-patterns when: always - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *code-backstage-patterns .frontend:rules:qa-frontend-node: rules: - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *frontend-dependency-patterns - <<: *if-merge-request changes: *frontend-dependency-patterns .frontend:rules:qa-frontend-node-latest: rules: - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *frontend-dependency-patterns allow_failure: true - <<: *if-merge-request @@ -464,8 +474,8 @@ rules: - <<: *if-not-canonical-namespace when: never - - if: '$DANGER_GITLAB_API_TOKEN && $CI_MERGE_REQUEST_IID && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main")' - changes: *frontend-patterns + - if: '$DANGER_GITLAB_API_TOKEN && $CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' + changes: *frontend-build-patterns allow_failure: true ################ @@ -484,7 +494,7 @@ rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly ############ # QA rules # @@ -553,6 +563,7 @@ when: never - <<: *if-merge-request changes: *db-patterns + when: manual .rails:rules:ee-and-foss-unit: rules: @@ -824,14 +835,14 @@ - changes: *db-library-patterns - <<: *if-merge-request-title-run-all-rspec -.rails:rules:ee-mr-and-master-only: +.rails:rules:ee-mr-and-default-branch-only: rules: - <<: *if-not-ee when: never - <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request changes: *code-backstage-patterns - - <<: *if-master-refs + - <<: *if-default-branch-refs changes: *code-backstage-patterns .rails:rules:detect-tests: @@ -878,16 +889,11 @@ changes: *code-backstage-patterns when: on_failure -.rails:rules:downtime_check: - rules: - - <<: *if-merge-request - changes: *code-backstage-patterns - .rails:rules:deprecations: rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly - <<: *if-merge-request-title-run-all-rspec .rails:rules:rspec-coverage: @@ -897,7 +903,7 @@ - <<: *if-merge-request changes: *code-backstage-patterns when: always - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly - <<: *if-merge-request-title-run-all-rspec when: always @@ -905,24 +911,34 @@ rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-2-hourly + - <<: *if-default-branch-schedule-2-hourly allow_failure: true - <<: *if-merge-request-title-run-all-rspec -.rails:rules:master-schedule-nightly--code-backstage: +.rails:rules:default-branch-schedule-nightly--code-backstage: rules: - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly - <<: *if-merge-request changes: [".gitlab/ci/rails.gitlab-ci.yml"] -.rails:rules:master-schedule-nightly--code-backstage-ee-only: +.rails:rules:default-branch-schedule-nightly--code-backstage-ee-only: rules: - <<: *if-not-ee when: never - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly - <<: *if-merge-request changes: [".gitlab/ci/rails.gitlab-ci.yml"] +####################### +# Vendored gems rules # +####################### + +.vendor:rules:mail-smtp_pool: + rules: + - <<: *if-merge-request + changes: ["vendor/gems/mail-smtp_pool/**/*"] + - <<: *if-merge-request-title-run-all-rspec + ################## # Releases rules # ################## @@ -945,7 +961,7 @@ rules: - if: '$CODE_QUALITY_DISABLED' when: never - # - <<: *if-master-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 + # - <<: *if-default-branch-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 - <<: *if-default-refs changes: *code-backstage-patterns allow_failure: true @@ -954,7 +970,7 @@ rules: - if: '$SAST_DISABLED || $GITLAB_FEATURES !~ /\bsast\b/' when: never - # - <<: *if-master-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 + # - <<: *if-default-branch-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 - <<: *if-default-refs changes: *code-backstage-qa-patterns allow_failure: true @@ -963,7 +979,7 @@ rules: - if: '$DEPENDENCY_SCANNING_DISABLED || $GITLAB_FEATURES !~ /\bdependency_scanning\b/' when: never - # - <<: *if-master-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 + # - <<: *if-default-branch-refs # To be done in a later iteration: https://gitlab.com/gitlab-org/gitlab/issues/31160#note_278188255 - <<: *if-default-refs changes: *code-backstage-qa-patterns allow_failure: true @@ -984,7 +1000,7 @@ rules: - if: '$DAST_DISABLED || $GITLAB_FEATURES !~ /\bdast\b/' when: never - - <<: *if-master-schedule-nightly + - <<: *if-default-branch-schedule-nightly allow_failure: true .reports:rules:license_scanning: @@ -1007,9 +1023,12 @@ - <<: *if-dot-com-gitlab-org-merge-request changes: *frontend-patterns - <<: *if-dot-com-gitlab-org-merge-request - changes: *code-qa-patterns + changes: *code-patterns when: manual allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *qa-patterns + allow_failure: true - <<: *if-dot-com-gitlab-org-schedule .review:rules:review-deploy: @@ -1022,9 +1041,12 @@ changes: *frontend-patterns allow_failure: true - <<: *if-dot-com-gitlab-org-merge-request - changes: *code-qa-patterns + changes: *code-patterns when: manual allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *qa-patterns + allow_failure: true - <<: *if-dot-com-gitlab-org-schedule allow_failure: true @@ -1067,14 +1089,17 @@ when: manual allow_failure: true -.review:rules:mr-only-manual: +.review:rules:review-qa-all: rules: - <<: *if-not-ee when: never - <<: *if-dot-com-gitlab-org-merge-request - changes: *code-qa-patterns + changes: *code-patterns when: manual allow_failure: true + - <<: *if-dot-com-gitlab-org-merge-request + changes: *qa-patterns + allow_failure: true .review:rules:review-cleanup: rules: @@ -1100,7 +1125,7 @@ .review:rules:danger: rules: - - if: '$DANGER_GITLAB_API_TOKEN && $CI_MERGE_REQUEST_IID' + - if: '$CI_MERGE_REQUEST_IID' ############### # Setup rules # @@ -1109,13 +1134,13 @@ rules: - <<: *if-not-canonical-namespace when: never - - <<: *if-master-or-tag + - <<: *if-default-branch-or-tag changes: *code-backstage-qa-patterns when: on_success .setup:rules:dont-interrupt-me: rules: - - <<: *if-master-or-tag + - <<: *if-default-branch-or-tag allow_failure: true - <<: *if-auto-deploy-branches allow_failure: true diff --git a/.gitlab/ci/untamper-my-lockfile.yml b/.gitlab/ci/untamper-my-lockfile.yml new file mode 100644 index 0000000000..54ba160f1b --- /dev/null +++ b/.gitlab/ci/untamper-my-lockfile.yml @@ -0,0 +1,26 @@ +untamper-my-lockfile: + image: registry.gitlab.com/gitlab-org/frontend/untamper-my-lockfile:main + stage: test + needs: [] + before_script: [] + after_script: [] + cache: {} + retry: 1 + script: + - untamper-my-lockfile --lockfile yarn.lock + rules: + # Create a pipeline if the branch is named 'add-untamper-my-lockfile' in + # order to have an integration check added in the MR that introduces it + - if: $CI_COMMIT_REF_NAME == "add-untamper-my-lockfile" + # Create a pipeline if there are changes in yarn.lock _and_ we are in a + # merge request _or_ branch pipeline. + # + # This ensures that the pipeline isn't run in scheduled jobs for example + # + # Also our best effort to support both branch and MR pipelines. In certain + # projects this might trigger _two_ pipelines. These projects can be fixed + # by adding proper workflow:rules + # https://docs.gitlab.com/ee/ci/yaml/#workflowrules + - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH + changes: + - yarn.lock diff --git a/.gitlab/ci/vendored-gems.gitlab-ci.yml b/.gitlab/ci/vendored-gems.gitlab-ci.yml new file mode 100644 index 0000000000..a39c4307c1 --- /dev/null +++ b/.gitlab/ci/vendored-gems.gitlab-ci.yml @@ -0,0 +1,7 @@ +vendor mail-smtp_pool: + extends: + - .vendor:rules:mail-smtp_pool + needs: [] + trigger: + include: vendor/gems/mail-smtp_pool/.gitlab-ci.yml + strategy: depend diff --git a/.gitlab/ci/workhorse.gitlab-ci.yml b/.gitlab/ci/workhorse.gitlab-ci.yml index 8361d20d2b..ba4523f3bf 100644 --- a/.gitlab/ci/workhorse.gitlab-ci.yml +++ b/.gitlab/ci/workhorse.gitlab-ci.yml @@ -1,6 +1,6 @@ workhorse:verify: extends: .workhorse:rules:workhorse - image: ${GITLAB_DEPENDENCY_PROXY}golang:1.15 + image: ${GITLAB_DEPENDENCY_PROXY}golang:1.16 stage: test needs: [] script: @@ -23,14 +23,10 @@ workhorse:verify: - apt-get update && apt-get -y install libimage-exiftool-perl - make -C workhorse test -workhorse:test using go 1.13: - extends: .workhorse:test - image: ${GITLAB_DEPENDENCY_PROXY}golang:1.13 - -workhorse:test using go 1.14: - extends: .workhorse:test - image: ${GITLAB_DEPENDENCY_PROXY}golang:1.14 - workhorse:test using go 1.15: extends: .workhorse:test image: ${GITLAB_DEPENDENCY_PROXY}golang:1.15 + +workhorse:test using go 1.16: + extends: .workhorse:test + image: ${GITLAB_DEPENDENCY_PROXY}golang:1.16 diff --git a/.gitlab/issue_templates/Experiment Successful Cleanup.md b/.gitlab/issue_templates/Experiment Successful Cleanup.md index afe4793cdf..42f2634234 100644 --- a/.gitlab/issue_templates/Experiment Successful Cleanup.md +++ b/.gitlab/issue_templates/Experiment Successful Cleanup.md @@ -15,5 +15,6 @@ The changes need to become an official part of the product. - [ ] Optional: Migrate experiment to a default enabled [feature flag](https://docs.gitlab.com/ee/development/feature_flags) for one milestone and add a changelog. Converting to a feature flag can be skipped at the ICs discretion if risk is deemed low with consideration to both SaaS and (if applicable) self managed - [ ] In the next milestone, [remove the feature flag](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) if applicable - [ ] After the flag removal is deployed, [clean up the feature/experiment feature flags](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) by running chatops command in `#production` channel +- [ ] Ensure the corresponding [Experiment Tracking](https://gitlab.com/groups/gitlab-org/-/boards/1352542?label_name[]=devops%3A%3Agrowth&label_name[]=growth%20experiment&label_name[]=experiment%20tracking) issue is updated /label ~"feature" ~"feature::maintenance" ~"workflow::scheduling" ~"growth experiment" ~"feature flag" diff --git a/.gitlab/issue_templates/Experimentation.md b/.gitlab/issue_templates/Experimentation.md index f84c4305c2..ba7839fb94 100644 --- a/.gitlab/issue_templates/Experimentation.md +++ b/.gitlab/issue_templates/Experimentation.md @@ -18,7 +18,7 @@ # Tracking Details - [json schema](https://gitlab.com/gitlab-org/iglu/-/blob/master/public/schemas/com.gitlab/gitlab_experiment/jsonschema/0-3-0) used in `gitlab-experiment` tracking. -- see [taxonomy](https://docs.gitlab.com/ee/development/snowplow.html#structured-event-taxonomy) for a guide. +- see [taxonomy](https://docs.gitlab.com/ee/development/snowplow/index.html#structured-event-taxonomy) for a guide. | activity | category | action | label | context | property | value | | -------- | -------- | ------ | ----- | ------- | -------- | ----- | diff --git a/.gitlab/issue_templates/Feature Flag Roll Out.md b/.gitlab/issue_templates/Feature Flag Roll Out.md index fe263b932a..a67d0f4e31 100644 --- a/.gitlab/issue_templates/Feature Flag Roll Out.md +++ b/.gitlab/issue_templates/Feature Flag Roll Out.md @@ -1,48 +1,107 @@ -## What +## Feature -Remove the `:feature_name` feature flag ... +This feature uses the `:feature_name` feature flag! + + +- [Issue Name](ISSUE LINK) ## Owners - Team: NAME_OF_TEAM - Most appropriate slack channel to reach out to: `#g_TEAM_NAME` - Best individual to reach out to: NAME +- PM: NAME -## Expectations +## Stakeholders -### What are we expecting to happen? + -### What can we monitor to detect problems with this? +## The Rollout Plan + +- Partial Rollout on GitLab.com with beta groups +- Rollout on GitLab.com for a certain period (How long) +- Percentage Rollout on GitLab.com +- Rollout Feature for everyone as soon as it's ready - -## Beta groups/projects - -If applicable, any groups/projects that are happy to have this feature turned on early. Some organizations may wish to test big changes they are interested in with a small subset of users ahead of time for example. +**Beta Groups/Projects:** + - `gitlab-org/gitlab` project - `gitlab-org`/`gitlab-com` groups - ... -## Roll Out Steps +## Expectations + +### What are we expecting to happen? + + + +### What might happen if this goes wrong? + + + +### What can we monitor to detect problems with this? + + + +## Rollout Timeline + + + +**Initial Rollout** + +*Preparation Phase* - [ ] Enable on staging (`/chatops run feature set feature_name true --staging`) + - [ ] Test on staging -- [ ] Ensure that documentation has been updated -- [ ] Enable on GitLab.com for individual groups/projects listed above and verify behaviour (`/chatops run feature set --project=gitlab-org/gitlab feature_name true`) -- [ ] Coordinate a time to enable the flag with the SRE oncall and release managers - - In `#production` mention `@sre-oncall` and `@release-managers`. Once an SRE on call and Release Manager on call confirm, you can proceed with the rollout + +- [ ] Ensure that documentation has been updated ([More info](https://docs.gitlab.com/ee/development/documentation/feature_flags.html#features-that-became-enabled-by-default)) + - [ ] Announce on the issue an estimated time this will be enabled on GitLab.com -- [ ] Enable on GitLab.com by running chatops command in `#production` (`/chatops run feature set feature_name true`) -- [ ] Cross post chatops Slack command to `#support_gitlab-com` ([more guidance when this is necessary in the dev docs](https://docs.gitlab.com/ee/development/feature_flags/controls.html#where-to-run-commands)) and in your team channel + +*Partial Rollout Phase* +- [ ] Enable on GitLab.com for individual groups/projects listed above and verify behaviour (`/chatops run feature set --project=gitlab-org/gitlab feature_name true`) + +- [ ] Verify behaviour (See Beta Groups) and add details with screenshots as a comment on this issue + +- [ ] If it is possible to perform an incremental rollout, this should be preferred. Proposed increments are: `10%`, `50%`, `100%`. Proposed minimum time between increments is 15 minutes. + - When setting percentages, make sure that the feature works correctly between feature checks. See https://gitlab.com/gitlab-org/gitlab/-/issues/327117 for more information + - For actor-based rollout: `/chatops run feature set feature_name 10 --actors` + - For time-based rollout: `/chatops run feature set feature_name 10` + +- [ ] Make the feature flag enabled by default i.e. Change `default_enabled` to `true` + +- [ ] Cross post chatops slack command to `#support_gitlab-com` ([more guidance when this is necessary in the dev docs](https://docs.gitlab.com/ee/development/feature_flags/controls.html#where-to-run-commands)) and in your team channel + + +**Cleanup** + +This is an __important__ phase, that should be either done in the next Milestone or as soon as possible. For the cleanup phase, please follow our documentation on how to [clean up the feature flag](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up). + + - [ ] Announce on the issue that the flag has been enabled -- [ ] Remove feature flag and add changelog entry. Ensure that the feature flag definition YAML file has been removed in the **same MR** that is removing the feature flag from the code -- [ ] After the flag removal is deployed, [clean up the feature flag](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) by running chatops command in `#production` channel + +- [ ] Remove `:feature_name` feature flag + - [ ] Remove all references to the feature flag from the codebase + - [ ] Remove the YAML definitions for the feature from the repository + - [ ] Create a Changelog Entry + +- [ ] Clean up the feature flag from all environments by running this chatops command in `#production` channel `/chatops run feature delete some_feature`. + +**Final Step** + +- [ ] Close this rollout issue for the feature flag after the feature flag is removed from the codebase. ## Rollback Steps @@ -53,3 +112,4 @@ If applicable, any groups/projects that are happy to have this feature turned on ``` /label ~"feature flag" +/assign DRI diff --git a/.gitlab/issue_templates/Feature proposal.md b/.gitlab/issue_templates/Feature proposal.md index 2cdf2341c8..72ee11e6f9 100644 --- a/.gitlab/issue_templates/Feature proposal.md +++ b/.gitlab/issue_templates/Feature proposal.md @@ -113,3 +113,5 @@ Use the following resources to find the appropriate labels: /label ~devops:: ~group: ~Category: /label ~"GitLab Core"/~"GitLab Premium"/~"GitLab Ultimate" /label ~feature +/label ~documentation +/label ~direction diff --git a/.gitlab/issue_templates/Geo: Replicate a new Git repository type.md b/.gitlab/issue_templates/Geo: Replicate a new Git repository type.md new file mode 100644 index 0000000000..6b2d732f24 --- /dev/null +++ b/.gitlab/issue_templates/Geo: Replicate a new Git repository type.md @@ -0,0 +1,756 @@ + + +## Replicate Cool Widgets + +This issue is for implementing Geo replication and verification of Cool Widgets. + +For more background, see [Geo self-service framework](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/geo/framework.md). + +In order to implement and test this feature, you need to first [set up Geo locally](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/geo.md). + +There are three main sections below. It is a good idea to structure your merge requests this way as well: + +1. Modify database schemas to prepare to add Geo support for Cool Widgets +1. Implement Geo support of Cool Widgets behind a feature flag +1. Release Geo support of Cool Widgets + +It is also a good idea to first open a proof-of-concept merge request. It can be helpful for working out kinks and getting initial support and feedback from the Geo team. As an example, see the [Proof of Concept to replicate Pipeline Artifacts](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56423). + +### Modify database schemas to prepare to add Geo support for Cool Widgets + +You might do this section in its own merge request, but it is not required. + +#### Add the registry table to track replication and verification state + +Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/geo.md#tracking-database) independent of the main database. It is used to track the replication and verification state of all replicables. Every Model has a corresponding "registry" table in the Geo tracking database. + +- [ ] Create the migration file in `ee/db/geo/migrate`: + + ```shell + bin/rails generate geo_migration CreateCoolWidgetRegistry + ``` + +- [ ] Replace the contents of the migration file with the following. Note that we cannot add a foreign key constraint on `cool_widget_id` because the `cool_widgets` table is in a different database. The application code must handle logic such as propagating deletions. + + ```ruby + # frozen_string_literal: true + + class CreateCoolWidgetRegistry < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def up + unless table_exists?(:cool_widget_registry) + ActiveRecord::Base.transaction do + create_table :cool_widget_registry, id: :bigserial, force: :cascade do |t| + t.bigint :cool_widget_id, null: false + t.datetime_with_timezone :created_at, null: false + t.datetime_with_timezone :last_synced_at + t.datetime_with_timezone :retry_at + t.datetime_with_timezone :verified_at + t.datetime_with_timezone :verification_started_at + t.datetime_with_timezone :verification_retry_at + t.integer :state, default: 0, null: false, limit: 2 + t.integer :verification_state, default: 0, null: false, limit: 2 + t.integer :retry_count, default: 0, limit: 2, null: false + t.integer :verification_retry_count, default: 0, limit: 2, null: false + t.boolean :checksum_mismatch, default: false, null: false + t.boolean :force_to_redownload, default: false, null: false + t.boolean :missing_on_primary, default: false, null: false + t.binary :verification_checksum + t.binary :verification_checksum_mismatched + t.string :verification_failure, limit: 255 # rubocop:disable Migration/PreventStrings see https://gitlab.com/gitlab-org/gitlab/-/issues/323806 + t.string :last_sync_failure, limit: 255 # rubocop:disable Migration/PreventStrings see https://gitlab.com/gitlab-org/gitlab/-/issues/323806 + + t.index :cool_widget_id, name: :index_cool_widget_registry_on_cool_widget_id, unique: true + t.index :retry_at + t.index :state + # To optimize performance of CoolWidgetRegistry.verification_failed_batch + t.index :verification_retry_at, name: :cool_widget_registry_failed_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 3))" + # To optimize performance of CoolWidgetRegistry.needs_verification_count + t.index :verification_state, name: :cool_widget_registry_needs_verification, where: "((state = 2) AND (verification_state = ANY (ARRAY[0, 3])))" + # To optimize performance of CoolWidgetRegistry.verification_pending_batch + t.index :verified_at, name: :cool_widget_registry_pending_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 0))" + end + end + end + end + + def down + drop_table :cool_widget_registry + end + end + ``` + +- [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). +- [ ] Run Geo tracking database migrations: + + ```shell + bin/rake geo:db:migrate + ``` + +- [ ] Be sure to commit the relevant changes in `ee/db/geo/schema.rb` + +### Add verification state fields on the Geo primary site + +The Geo primary site needs to checksum every replicable in order for secondaries to verify their own checksums. To do this, Geo requires fields on the Model. There are two ways to add the necessary verification state fields. If the table is large and wide, then it may be a good idea to add verification state fields to a separate table (Option 2). Consult a database expert if needed. + +#### Add verification state fields to the model table (Option 1) + +- [ ] Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration AddVerificationStateToCoolWidgets + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class AddVerificationStateToCoolWidgets < ActiveRecord::Migration[6.0] + def change + change_table(:cool_widgets) do |t| + t.integer :verification_state, default: 0, limit: 2, null: false + t.column :verification_started_at, :datetime_with_timezone + t.integer :verification_retry_count, limit: 2, null: false + t.column :verification_retry_at, :datetime_with_timezone + t.column :verified_at, :datetime_with_timezone + t.binary :verification_checksum, using: 'verification_checksum::bytea' + + t.text :verification_failure # rubocop:disable Migration/AddLimitToTextColumns + end + end + end + ``` + +- [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). +- [ ] If `cool_widgets` is a high-traffic table, follow [the database documentation to use `with_lock_retries`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/migration_style_guide.md#when-to-use-the-helper-method) +- [ ] Adding a `text` column also [requires](../database/strings_and_the_text_data_type.md#add-a-text-column-to-an-existing-table) setting a limit. Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration AddVerificationFailureLimitToCoolWidgets + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class AddVerificationFailureLimitToCoolWidgets < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + CONSTRAINT_NAME = 'cool_widget_verification_failure_text_limit' + + def up + add_text_limit :cool_widget, :verification_failure, 255, constraint_name: CONSTRAINT_NAME + end + + def down + remove_check_constraint(:cool_widget, CONSTRAINT_NAME) + end + end + ``` + +- [ ] Add indexes on verification fields to ensure verification can be performed efficiently. Some or all of these indexes can be omitted if the table is guaranteed to be small. Ask a database expert if you are considering omitting indexes. Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration AddVerificationIndexesToCoolWidgets + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class AddVerificationIndexesToCoolWidgets < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + VERIFICATION_STATE_INDEX_NAME = "index_cool_widgets_on_verification_state" + PENDING_VERIFICATION_INDEX_NAME = "index_cool_widgets_pending_verification" + FAILED_VERIFICATION_INDEX_NAME = "index_cool_widgets_failed_verification" + NEEDS_VERIFICATION_INDEX_NAME = "index_cool_widgets_needs_verification" + + disable_ddl_transaction! + + def up + add_concurrent_index :cool_widgets, :verification_state, name: VERIFICATION_STATE_INDEX_NAME + add_concurrent_index :cool_widgets, :verified_at, where: "(verification_state = 0)", order: { verified_at: 'ASC NULLS FIRST' }, name: PENDING_VERIFICATION_INDEX_NAME + add_concurrent_index :cool_widgets, :verification_retry_at, where: "(verification_state = 3)", order: { verification_retry_at: 'ASC NULLS FIRST' }, name: FAILED_VERIFICATION_INDEX_NAME + add_concurrent_index :cool_widgets, :verification_state, where: "(verification_state = 0 OR verification_state = 3)", name: NEEDS_VERIFICATION_INDEX_NAME + end + + def down + remove_concurrent_index_by_name :cool_widgets, VERIFICATION_STATE_INDEX_NAME + remove_concurrent_index_by_name :cool_widgets, PENDING_VERIFICATION_INDEX_NAME + remove_concurrent_index_by_name :cool_widgets, FAILED_VERIFICATION_INDEX_NAME + remove_concurrent_index_by_name :cool_widgets, NEEDS_VERIFICATION_INDEX_NAME + end + end + ``` + +- [ ] Run database migrations: + + ```shell + bin/rake db:migrate + ``` + +- [ ] Be sure to commit the relevant changes in `db/structure.sql` + +#### Add verification state fields to a separate table (Option 2) + +- [ ] Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration CreateCoolWidgetStates + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class CreateCoolWidgetStates < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + VERIFICATION_STATE_INDEX_NAME = "index_cool_widget_states_on_verification_state" + PENDING_VERIFICATION_INDEX_NAME = "index_cool_widget_states_pending_verification" + FAILED_VERIFICATION_INDEX_NAME = "index_cool_widget_states_failed_verification" + NEEDS_VERIFICATION_INDEX_NAME = "index_cool_widget_states_needs_verification" + + disable_ddl_transaction! + + def up + unless table_exists?(:cool_widget_states) + with_lock_retries do + create_table :cool_widget_states, id: false do |t| + t.references :cool_widget, primary_key: true, null: false, foreign_key: { on_delete: :cascade } + t.integer :verification_state, default: 0, limit: 2, null: false + t.column :verification_started_at, :datetime_with_timezone + t.datetime_with_timezone :verification_retry_at + t.datetime_with_timezone :verified_at + t.integer :verification_retry_count, limit: 2 + t.binary :verification_checksum, using: 'verification_checksum::bytea' + t.text :verification_failure + + t.index :verification_state, name: VERIFICATION_STATE_INDEX_NAME + t.index :verified_at, where: "(verification_state = 0)", order: { verified_at: 'ASC NULLS FIRST' }, name: PENDING_VERIFICATION_INDEX_NAME + t.index :verification_retry_at, where: "(verification_state = 3)", order: { verification_retry_at: 'ASC NULLS FIRST' }, name: FAILED_VERIFICATION_INDEX_NAME + t.index :verification_state, where: "(verification_state = 0 OR verification_state = 3)", name: NEEDS_VERIFICATION_INDEX_NAME + end + end + end + + add_text_limit :cool_widget_states, :verification_failure, 255 + end + + def down + drop_table :cool_widget_states + end + end + ``` + +- [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). +- [ ] Run database migrations: + + ```shell + bin/rake db:migrate + ``` + +- [ ] Be sure to commit the relevant changes in `db/structure.sql` + +That's all of the required database changes. + +### Implement Geo support of Cool Widgets behind a feature flag + +#### Step 1. Implement replication and verification + +- [ ] Include `Gitlab::Geo::ReplicableModel` in the `CoolWidget` class, and specify the Replicator class `with_replicator Geo::CoolWidgetReplicator`. + + Pay some attention to method `pool_repository`. Not every repository type uses repository pooling. As Geo prefers to use repository snapshotting, it can lead to data loss. Make sure to overwrite `pool_repository` so it returns nil for repositories that do not have pools. + + At this point the `CoolWidget` class should look like this: + + ```ruby + # frozen_string_literal: true + + class CoolWidget < ApplicationRecord + include ::Gitlab::Geo::ReplicableModel + include ::Gitlab::Geo::VerificationState + + with_replicator Geo::CoolWidgetReplicator + + mount_uploader :file, CoolWidgetUploader + + # Override the `all` default if not all records can be replicated. For an + # example of an existing Model that needs to do this, see + # `EE::MergeRequestDiff`. + # scope :available_replicables, -> { all } + + # @param primary_key_in [Range, CoolWidget] arg to pass to primary_key_in scope + # @return [ActiveRecord::Relation] everything that should be synced to this node, restricted by primary key + def self.replicables_for_current_secondary(primary_key_in) + # This issue template does not help you write this method. + # + # This method is called only on Geo secondary sites. It is called when + # we want to know which records to replicate. This is not easy to automate + # because for example: + # + # * The "selective sync" feature allows admins to choose which namespaces # to replicate, per secondary site. Most Models are scoped to a + # namespace, but the nature of the relationship to a namespace varies + # between Models. + # * The "selective sync" feature allows admins to choose which shards to + # replicate, per secondary site. Repositories are associated with + # shards. Most blob types are not, but Project Uploads are. + # * Remote stored replicables are not replicated, by default. But the + # setting `sync_object_storage` enables replication of remote stored + # replicables. + # + # Search the codebase for examples, and consult a Geo expert if needed. + end + + # Geo checks this method in FrameworkRepositorySyncService to avoid + # snapshotting repositories using object pools + def pool_repository + nil + end + + ... + end + ``` + +- [ ] Implement `CoolWidget.replicables_for_current_secondary` above. +- [ ] Ensure `CoolWidget.replicables_for_current_secondary` is well-tested. Search the codebase for `replicables_for_current_secondary` to find examples of parameterized table specs. You may need to add more `FactoryBot` traits. +- [ ] If you are using a separate table `cool_widget_states` to track verification state on the Geo primary site, then: + - [ ] Do not include `::Gitlab::Geo::VerificationState` on the `CoolWidget` class. + - [ ] Add the following lines to the `cool_widget_state.rb` model: + + ```ruby + class CoolWidgetState < ApplicationRecord + ... + self.primary_key = :cool_widget_id + + include ::Gitlab::Geo::VerificationState + + belongs_to :cool_widget, inverse_of: :cool_widget_state + ... + end + ``` + + - [ ] Add the following lines to the `cool_widget` model: + + ```ruby + class CoolWidget < ApplicationRecord + ... + has_one :cool_widget_state, inverse_of: :cool_widget + + delegate :verification_retry_at, :verification_retry_at=, + :verified_at, :verified_at=, + :verification_checksum, :verification_checksum=, + :verification_failure, :verification_failure=, + :verification_retry_count, :verification_retry_count=, + to: :cool_widget_state + ... + end + ``` + +- [ ] Create `ee/app/replicators/geo/cool_widget_replicator.rb`. Implement the `#repository` method which should return a `` instance, and implement the class method `.model` to return the `CoolWidget` class: + + ```ruby + # frozen_string_literal: true + + module Geo + class CoolWidgetReplicator < Gitlab::Geo::Replicator + include ::Geo::RepositoryReplicatorStrategy + + def self.model + ::CoolWidget + end + + def repository + model_record.repository + end + + def self.git_access_class + ::Gitlab::GitAccessCoolWidget + end + + # The feature flag follows the format `geo_#{replicable_name}_replication`, + # so here it would be `geo_cool_widget_replication` + def self.replication_enabled_by_default? + false + end + + override :verification_feature_flag_enabled? + def self.verification_feature_flag_enabled? + # We are adding verification at the same time as replication, so we + # don't need to toggle verification separately from replication. When + # the replication feature flag is off, then verification is also off + # (see `VerifiableReplicator.verification_enabled?`) + true + end + + end + end + ``` + +- [ ] Make sure Geo push events are created. Usually it needs some change in the `app/workers/post_receive.rb` file. Example: + + ```ruby + def replicate_cool_widget_changes(cool_widget) + if ::Gitlab::Geo.primary? + cool_widget.replicator.handle_after_update if cool_widget + end + end + ``` + + See `app/workers/post_receive.rb` for more examples. + +- [ ] Make sure the repository removal is also handled. You may need to add something like the following in the destroy service of the repository: + + ```ruby + cool_widget.replicator.handle_after_destroy if cool_widget.repository + ``` + +- [ ] Make sure a Geo secondary site can request and download Cool Widgets on the Geo primary site. You may need to make some changes to `Gitlab::GitAccessCoolWidget`. For example, see [this change for Group-level Wikis](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54914/diffs?commit_id=0f2b36f66697b4addbc69bd377ee2818f648dd33). +- [ ] Generate the feature flag definition file by running the feature flag command and following the command prompts: + + ```shell + bin/feature-flag --ee geo_cool_widget_replication --type development --group 'group::geo' + ``` + +- [ ] Add this replicator class to the method `replicator_classes` in + `ee/lib/gitlab/geo.rb`: + + ```ruby + REPLICATOR_CLASSES = [ + ::Geo::PackageFileReplicator, + ::Geo::CoolWidgetReplicator + ] + end + ``` + +- [ ] Create `ee/spec/replicators/geo/cool_widget_replicator_spec.rb` and perform the necessary setup to define the `model_record` variable for the shared examples: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Geo::CoolWidgetReplicator do + let(:model_record) { build(:cool_widget) } + + include_examples 'a repository replicator' + include_examples 'a verifiable replicator' + end + ``` + +- [ ] Create `ee/app/models/geo/cool_widget_registry.rb`: + + ```ruby + # frozen_string_literal: true + + class Geo::CoolWidgetRegistry < Geo::BaseRegistry + include ::Geo::ReplicableRegistry + include ::Geo::VerifiableRegistry + + MODEL_CLASS = ::CoolWidget + MODEL_FOREIGN_KEY = :cool_widget_id + + belongs_to :cool_widget, class_name: 'CoolWidget' + end + ``` + +- [ ] Update `REGISTRY_CLASSES` in `ee/app/workers/geo/secondary/registry_consistency_worker.rb`. +- [ ] Update `def model_class_factory_name` in `ee/spec/services/geo/registry_consistency_service_spec.rb`. +- [ ] Update `it 'creates missing registries for each registry class'` in `ee/spec/workers/geo/secondary/registry_consistency_worker_spec.rb`. +- [ ] Add `cool_widget_registry` to `ActiveSupport::Inflector.inflections` in `config/initializers_before_autoloader/000_inflections.rb`. +- [ ] Create `ee/spec/factories/geo/cool_widget_registry.rb`: + + ```ruby + # frozen_string_literal: true + + FactoryBot.define do + factory :geo_cool_widget_registry, class: 'Geo::CoolWidgetRegistry' do + cool_widget + state { Geo::CoolWidgetRegistry.state_value(:pending) } + + trait :synced do + state { Geo::CoolWidgetRegistry.state_value(:synced) } + last_synced_at { 5.days.ago } + end + + trait :failed do + state { Geo::CoolWidgetRegistry.state_value(:failed) } + last_synced_at { 1.day.ago } + retry_count { 2 } + last_sync_failure { 'Random error' } + end + + trait :started do + state { Geo::CoolWidgetRegistry.state_value(:started) } + last_synced_at { 1.day.ago } + retry_count { 0 } + end + end + end + ``` + +- [ ] Create `ee/spec/models/geo/cool_widget_registry_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Geo::CoolWidgetRegistry, :geo, type: :model do + let_it_be(:registry) { create(:geo_cool_widget_registry) } + + specify 'factory is valid' do + expect(registry).to be_valid + end + + include_examples 'a Geo framework registry' + include_examples 'a Geo verifiable registry' + end + ``` + +#### Step 2. Implement metrics gathering + +Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` for display in the UI, and sent to Prometheus: + +- [ ] Add the following fields to Geo Node Status example responses in `doc/api/geo_nodes.md`: + - `cool_widgets_count` + - `cool_widgets_checksum_total_count` + - `cool_widgets_checksummed_count` + - `cool_widgets_checksum_failed_count` + - `cool_widgets_synced_count` + - `cool_widgets_failed_count` + - `cool_widgets_registry_count` + - `cool_widgets_verification_total_count` + - `cool_widgets_verified_count` + - `cool_widgets_verification_failed_count` + - `cool_widgets_synced_in_percentage` + - `cool_widgets_verified_in_percentage` +- [ ] Add the same fields to `GET /geo_nodes/status` example response in + `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json`. +- [ ] Add the following fields to the `Sidekiq metrics` table in `doc/administration/monitoring/prometheus/gitlab_metrics.md`: + - `geo_cool_widgets` + - `geo_cool_widgets_checksum_total` + - `geo_cool_widgets_checksummed` + - `geo_cool_widgets_checksum_failed` + - `geo_cool_widgets_synced` + - `geo_cool_widgets_failed` + - `geo_cool_widgets_registry` + - `geo_cool_widgets_verification_total` + - `geo_cool_widgets_verified` + - `geo_cool_widgets_verification_failed` +- [ ] Add the following to the parameterized table in the `context 'Replicator stats' do` block in `ee/spec/models/geo_node_status_spec.rb`: + + ```ruby + Geo::CoolWidgetReplicator | :cool_widget | :geo_cool_widget_registry + ``` + +- [ ] Add the following to `spec/factories/cool_widgets.rb`: + + ```ruby + trait(:verification_succeeded) do + with_file + verification_checksum { 'abc' } + verification_state { CoolWidget.verification_state_value(:verification_succeeded) } + end + + trait(:verification_failed) do + with_file + verification_failure { 'Could not calculate the checksum' } + verification_state { CoolWidget.verification_state_value(:verification_failed) } + end + ``` + +- [ ] Make sure the factory also allows setting a `project` attribute. If the model does not have a direct relation to a project, you can use a `transient` attribute. Check out `spec/factories/merge_request_diffs.rb` for an example. + +Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Nodes` view, and Prometheus. + +#### Step 3. Implement the GraphQL API + +The GraphQL API is used by `Admin > Geo > Replication Details` views, and is directly queryable by administrators. + +- [ ] Add a new field to `GeoNodeType` in `ee/app/graphql/types/geo/geo_node_type.rb`: + + ```ruby + field :cool_widget_registries, ::Types::Geo::CoolWidgetRegistryType.connection_type, + null: true, + resolver: ::Resolvers::Geo::CoolWidgetRegistriesResolver, + description: 'Find Cool Widget registries on this Geo node', + feature_flag: :geo_cool_widget_replication + ``` + +- [ ] Add the new `cool_widget_registries` field name to the `expected_fields` array in `ee/spec/graphql/types/geo/geo_node_type_spec.rb`. +- [ ] Create `ee/app/graphql/resolvers/geo/cool_widget_registries_resolver.rb`: + + ```ruby + # frozen_string_literal: true + + module Resolvers + module Geo + class CoolWidgetRegistriesResolver < BaseResolver + type ::Types::Geo::GeoNodeType.connection_type, null: true + + include RegistriesResolver + end + end + end + ``` + +- [ ] Create `ee/spec/graphql/resolvers/geo/cool_widget_registries_resolver_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Resolvers::Geo::CoolWidgetRegistriesResolver do + it_behaves_like 'a Geo registries resolver', :geo_cool_widget_registry + end + ``` + +- [ ] Create `ee/app/finders/geo/cool_widget_registry_finder.rb`: + + ```ruby + # frozen_string_literal: true + + module Geo + class CoolWidgetRegistryFinder + include FrameworkRegistryFinder + end + end + ``` + +- [ ] Create `ee/spec/finders/geo/cool_widget_registry_finder_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Geo::CoolWidgetRegistryFinder do + it_behaves_like 'a framework registry finder', :geo_cool_widget_registry + end + ``` + +- [ ] Create `ee/app/graphql/types/geo/cool_widget_registry_type.rb`: + + ```ruby + # frozen_string_literal: true + + module Types + module Geo + # rubocop:disable Graphql/AuthorizeTypes because it is included + class CoolWidgetRegistryType < BaseObject + include ::Types::Geo::RegistryType + + graphql_name 'CoolWidgetRegistry' + description 'Represents the Geo replication and verification state of a cool_widget' + + field :cool_widget_id, GraphQL::ID_TYPE, null: false, description: 'ID of the Cool Widget' + end + end + end + ``` + +- [ ] Create `ee/spec/graphql/types/geo/cool_widget_registry_type_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe GitlabSchema.types['CoolWidgetRegistry'] do + it_behaves_like 'a Geo registry type' + + it 'has the expected fields (other than those included in RegistryType)' do + expected_fields = %i[cool_widget_id] + + expect(described_class).to have_graphql_fields(*expected_fields).at_least + end + end + ``` + +- [ ] Add integration tests for providing CoolWidget registry data to the frontend via the GraphQL API, by duplicating and modifying the following shared examples in `ee/spec/requests/api/graphql/geo/registries_spec.rb`: + + ```ruby + it_behaves_like 'gets registries for', { + field_name: 'coolWidgetRegistries', + registry_class_name: 'CoolWidgetRegistry', + registry_factory: :geo_cool_widget_registry, + registry_foreign_key_field_name: 'coolWidgetId' + } + ``` + +- [ ] Update the GraphQL reference documentation: + + ```shell + bundle exec rake gitlab:graphql:compile_docs + ``` + +Individual Cool Widget replication and verification data should now be available via the GraphQL API. + +### Release Geo support of Cool Widgets + +- [ ] In the rollout issue you created when creating the feature flag, modify the Roll Out Steps: + - [ ] Cross out any steps related to testing on production GitLab.com, because Geo is not running on production GitLab.com at the moment. + - [ ] Add a step to `Test replication and verification of Cool Widgets on a non-GDK-deployment. For example, using GitLab Environment Toolkit`. + - [ ] Add a step to `Ping the Geo PM and EM to coordinate testing`. For example, you might add steps to generate Cool Widgets, and then a Geo engineer may take it from there. +- [ ] In `ee/config/feature_flags/development/geo_cool_widget_replication.yml`, set `default_enabled: true` + +- [ ] In `ee/app/replicators/geo/cool_widget_replicator.rb`, delete the `self.replication_enabled_by_default?` method: + + ```ruby + module Geo + class CoolWidgetReplicator < Gitlab::Geo::Replicator + ... + + # REMOVE THIS METHOD + def self.replication_enabled_by_default? + false + end + # REMOVE THIS METHOD + + ... + end + end + ``` + +- [ ] In `ee/app/graphql/types/geo/geo_node_type.rb`, remove the `feature_flag` option for the released type: + + ```ruby + field :cool_widget_registries, ::Types::Geo::CoolWidgetRegistryType.connection_type, + null: true, + resolver: ::Resolvers::Geo::CoolWidgetRegistriesResolver, + description: 'Find Cool Widget registries on this Geo node', + feature_flag: :geo_cool_widget_replication # REMOVE THIS LINE + ``` + +- [ ] Add a row for Cool Widgets to the `Data types` table in [Geo data types support](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/administration/geo/replication/datatypes.md#data-types) +- [ ] Add a row for Cool Widgets to the `Limitations on replication/verification` table in [Geo data types support](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/administration/geo/replication/datatypes.md#limitations-on-replicationverification). If the row already exists, then update it to show that Replication and Verification is released in the current version. diff --git a/.gitlab/issue_templates/Geo: Replicate a new blob type.md b/.gitlab/issue_templates/Geo: Replicate a new blob type.md new file mode 100644 index 0000000000..12fe6a6f5b --- /dev/null +++ b/.gitlab/issue_templates/Geo: Replicate a new blob type.md @@ -0,0 +1,722 @@ + + +## Replicate Cool Widgets + +This issue is for implementing Geo replication and verification of Cool Widgets. + +For more background, see [Geo self-service framework](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/geo/framework.md). + +In order to implement and test this feature, you need to first [set up Geo locally](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/geo.md). + +There are three main sections below. It is a good idea to structure your merge requests this way as well: + +1. Modify database schemas to prepare to add Geo support for Cool Widgets +1. Implement Geo support of Cool Widgets behind a feature flag +1. Release Geo support of Cool Widgets + +It is also a good idea to first open a proof-of-concept merge request. It can be helpful for working out kinks and getting initial support and feedback from the Geo team. As an example, see the [Proof of Concept to replicate Pipeline Artifacts](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56423). + +### Modify database schemas to prepare to add Geo support for Cool Widgets + +You might do this section in its own merge request, but it is not required. + +#### Add the registry table to track replication and verification state + +Geo secondary sites have a [Geo tracking database](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/geo.md#tracking-database) independent of the main database. It is used to track the replication and verification state of all replicables. Every Model has a corresponding "registry" table in the Geo tracking database. + +- [ ] Create the migration file in `ee/db/geo/migrate`: + + ```shell + bin/rails generate geo_migration CreateCoolWidgetRegistry + ``` + +- [ ] Replace the contents of the migration file with the following. Note that we cannot add a foreign key constraint on `cool_widget_id` because the `cool_widgets` table is in a different database. The application code must handle logic such as propagating deletions. + + ```ruby + # frozen_string_literal: true + + class CreateCoolWidgetRegistry < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def up + unless table_exists?(:cool_widget_registry) + ActiveRecord::Base.transaction do + create_table :cool_widget_registry, id: :bigserial, force: :cascade do |t| + t.bigint :cool_widget_id, null: false + t.datetime_with_timezone :created_at, null: false + t.datetime_with_timezone :last_synced_at + t.datetime_with_timezone :retry_at + t.datetime_with_timezone :verified_at + t.datetime_with_timezone :verification_started_at + t.datetime_with_timezone :verification_retry_at + t.integer :state, default: 0, null: false, limit: 2 + t.integer :verification_state, default: 0, null: false, limit: 2 + t.integer :retry_count, default: 0, limit: 2, null: false + t.integer :verification_retry_count, default: 0, limit: 2, null: false + t.boolean :checksum_mismatch, default: false, null: false + t.binary :verification_checksum + t.binary :verification_checksum_mismatched + t.string :verification_failure, limit: 255 # rubocop:disable Migration/PreventStrings see https://gitlab.com/gitlab-org/gitlab/-/issues/323806 + t.string :last_sync_failure, limit: 255 # rubocop:disable Migration/PreventStrings see https://gitlab.com/gitlab-org/gitlab/-/issues/323806 + + t.index :cool_widget_id, name: :index_cool_widget_registry_on_cool_widget_id, unique: true + t.index :retry_at + t.index :state + # To optimize performance of CoolWidgetRegistry.verification_failed_batch + t.index :verification_retry_at, name: :cool_widget_registry_failed_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 3))" + # To optimize performance of CoolWidgetRegistry.needs_verification_count + t.index :verification_state, name: :cool_widget_registry_needs_verification, where: "((state = 2) AND (verification_state = ANY (ARRAY[0, 3])))" + # To optimize performance of CoolWidgetRegistry.verification_pending_batch + t.index :verified_at, name: :cool_widget_registry_pending_verification, order: "NULLS FIRST", where: "((state = 2) AND (verification_state = 0))" + end + end + end + end + + def down + drop_table :cool_widget_registry + end + end + ``` + +- [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). +- [ ] Run Geo tracking database migrations: + + ```shell + bin/rake geo:db:migrate + ``` + +- [ ] Be sure to commit the relevant changes in `ee/db/geo/schema.rb` + +### Add verification state fields on the Geo primary site + +The Geo primary site needs to checksum every replicable in order for secondaries to verify their own checksums. To do this, Geo requires fields on the Model. There are two ways to add the necessary verification state fields. If the table is large and wide, then it may be a good idea to add verification state fields to a separate table (Option 2). Consult a database expert if needed. + +#### Add verification state fields to the model table (Option 1) + +- [ ] Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration AddVerificationStateToCoolWidgets + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class AddVerificationStateToCoolWidgets < ActiveRecord::Migration[6.0] + def change + change_table(:cool_widgets) do |t| + t.integer :verification_state, default: 0, limit: 2, null: false + t.column :verification_started_at, :datetime_with_timezone + t.integer :verification_retry_count, limit: 2, null: false + t.column :verification_retry_at, :datetime_with_timezone + t.column :verified_at, :datetime_with_timezone + t.binary :verification_checksum, using: 'verification_checksum::bytea' + + t.text :verification_failure # rubocop:disable Migration/AddLimitToTextColumns + end + end + end + ``` + +- [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). +- [ ] If `cool_widgets` is a high-traffic table, follow [the database documentation to use `with_lock_retries`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/migration_style_guide.md#when-to-use-the-helper-method) +- [ ] Adding a `text` column also [requires](../database/strings_and_the_text_data_type.md#add-a-text-column-to-an-existing-table) setting a limit. Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration AddVerificationFailureLimitToCoolWidgets + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class AddVerificationFailureLimitToCoolWidgets < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + CONSTRAINT_NAME = 'cool_widget_verification_failure_text_limit' + + def up + add_text_limit :cool_widget, :verification_failure, 255, constraint_name: CONSTRAINT_NAME + end + + def down + remove_check_constraint(:cool_widget, CONSTRAINT_NAME) + end + end + ``` + +- [ ] Add indexes on verification fields to ensure verification can be performed efficiently. Some or all of these indexes can be omitted if the table is guaranteed to be small. Ask a database expert if you are considering omitting indexes. Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration AddVerificationIndexesToCoolWidgets + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class AddVerificationIndexesToCoolWidgets < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + VERIFICATION_STATE_INDEX_NAME = "index_cool_widgets_on_verification_state" + PENDING_VERIFICATION_INDEX_NAME = "index_cool_widgets_pending_verification" + FAILED_VERIFICATION_INDEX_NAME = "index_cool_widgets_failed_verification" + NEEDS_VERIFICATION_INDEX_NAME = "index_cool_widgets_needs_verification" + + disable_ddl_transaction! + + def up + add_concurrent_index :cool_widgets, :verification_state, name: VERIFICATION_STATE_INDEX_NAME + add_concurrent_index :cool_widgets, :verified_at, where: "(verification_state = 0)", order: { verified_at: 'ASC NULLS FIRST' }, name: PENDING_VERIFICATION_INDEX_NAME + add_concurrent_index :cool_widgets, :verification_retry_at, where: "(verification_state = 3)", order: { verification_retry_at: 'ASC NULLS FIRST' }, name: FAILED_VERIFICATION_INDEX_NAME + add_concurrent_index :cool_widgets, :verification_state, where: "(verification_state = 0 OR verification_state = 3)", name: NEEDS_VERIFICATION_INDEX_NAME + end + + def down + remove_concurrent_index_by_name :cool_widgets, VERIFICATION_STATE_INDEX_NAME + remove_concurrent_index_by_name :cool_widgets, PENDING_VERIFICATION_INDEX_NAME + remove_concurrent_index_by_name :cool_widgets, FAILED_VERIFICATION_INDEX_NAME + remove_concurrent_index_by_name :cool_widgets, NEEDS_VERIFICATION_INDEX_NAME + end + end + ``` + +- [ ] Run database migrations: + + ```shell + bin/rake db:migrate + ``` + +- [ ] Be sure to commit the relevant changes in `db/structure.sql` + +#### Add verification state fields to a separate table (Option 2) + +- [ ] Create the migration file in `db/migrate`: + + ```shell + bin/rails generate migration CreateCoolWidgetStates + ``` + +- [ ] Replace the contents of the migration file with: + + ```ruby + # frozen_string_literal: true + + class CreateCoolWidgetStates < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + VERIFICATION_STATE_INDEX_NAME = "index_cool_widget_states_on_verification_state" + PENDING_VERIFICATION_INDEX_NAME = "index_cool_widget_states_pending_verification" + FAILED_VERIFICATION_INDEX_NAME = "index_cool_widget_states_failed_verification" + NEEDS_VERIFICATION_INDEX_NAME = "index_cool_widget_states_needs_verification" + + disable_ddl_transaction! + + def up + unless table_exists?(:cool_widget_states) + with_lock_retries do + create_table :cool_widget_states, id: false do |t| + t.references :cool_widget, primary_key: true, null: false, foreign_key: { on_delete: :cascade } + t.integer :verification_state, default: 0, limit: 2, null: false + t.column :verification_started_at, :datetime_with_timezone + t.datetime_with_timezone :verification_retry_at + t.datetime_with_timezone :verified_at + t.integer :verification_retry_count, limit: 2 + t.binary :verification_checksum, using: 'verification_checksum::bytea' + t.text :verification_failure + + t.index :verification_state, name: VERIFICATION_STATE_INDEX_NAME + t.index :verified_at, where: "(verification_state = 0)", order: { verified_at: 'ASC NULLS FIRST' }, name: PENDING_VERIFICATION_INDEX_NAME + t.index :verification_retry_at, where: "(verification_state = 3)", order: { verification_retry_at: 'ASC NULLS FIRST' }, name: FAILED_VERIFICATION_INDEX_NAME + t.index :verification_state, where: "(verification_state = 0 OR verification_state = 3)", name: NEEDS_VERIFICATION_INDEX_NAME + end + end + end + + add_text_limit :cool_widget_states, :verification_failure, 255 + end + + def down + drop_table :cool_widget_states + end + end + ``` + +- [ ] If deviating from the above example, then be sure to order columns according to [our guidelines](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/ordering_table_columns.md). +- [ ] Run database migrations: + + ```shell + bin/rake db:migrate + ``` + +- [ ] Be sure to commit the relevant changes in `db/structure.sql` + +That's all of the required database changes. + +### Implement Geo support of Cool Widgets behind a feature flag + +#### Step 1. Implement replication and verification + +- [ ] Include `Gitlab::Geo::ReplicableModel` in the `CoolWidget` class, and specify the Replicator class `with_replicator Geo::CoolWidgetReplicator`. + + At this point the `CoolWidget` class should look like this: + + ```ruby + # frozen_string_literal: true + + class CoolWidget < ApplicationRecord + include ::Gitlab::Geo::ReplicableModel + include ::Gitlab::Geo::VerificationState + + with_replicator Geo::CoolWidgetReplicator + + mount_uploader :file, CoolWidgetUploader + + # Override the `all` default if not all records can be replicated. For an + # example of an existing Model that needs to do this, see + # `EE::MergeRequestDiff`. + # scope :available_replicables, -> { all } + + # @param primary_key_in [Range, CoolWidget] arg to pass to primary_key_in scope + # @return [ActiveRecord::Relation] everything that should be synced to this node, restricted by primary key + def self.replicables_for_current_secondary(primary_key_in) + # This issue template does not help you write this method. + # + # This method is called only on Geo secondary sites. It is called when + # we want to know which records to replicate. This is not easy to automate + # because for example: + # + # * The "selective sync" feature allows admins to choose which namespaces # to replicate, per secondary site. Most Models are scoped to a + # namespace, but the nature of the relationship to a namespace varies + # between Models. + # * The "selective sync" feature allows admins to choose which shards to + # replicate, per secondary site. Repositories are associated with + # shards. Most blob types are not, but Project Uploads are. + # * Remote stored replicables are not replicated, by default. But the + # setting `sync_object_storage` enables replication of remote stored + # replicables. + # + # Search the codebase for examples, and consult a Geo expert if needed. + end + ... + end + ``` + +- [ ] Implement `CoolWidget.replicables_for_current_secondary` above. +- [ ] Ensure `CoolWidget.replicables_for_current_secondary` is well-tested. Search the codebase for `replicables_for_current_secondary` to find examples of parameterized table specs. You may need to add more `FactoryBot` traits. +- [ ] If you are using a separate table `cool_widget_states` to track verification state on the Geo primary site, then: + - [ ] Do not include `::Gitlab::Geo::VerificationState` on the `CoolWidget` class. + - [ ] Add the following lines to the `cool_widget_state.rb` model: + + ```ruby + class CoolWidgetState < ApplicationRecord + ... + self.primary_key = :cool_widget_id + + include ::Gitlab::Geo::VerificationState + + belongs_to :cool_widget, inverse_of: :cool_widget_state + ... + end + ``` + + - [ ] Add the following lines to the `cool_widget` model: + + ```ruby + class CoolWidget < ApplicationRecord + ... + has_one :cool_widget_state, inverse_of: :cool_widget + + delegate :verification_retry_at, :verification_retry_at=, + :verified_at, :verified_at=, + :verification_checksum, :verification_checksum=, + :verification_failure, :verification_failure=, + :verification_retry_count, :verification_retry_count=, + to: :cool_widget_state + ... + end + ``` + +- [ ] Create `ee/app/replicators/geo/cool_widget_replicator.rb`. Implement the `#carrierwave_uploader` method which should return a `CarrierWave::Uploader`, and implement the class method `.model` to return the `CoolWidget` class: + + ```ruby + # frozen_string_literal: true + + module Geo + class CoolWidgetReplicator < Gitlab::Geo::Replicator + include ::Geo::BlobReplicatorStrategy + + def self.model + ::CoolWidget + end + + def carrierwave_uploader + model_record.file + end + + # The feature flag follows the format `geo_#{replicable_name}_replication`, + # so here it would be `geo_cool_widget_replication` + def self.replication_enabled_by_default? + false + end + + override :verification_feature_flag_enabled? + def self.verification_feature_flag_enabled? + # We are adding verification at the same time as replication, so we + # don't need to toggle verification separately from replication. When + # the replication feature flag is off, then verification is also off + # (see `VerifiableReplicator.verification_enabled?`) + true + end + + end + end + ``` + +- [ ] Generate the feature flag definition file by running the feature flag command and following the command prompts: + + ```shell + bin/feature-flag --ee geo_cool_widget_replication --type development --group 'group::geo' + ``` + +- [ ] Add this replicator class to the method `replicator_classes` in + `ee/lib/gitlab/geo.rb`: + + ```ruby + REPLICATOR_CLASSES = [ + ::Geo::PackageFileReplicator, + ::Geo::CoolWidgetReplicator + ] + end + ``` + +- [ ] Create `ee/spec/replicators/geo/cool_widget_replicator_spec.rb` and perform the necessary setup to define the `model_record` variable for the shared examples: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Geo::CoolWidgetReplicator do + let(:model_record) { build(:cool_widget) } + + include_examples 'a blob replicator' + include_examples 'a verifiable replicator' + end + ``` + +- [ ] Create `ee/app/models/geo/cool_widget_registry.rb`: + + ```ruby + # frozen_string_literal: true + + class Geo::CoolWidgetRegistry < Geo::BaseRegistry + include ::Geo::ReplicableRegistry + include ::Geo::VerifiableRegistry + + MODEL_CLASS = ::CoolWidget + MODEL_FOREIGN_KEY = :cool_widget_id + + belongs_to :cool_widget, class_name: 'CoolWidget' + end + ``` + +- [ ] Update `REGISTRY_CLASSES` in `ee/app/workers/geo/secondary/registry_consistency_worker.rb`. +- [ ] Update `def model_class_factory_name` in `ee/spec/services/geo/registry_consistency_service_spec.rb`. +- [ ] Update `it 'creates missing registries for each registry class'` in `ee/spec/workers/geo/secondary/registry_consistency_worker_spec.rb`. +- [ ] Add `cool_widget_registry` to `ActiveSupport::Inflector.inflections` in `config/initializers_before_autoloader/000_inflections.rb`. +- [ ] Create `ee/spec/factories/geo/cool_widget_registry.rb`: + + ```ruby + # frozen_string_literal: true + + FactoryBot.define do + factory :geo_cool_widget_registry, class: 'Geo::CoolWidgetRegistry' do + cool_widget + state { Geo::CoolWidgetRegistry.state_value(:pending) } + + trait :synced do + state { Geo::CoolWidgetRegistry.state_value(:synced) } + last_synced_at { 5.days.ago } + end + + trait :failed do + state { Geo::CoolWidgetRegistry.state_value(:failed) } + last_synced_at { 1.day.ago } + retry_count { 2 } + last_sync_failure { 'Random error' } + end + + trait :started do + state { Geo::CoolWidgetRegistry.state_value(:started) } + last_synced_at { 1.day.ago } + retry_count { 0 } + end + end + end + ``` + +- [ ] Create `ee/spec/models/geo/cool_widget_registry_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Geo::CoolWidgetRegistry, :geo, type: :model do + let_it_be(:registry) { create(:geo_cool_widget_registry) } + + specify 'factory is valid' do + expect(registry).to be_valid + end + + include_examples 'a Geo framework registry' + include_examples 'a Geo verifiable registry' + end + ``` + +#### Step 2. Implement metrics gathering + +Metrics are gathered by `Geo::MetricsUpdateWorker`, persisted in `GeoNodeStatus` for display in the UI, and sent to Prometheus: + +- [ ] Add the following fields to Geo Node Status example responses in `doc/api/geo_nodes.md`: + - `cool_widgets_count` + - `cool_widgets_checksum_total_count` + - `cool_widgets_checksummed_count` + - `cool_widgets_checksum_failed_count` + - `cool_widgets_synced_count` + - `cool_widgets_failed_count` + - `cool_widgets_registry_count` + - `cool_widgets_verification_total_count` + - `cool_widgets_verified_count` + - `cool_widgets_verification_failed_count` + - `cool_widgets_synced_in_percentage` + - `cool_widgets_verified_in_percentage` +- [ ] Add the same fields to `GET /geo_nodes/status` example response in + `ee/spec/fixtures/api/schemas/public_api/v4/geo_node_status.json`. +- [ ] Add the following fields to the `Sidekiq metrics` table in `doc/administration/monitoring/prometheus/gitlab_metrics.md`: + - `geo_cool_widgets` + - `geo_cool_widgets_checksum_total` + - `geo_cool_widgets_checksummed` + - `geo_cool_widgets_checksum_failed` + - `geo_cool_widgets_synced` + - `geo_cool_widgets_failed` + - `geo_cool_widgets_registry` + - `geo_cool_widgets_verification_total` + - `geo_cool_widgets_verified` + - `geo_cool_widgets_verification_failed` +- [ ] Add the following to the parameterized table in the `context 'Replicator stats' do` block in `ee/spec/models/geo_node_status_spec.rb`: + + ```ruby + Geo::CoolWidgetReplicator | :cool_widget | :geo_cool_widget_registry + ``` + +- [ ] Add the following to `spec/factories/cool_widgets.rb`: + + ```ruby + trait(:verification_succeeded) do + with_file + verification_checksum { 'abc' } + verification_state { CoolWidget.verification_state_value(:verification_succeeded) } + end + + trait(:verification_failed) do + with_file + verification_failure { 'Could not calculate the checksum' } + verification_state { CoolWidget.verification_state_value(:verification_failed) } + end + ``` + +- [ ] Make sure the factory also allows setting a `project` attribute. If the model does not have a direct relation to a project, you can use a `transient` attribute. Check out `spec/factories/merge_request_diffs.rb` for an example. + +Cool Widget replication and verification metrics should now be available in the API, the `Admin > Geo > Nodes` view, and Prometheus. + +#### Step 3. Implement the GraphQL API + +The GraphQL API is used by `Admin > Geo > Replication Details` views, and is directly queryable by administrators. + +- [ ] Add a new field to `GeoNodeType` in `ee/app/graphql/types/geo/geo_node_type.rb`: + + ```ruby + field :cool_widget_registries, ::Types::Geo::CoolWidgetRegistryType.connection_type, + null: true, + resolver: ::Resolvers::Geo::CoolWidgetRegistriesResolver, + description: 'Find Cool Widget registries on this Geo node', + feature_flag: :geo_cool_widget_replication + ``` + +- [ ] Add the new `cool_widget_registries` field name to the `expected_fields` array in `ee/spec/graphql/types/geo/geo_node_type_spec.rb`. +- [ ] Create `ee/app/graphql/resolvers/geo/cool_widget_registries_resolver.rb`: + + ```ruby + # frozen_string_literal: true + + module Resolvers + module Geo + class CoolWidgetRegistriesResolver < BaseResolver + type ::Types::Geo::GeoNodeType.connection_type, null: true + + include RegistriesResolver + end + end + end + ``` + +- [ ] Create `ee/spec/graphql/resolvers/geo/cool_widget_registries_resolver_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Resolvers::Geo::CoolWidgetRegistriesResolver do + it_behaves_like 'a Geo registries resolver', :geo_cool_widget_registry + end + ``` + +- [ ] Create `ee/app/finders/geo/cool_widget_registry_finder.rb`: + + ```ruby + # frozen_string_literal: true + + module Geo + class CoolWidgetRegistryFinder + include FrameworkRegistryFinder + end + end + ``` + +- [ ] Create `ee/spec/finders/geo/cool_widget_registry_finder_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe Geo::CoolWidgetRegistryFinder do + it_behaves_like 'a framework registry finder', :geo_cool_widget_registry + end + ``` + +- [ ] Create `ee/app/graphql/types/geo/cool_widget_registry_type.rb`: + + ```ruby + # frozen_string_literal: true + + module Types + module Geo + # rubocop:disable Graphql/AuthorizeTypes because it is included + class CoolWidgetRegistryType < BaseObject + include ::Types::Geo::RegistryType + + graphql_name 'CoolWidgetRegistry' + description 'Represents the Geo replication and verification state of a cool_widget' + + field :cool_widget_id, GraphQL::ID_TYPE, null: false, description: 'ID of the Cool Widget' + end + end + end + ``` + +- [ ] Create `ee/spec/graphql/types/geo/cool_widget_registry_type_spec.rb`: + + ```ruby + # frozen_string_literal: true + + require 'spec_helper' + + RSpec.describe GitlabSchema.types['CoolWidgetRegistry'] do + it_behaves_like 'a Geo registry type' + + it 'has the expected fields (other than those included in RegistryType)' do + expected_fields = %i[cool_widget_id] + + expect(described_class).to have_graphql_fields(*expected_fields).at_least + end + end + ``` + +- [ ] Add integration tests for providing CoolWidget registry data to the frontend via the GraphQL API, by duplicating and modifying the following shared examples in `ee/spec/requests/api/graphql/geo/registries_spec.rb`: + + ```ruby + it_behaves_like 'gets registries for', { + field_name: 'coolWidgetRegistries', + registry_class_name: 'CoolWidgetRegistry', + registry_factory: :geo_cool_widget_registry, + registry_foreign_key_field_name: 'coolWidgetId' + } + ``` + +- [ ] Update the GraphQL reference documentation: + + ```shell + bundle exec rake gitlab:graphql:compile_docs + ``` + +Individual Cool Widget replication and verification data should now be available via the GraphQL API. + +### Release Geo support of Cool Widgets + +- [ ] In the rollout issue you created when creating the feature flag, modify the Roll Out Steps: + - [ ] Cross out any steps related to testing on production GitLab.com, because Geo is not running on production GitLab.com at the moment. + - [ ] Add a step to `Test replication and verification of Cool Widgets on a non-GDK-deployment. For example, using GitLab Environment Toolkit`. + - [ ] Add a step to `Ping the Geo PM and EM to coordinate testing`. For example, you might add steps to generate Cool Widgets, and then a Geo engineer may take it from there. +- [ ] In `ee/config/feature_flags/development/geo_cool_widget_replication.yml`, set `default_enabled: true` + +- [ ] In `ee/app/replicators/geo/cool_widget_replicator.rb`, delete the `self.replication_enabled_by_default?` method: + + ```ruby + module Geo + class CoolWidgetReplicator < Gitlab::Geo::Replicator + ... + + # REMOVE THIS METHOD + def self.replication_enabled_by_default? + false + end + # REMOVE THIS METHOD + + ... + end + end + ``` + +- [ ] In `ee/app/graphql/types/geo/geo_node_type.rb`, remove the `feature_flag` option for the released type: + + ```ruby + field :cool_widget_registries, ::Types::Geo::CoolWidgetRegistryType.connection_type, + null: true, + resolver: ::Resolvers::Geo::CoolWidgetRegistriesResolver, + description: 'Find Cool Widget registries on this Geo node', + feature_flag: :geo_cool_widget_replication # REMOVE THIS LINE + ``` + +- [ ] Add a row for Cool Widgets to the `Data types` table in [Geo data types support](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/administration/geo/replication/datatypes.md#data-types) +- [ ] Add a row for Cool Widgets to the `Limitations on replication/verification` table in [Geo data types support](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/administration/geo/replication/datatypes.md#limitations-on-replicationverification). If the row already exists, then update it to show that Replication and Verification is released in the current version. diff --git a/.gitlab/issue_templates/Implementation.md b/.gitlab/issue_templates/Implementation.md index 888c993766..058834264b 100644 --- a/.gitlab/issue_templates/Implementation.md +++ b/.gitlab/issue_templates/Implementation.md @@ -39,24 +39,25 @@ Add details for required items and delete others. + +e.g.: - [ ] ~frontend Step 1 - [ ] `@person` Step 1a - [ ] ~frontend Step 2 +--> + -/label ~"workflow::refinement" - - + +/label ~"workflow::refinement" +/milestone %Backlog diff --git a/.gitlab/issue_templates/Lean Feature Proposal.md b/.gitlab/issue_templates/Lean Feature Proposal.md index fb9ac306f3..828d516126 100644 --- a/.gitlab/issue_templates/Lean Feature Proposal.md +++ b/.gitlab/issue_templates/Lean Feature Proposal.md @@ -101,3 +101,6 @@ In which enterprise tier should this feature go? See https://about.gitlab.com/ha ### Is this a cross-stage feature? Communicate if this change will affect multiple Stage Groups or product areas. We recommend always start with the assumption that a feature request will have an impact into another Group. Loop in the most relevant PM and Product Designer from that Group to provide strategic support to help align the Group's broader plan and vision, as well as to avoid UX and technical debt. https://about.gitlab.com/handbook/product/#cross-stage-features --> + +/label ~documentation +/label ~direction diff --git a/.gitlab/issue_templates/Migrations.md b/.gitlab/issue_templates/Migrations.md deleted file mode 100644 index 822722a0f7..0000000000 --- a/.gitlab/issue_templates/Migrations.md +++ /dev/null @@ -1,67 +0,0 @@ -# Project Name | Migration Tracker - - -## Background - - - -### Goals - - - -## Quick Facts - - - - * **Timeline.** - - * **Product.** - GitLab Gold/Ultimate or Community Edition - * **Project's License.** What kind of OSI-approved license does your project use? - -## Current Tooling and Replacements - - - -| Tool | Feature | GitLab feature | GitLab edition | -| --- | --- | --- | --- | -| | | | | - -## Collaborators - - - -## Related Issues - - - -### Blockers - * [ ] ADD_LINK_TO_ISSUE_HERE - -### Urgent - * [ ] - -### Important but not urgent - * [ ] - -### Nice to have - * [ ] - - ------- - -/label ~"Open Source" ~movingtogitlab -/cc @nuritzi diff --git a/.gitlab/issue_templates/OSS_Partner.md b/.gitlab/issue_templates/OSS_Partner.md new file mode 100644 index 0000000000..d9c05026e7 --- /dev/null +++ b/.gitlab/issue_templates/OSS_Partner.md @@ -0,0 +1,68 @@ + + +## Background + + + +### Goals + + + +## Quick Facts + + + + * **Timeline.** - + * **Product.** - SaaS-Ultimate/Self-Managed-Ultimate or Community Edition + * **Project's License.** What kind of OSI-approved license does your project use? + +## Current Tooling and Replacements + + + +| Tool | Feature | GitLab feature | GitLab edition | +| --- | --- | --- | --- | +| | | | | + +## Collaborators + + + +## Related Issues + + + +### Blockers + * [ ] ADD_LINK_TO_ISSUE_HERE + +### Urgent + * [ ] + +### Important but not urgent + * [ ] + +### Nice to have + * [ ] + + +------ + +/label ~"Open Source Partners" +/cc @nuritzi @greg diff --git a/.gitlab/issue_templates/Productivity Improvement.md b/.gitlab/issue_templates/Productivity Improvement.md index 974f11f6da..06692d3ede 100644 --- a/.gitlab/issue_templates/Productivity Improvement.md +++ b/.gitlab/issue_templates/Productivity Improvement.md @@ -34,6 +34,6 @@ after the implementation is merged/deployed/released. - [ ] The solution improved the situation. - If yes, check this box and close the issue. Well done! :tada: - - Otherwise, create a new "Productivity Improvement" issue. You can re-use the description from this issue, but obviously another solution should be chosen this time. + - Otherwise, create a new "Productivity Improvement" issue. You can re-use the description from this issue, but another solution should be chosen this time. /label ~"Engineering Productivity" ~meta diff --git a/.gitlab/issue_templates/Query Performance Investigation.md b/.gitlab/issue_templates/Query Performance Investigation.md index ddd361e4f2..354cdb1bfe 100644 --- a/.gitlab/issue_templates/Query Performance Investigation.md +++ b/.gitlab/issue_templates/Query Performance Investigation.md @@ -10,6 +10,16 @@ As the name implies, the purpose of the template is to detail underperforming qu - [ ] Provide [priority and severity labels](https://about.gitlab.com/handbook/engineering/quality/issue-triage/#availability) - [ ] If this requires immediate attention cc `@gitlab-org/database-team` and reach out in the #g_database slack channel +### SQL Statement + +```sql + +``` + +### Data from Elastic + +Instructions on collecting data from [PostgreSQL slow logs stored in Elasticsearch](https://gitlab.com/gitlab-com/runbooks/-/merge_requests/3361/diffs) + ### Requested Data points Please provide as many of these fields as possible when submitting a query performance report. @@ -20,7 +30,6 @@ Please provide as many of these fields as possible when submitting a query perfo - Database time relative to total database time - Source of calls (Sidekiq, WebAPI, etc) - Query ID -- SQL Statement - Query Plan - Query Example - Total number of calls (relative) diff --git a/.gitlab/issue_templates/Security developer workflow.md b/.gitlab/issue_templates/Security developer workflow.md index beb066cdfc..25825fc888 100644 --- a/.gitlab/issue_templates/Security developer workflow.md +++ b/.gitlab/issue_templates/Security developer workflow.md @@ -10,9 +10,10 @@ Set the title to: `Description of the original issue` - [ ] Read the [security process for developers] if you are not familiar with it. - Verify if the issue you're working on `gitlab-org/gitlab` is confidential, if it's public fix should be placed on GitLab canonical and no backports are required. -- [ ] Mark this [issue as related] to the Security Release Tracking Issue. You can find it on the topic of the `#releases` Slack channel. +- [ ] Mark this [issue as linked] to the Security Release Tracking Issue. You can find it on the topic of the `#releases` Slack channel. - Fill out the [Links section](#links): - [ ] Next to **Issue on GitLab**, add a link to the `gitlab-org/gitlab` issue that describes the security vulnerability. +- [ ] Add one of the `~severity::x` labels to the issue and all associated merge requests. ## Development @@ -64,6 +65,6 @@ After your merge request has been approved according to our [approval guidelines [secpick documentation]: https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/security/utilities/secpick_script.md [security Release merge request template]: https://gitlab.com/gitlab-org/security/gitlab/blob/master/.gitlab/merge_request_templates/Security%20Release.md [approval guidelines]: https://docs.gitlab.com/ee/development/code_review.html#approval-guidelines -[issue as related]: https://docs.gitlab.com/ee/user/project/issues/related_issues.html#adding-a-related-issue +[issue as linked]: https://docs.gitlab.com/ee/user/project/issues/related_issues.html#add-a-linked-issue /label ~security diff --git a/.gitlab/issue_templates/experiment_tracking_template.md b/.gitlab/issue_templates/experiment_tracking_template.md index 432ae57e59..c653a3a2d4 100644 --- a/.gitlab/issue_templates/experiment_tracking_template.md +++ b/.gitlab/issue_templates/experiment_tracking_template.md @@ -27,7 +27,7 @@ As well as defining the experiment rollout and cleanup, this issue incorporates ### What might happen if this goes wrong? ### What can we monitor to detect problems with this? - + ### Tracked data @@ -81,6 +81,7 @@ If applicable, any groups/projects that are happy to have this feature turned on - [ ] Announce on the issue that the flag has been enabled - [ ] Remove experiment code and feature flag and add changelog entry - a separate [cleanup issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Experiment%20Successful%20Cleanup) might be required - [ ] After the flag removal is deployed, [clean up the feature flag](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) by running chatops command in `#production` channel +- [ ] Assign to the product manager to update the [knowledge base](https://about.gitlab.com/direction/growth/#growth-insights-knowledge-base) (if applicable) ## Rollback Steps diff --git a/.gitlab/merge_request_templates/New End To End Test.md b/.gitlab/merge_request_templates/New End To End Test.md index c38c3ce340..9e6c4049b9 100644 --- a/.gitlab/merge_request_templates/New End To End Test.md +++ b/.gitlab/merge_request_templates/New End To End Test.md @@ -10,7 +10,7 @@ Please link to the respective test case in the testcases project - [ ] Note if the test is intended to run in specific scenarios. If a scenario is new, add a link to the MR that adds the new scenario. - [ ] Follow the end-to-end tests [style guide](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/style_guide.html) and [best practices](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/best_practices.html). - [ ] Use the appropriate [RSpec metadata tag(s)](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/rspec_metadata_tests.html#rspec-metadata-for-end-to-end-tests). -- [ ] Ensure that a created resource is removed after test execution. +- [ ] Ensure that a created resource is removed after test execution. A `Group` resource can be shared between multiple tests. Do not remove it unless it has a unique path. Note that we have a cleanup job that periodically removes groups under `gitlab-qa-sandbox-group`. - [ ] Ensure that no [transient bugs](https://about.gitlab.com/handbook/engineering/quality/issue-triage/#transient-bugs) are hidden accidentally due to the usage of `waits` and `reloads`. - [ ] Verify the tags to ensure it runs on the desired test environments. - [ ] If this MR has a dependency on another MR, such as a GitLab QA MR, specify the order in which the MRs should be merged. diff --git a/.gitlab/merge_request_templates/Quarantine End to End Test.md b/.gitlab/merge_request_templates/Quarantine End to End Test.md new file mode 100644 index 0000000000..5794a62df9 --- /dev/null +++ b/.gitlab/merge_request_templates/Quarantine End to End Test.md @@ -0,0 +1,44 @@ +## What does this MR do? + + + + +### E2E Test Failure issue(s) + + + + +### Check-list + +- [ ] General code guidelines check-list + - [ ] [Code review guidelines](https://docs.gitlab.com/ee/development/code_review.html) + - [ ] [Style guides](https://docs.gitlab.com/ee/development/contributing/style_guides.html) +- [ ] Quarantine test check-list + - [ ] Follow the [Quarantining Tests guide](https://about.gitlab.com/handbook/engineering/quality/guidelines/debugging-qa-test-failures/#quarantining-tests). + - [ ] Confirm the test has a [`quarantine:` tag with the specified quarantine type](https://about.gitlab.com/handbook/engineering/quality/guidelines/debugging-qa-test-failures/#quarantined-test-types). + - [ ] Note if the test should be [quarantined for a specific environment](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/environment_selection.html#quarantining-a-test-for-a-specific-environment). +- [ ] Dequarantine test check-list + - [ ] Follow the [Dequarantining Tests guide](https://about.gitlab.com/handbook/engineering/quality/guidelines/debugging-qa-test-failures/#dequarantining-tests). + - [ ] Confirm the test consistently passes on the target GitLab environment(s). + - [ ] (Optionally) [Trigger a manual GitLab-QA pipeline](https://about.gitlab.com/handbook/engineering/quality/guidelines/tips-and-tricks/#running-gitlab-qa-pipeline-against-a-specific-gitlab-release) against a specific GitLab environment using the `RELEASE` variable from the `package-and-qa` job of the current merge request. +- [ ] To ensure a faster turnaround, ask in the `#quality` Slack channel for someone to review and merge the merge request, rather than assigning it directly. + + +/label ~"Quality" ~"QA" ~"feature" ~"feature::maintenance" + + +/label ~"Pick into auto-deploy" ~"priority::1" ~"severity::1" + + +/label ~devops:: + + +/milestone % diff --git a/.haml-lint.yml b/.haml-lint.yml index 4adb5e62f8..0ec1af6a6c 100644 --- a/.haml-lint.yml +++ b/.haml-lint.yml @@ -104,22 +104,18 @@ linters: # These cops should eventually get enabled - Cop/LineBreakAfterGuardClauses - - Cop/LineBreakAroundConditionalBlock - Cop/ProjectPathHelper + - Gitlab/FeatureAvailableUsage - GitlabSecurity/PublicSend - Layout/EmptyLineAfterGuardClause - Layout/LeadingCommentSpace - - Layout/SpaceAfterColon - - Layout/SpaceAfterComma - Layout/SpaceAroundOperators - Layout/SpaceBeforeBlockBraces - Layout/SpaceBeforeComma - Layout/SpaceBeforeFirstArg - - Layout/SpaceInsideArrayLiteralBrackets - Layout/SpaceInsideHashLiteralBraces - Layout/SpaceInsideStringInterpolation - Layout/TrailingEmptyLines - - Lint/BooleanSymbol - Lint/LiteralInInterpolation - Lint/ParenthesesAsGroupedExpression - Lint/RedundantWithIndex @@ -131,18 +127,14 @@ linters: - Rails/LinkToBlank - Rails/Presence - Rails/RequestReferer - - Style/AndOr - Style/ColonMethodCall - Style/ConditionalAssignment - Style/HashSyntax - Style/IdenticalConditionalBranches - Style/NegatedIf - Style/NestedTernaryOperator - - Style/Not - Style/ParenthesesAroundCondition - - Style/RedundantParentheses - Style/SelfAssignment - - Style/Semicolon - Style/TernaryParentheses - Style/TrailingCommaInHashLiteral - Style/UnlessElse @@ -150,6 +142,9 @@ linters: - Style/WordArray - Style/ZeroLengthPredicate + # WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/207950 + - Cop/UserAdmin + RubyComments: enabled: true diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 446bde8cef..9f201dcc28 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,363 +1,7 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2020-05-21 10:58:59 -0400 using Haml-Lint version 0.34.0. +# on 2021-04-01 00:00:00 +0000 using Haml-Lint version 0.36.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of Haml-Lint, may require this file to be generated again. - -linters: - # Offense count: 1552 - NoPlainNodes: - enabled: true - exclude: - - 'app/views/admin/abuse_reports/_abuse_report.html.haml' - - 'app/views/admin/abuse_reports/index.html.haml' - - 'app/views/admin/appearances/_form.html.haml' - - 'app/views/admin/application_settings/_abuse.html.haml' - - 'app/views/admin/application_settings/_diff_limits.html.haml' - - 'app/views/admin/application_settings/_gitaly.html.haml' - - 'app/views/admin/application_settings/_ip_limits.html.haml' - - 'app/views/admin/application_settings/_performance.html.haml' - - 'app/views/admin/application_settings/_plantuml.html.haml' - - 'app/views/admin/application_settings/_prometheus.html.haml' - - 'app/views/admin/application_settings/_realtime.html.haml' - - 'app/views/admin/application_settings/_repository_check.html.haml' - - 'app/views/admin/application_settings/_signin.html.haml' - - 'app/views/admin/application_settings/_signup.html.haml' - - 'app/views/admin/application_settings/_spam.html.haml' - - 'app/views/admin/application_settings/_terminal.html.haml' - - 'app/views/admin/application_settings/_usage.html.haml' - - 'app/views/admin/application_settings/_visibility_and_access.html.haml' - - 'app/views/admin/applications/_delete_form.html.haml' - - 'app/views/admin/applications/_form.html.haml' - - 'app/views/admin/applications/edit.html.haml' - - 'app/views/admin/applications/index.html.haml' - - 'app/views/admin/applications/new.html.haml' - - 'app/views/admin/applications/show.html.haml' - - 'app/views/admin/background_jobs/show.html.haml' - - 'app/views/admin/broadcast_messages/index.html.haml' - - 'app/views/admin/dashboard/index.html.haml' - - 'app/views/admin/deploy_keys/new.html.haml' - - 'app/views/admin/health_check/show.html.haml' - - 'app/views/admin/hook_logs/_index.html.haml' - - 'app/views/admin/hook_logs/show.html.haml' - - 'app/views/admin/hooks/_form.html.haml' - - 'app/views/admin/hooks/edit.html.haml' - - 'app/views/admin/logs/show.html.haml' - - 'app/views/admin/projects/_projects.html.haml' - - 'app/views/admin/requests_profiles/index.html.haml' - - 'app/views/admin/runners/_runner.html.haml' - - 'app/views/admin/runners/index.html.haml' - - 'app/views/admin/runners/show.html.haml' - - 'app/views/admin/services/_form.html.haml' - - 'app/views/admin/services/index.html.haml' - - 'app/views/admin/spam_logs/_spam_log.html.haml' - - 'app/views/admin/spam_logs/index.html.haml' - - 'app/views/admin/system_info/show.html.haml' - - 'app/views/admin/users/_form.html.haml' - - 'app/views/admin/users/_head.html.haml' - - 'app/views/admin/users/_profile.html.haml' - - 'app/views/admin/users/_projects.html.haml' - - 'app/views/admin/users/new.html.haml' - - 'app/views/admin/users/projects.html.haml' - - 'app/views/admin/users/show.html.haml' - - 'app/views/authentication/_authenticate.html.haml' - - 'app/views/authentication/_register.html.haml' - - 'app/views/clusters/clusters/_cluster.html.haml' - - 'app/views/clusters/clusters/new.html.haml' - - 'app/views/dashboard/milestones/index.html.haml' - - 'app/views/dashboard/projects/_blank_state_admin_welcome.html.haml' - - 'app/views/dashboard/projects/_blank_state_welcome.html.haml' - - 'app/views/dashboard/todos/_todo.html.haml' - - 'app/views/dashboard/todos/index.html.haml' - - 'app/views/devise/confirmations/almost_there.haml' - - 'app/views/devise/mailer/_confirmation_instructions_account.html.haml' - - 'app/views/devise/mailer/_confirmation_instructions_secondary.html.haml' - - 'app/views/devise/mailer/email_changed.html.haml' - - 'app/views/devise/mailer/password_change.html.haml' - - 'app/views/devise/mailer/reset_password_instructions.html.haml' - - 'app/views/devise/mailer/unlock_instructions.html.haml' - - 'app/views/devise/passwords/edit.html.haml' - - 'app/views/devise/sessions/_new_base.html.haml' - - 'app/views/devise/sessions/_new_crowd.html.haml' - - 'app/views/devise/sessions/_new_ldap.html.haml' - - 'app/views/devise/sessions/new.html.haml' - - 'app/views/devise/sessions/two_factor.html.haml' - - 'app/views/devise/shared/_omniauth_box.html.haml' - - 'app/views/devise/shared/_sign_in_link.html.haml' - - 'app/views/devise/shared/_tabs_normal.html.haml' - - 'app/views/discussions/_discussion.html.haml' - - 'app/views/discussions/_headline.html.haml' - - 'app/views/discussions/_notes.html.haml' - - 'app/views/doorkeeper/applications/_delete_form.html.haml' - - 'app/views/doorkeeper/authorized_applications/_delete_form.html.haml' - - 'app/views/errors/encoding.html.haml' - - 'app/views/errors/git_not_found.html.haml' - - 'app/views/errors/omniauth_error.html.haml' - - 'app/views/errors/precondition_failed.html.haml' - - 'app/views/events/_event_push.atom.haml' - - 'app/views/events/event/_push.html.haml' - - 'app/views/groups/_create_chat_team.html.haml' - - 'app/views/groups/_group_admin_settings.html.haml' - - 'app/views/groups/labels/edit.html.haml' - - 'app/views/groups/labels/new.html.haml' - - 'app/views/groups/milestones/edit.html.haml' - - 'app/views/groups/milestones/index.html.haml' - - 'app/views/groups/milestones/new.html.haml' - - 'app/views/groups/projects.html.haml' - - 'app/views/groups/runners/edit.html.haml' - - 'app/views/groups/settings/_advanced.html.haml' - - 'app/views/groups/settings/_lfs.html.haml' - - 'app/views/help/index.html.haml' - - 'app/views/help/instance_configuration.html.haml' - - 'app/views/help/instance_configuration/_gitlab_ci.html.haml' - - 'app/views/help/instance_configuration/_gitlab_pages.html.haml' - - 'app/views/import/bitbucket/status.html.haml' - - 'app/views/import/bitbucket_server/status.html.haml' - - 'app/views/invites/show.html.haml' - - 'app/views/jira_connect/subscriptions/index.html.haml' - - 'app/views/layouts/_mailer.html.haml' - - 'app/views/layouts/header/_default.html.haml' - - 'app/views/layouts/header/_new_dropdown.haml' - - 'app/views/layouts/jira_connect.html.haml' - - 'app/views/layouts/notify.html.haml' - - 'app/views/notify/_failed_builds.html.haml' - - 'app/views/notify/_reassigned_issuable_email.html.haml' - - 'app/views/notify/_removal_notification.html.haml' - - 'app/views/notify/_successful_pipeline.html.haml' - - 'app/views/notify/autodevops_disabled_email.html.haml' - - 'app/views/notify/changed_milestone_email.html.haml' - - 'app/views/notify/import_issues_csv_email.html.haml' - - 'app/views/notify/issue_moved_email.html.haml' - - 'app/views/notify/member_access_denied_email.html.haml' - - 'app/views/notify/member_invite_accepted_email.html.haml' - - 'app/views/notify/member_invited_email.html.haml' - - 'app/views/notify/new_gpg_key_email.html.haml' - - 'app/views/notify/new_mention_in_issue_email.html.haml' - - 'app/views/notify/new_ssh_key_email.html.haml' - - 'app/views/notify/new_user_email.html.haml' - - 'app/views/notify/pages_domain_disabled_email.html.haml' - - 'app/views/notify/pages_domain_enabled_email.html.haml' - - 'app/views/notify/pages_domain_verification_failed_email.html.haml' - - 'app/views/notify/pages_domain_verification_succeeded_email.html.haml' - - 'app/views/notify/pipeline_failed_email.html.haml' - - 'app/views/notify/project_was_exported_email.html.haml' - - 'app/views/notify/project_was_moved_email.html.haml' - - 'app/views/notify/project_was_not_exported_email.html.haml' - - 'app/views/notify/push_to_merge_request_email.html.haml' - - 'app/views/notify/remote_mirror_update_failed_email.html.haml' - - 'app/views/notify/removed_milestone_issue_email.html.haml' - - 'app/views/notify/removed_milestone_merge_request_email.html.haml' - - 'app/views/notify/repository_push_email.html.haml' - - 'app/views/profiles/chat_names/_chat_name.html.haml' - - 'app/views/profiles/chat_names/index.html.haml' - - 'app/views/profiles/chat_names/new.html.haml' - - 'app/views/projects/_bitbucket_import_modal.html.haml' - - 'app/views/projects/_customize_workflow.html.haml' - - 'app/views/projects/_deletion_failed.html.haml' - - 'app/views/projects/_fork_suggestion.html.haml' - - 'app/views/projects/_gitlab_import_modal.html.haml' - - 'app/views/projects/_home_panel.html.haml' - - 'app/views/projects/_import_project_pane.html.haml' - - 'app/views/projects/_readme.html.haml' - - 'app/views/projects/artifacts/_artifact.html.haml' - - 'app/views/projects/artifacts/_tree_file.html.haml' - - 'app/views/projects/artifacts/browse.html.haml' - - 'app/views/projects/blame/_age_map_legend.html.haml' - - 'app/views/projects/blame/show.html.haml' - - 'app/views/projects/blob/_editor.html.haml' - - 'app/views/projects/blob/_header_content.html.haml' - - 'app/views/projects/blob/_remove.html.haml' - - 'app/views/projects/blob/_render_error.html.haml' - - 'app/views/projects/blob/edit.html.haml' - - 'app/views/projects/blob/new.html.haml' - - 'app/views/projects/blob/preview.html.haml' - - 'app/views/projects/blob/viewers/_empty.html.haml' - - 'app/views/projects/blob/viewers/_stl.html.haml' - - 'app/views/projects/branches/_branch.html.haml' - - 'app/views/projects/branches/_delete_protected_modal.html.haml' - - 'app/views/projects/branches/new.html.haml' - - 'app/views/projects/ci/builds/_build.html.haml' - - 'app/views/projects/ci/lints/_create.html.haml' - - 'app/views/projects/compare/_form.html.haml' - - 'app/views/projects/compare/index.html.haml' - - 'app/views/projects/cycle_analytics/_empty_stage.html.haml' - - 'app/views/projects/cycle_analytics/_no_access.html.haml' - - 'app/views/projects/cycle_analytics/_overview.html.haml' - - 'app/views/projects/cycle_analytics/show.html.haml' - - 'app/views/projects/deploy_keys/_form.html.haml' - - 'app/views/projects/deploy_keys/_index.html.haml' - - 'app/views/projects/deploy_keys/edit.html.haml' - - 'app/views/projects/deployments/_deployment.html.haml' - - 'app/views/projects/diffs/_file_header.html.haml' - - 'app/views/projects/diffs/_replaced_image_diff.html.haml' - - 'app/views/projects/diffs/_stats.html.haml' - - 'app/views/projects/empty.html.haml' - - 'app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml' - - 'app/views/projects/hook_logs/_index.html.haml' - - 'app/views/projects/hook_logs/show.html.haml' - - 'app/views/projects/hooks/edit.html.haml' - - 'app/views/projects/imports/new.html.haml' - - 'app/views/projects/imports/show.html.haml' - - 'app/views/projects/issues/_new_branch.html.haml' - - 'app/views/projects/issues/show.html.haml' - - 'app/views/projects/jobs/_header.html.haml' - - 'app/views/projects/jobs/_table.html.haml' - - 'app/views/projects/jobs/index.html.haml' - - 'app/views/projects/labels/edit.html.haml' - - 'app/views/projects/labels/new.html.haml' - - 'app/views/projects/mattermosts/_no_teams.html.haml' - - 'app/views/projects/mattermosts/_team_selection.html.haml' - - 'app/views/projects/mattermosts/new.html.haml' - - 'app/views/projects/merge_requests/_commits.html.haml' - - 'app/views/projects/merge_requests/_mr_title.html.haml' - - 'app/views/projects/merge_requests/creations/_diffs.html.haml' - - 'app/views/projects/merge_requests/creations/_new_compare.html.haml' - - 'app/views/projects/merge_requests/creations/_new_submit.html.haml' - - 'app/views/projects/merge_requests/diffs/_different_base.html.haml' - - 'app/views/projects/merge_requests/diffs/_diffs.html.haml' - - 'app/views/projects/merge_requests/diffs/_version_controls.html.haml' - - 'app/views/projects/merge_requests/invalid.html.haml' - - 'app/views/projects/merge_requests/widget/open/_error.html.haml' - - 'app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml' - - 'app/views/projects/mirrors/_ssh_host_keys.html.haml' - - 'app/views/projects/no_repo.html.haml' - - 'app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml' - - 'app/views/projects/pipelines/_info.html.haml' - - 'app/views/projects/protected_branches/shared/_dropdown.html.haml' - - 'app/views/projects/protected_branches/shared/_index.html.haml' - - 'app/views/projects/protected_branches/shared/_matching_branch.html.haml' - - 'app/views/projects/protected_branches/shared/_protected_branch.html.haml' - - 'app/views/projects/protected_branches/show.html.haml' - - 'app/views/projects/protected_tags/shared/_create_protected_tag.html.haml' - - 'app/views/projects/protected_tags/shared/_dropdown.html.haml' - - 'app/views/projects/protected_tags/shared/_index.html.haml' - - 'app/views/projects/protected_tags/shared/_matching_tag.html.haml' - - 'app/views/projects/protected_tags/shared/_protected_tag.html.haml' - - 'app/views/projects/protected_tags/shared/_tags_list.html.haml' - - 'app/views/projects/protected_tags/show.html.haml' - - 'app/views/projects/registry/repositories/_tag.html.haml' - - 'app/views/projects/repositories/_feed.html.haml' - - 'app/views/projects/runners/_shared_runners.html.haml' - - 'app/views/projects/runners/edit.html.haml' - - 'app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml' - - 'app/views/projects/services/mattermost_slash_commands/_help.html.haml' - - 'app/views/projects/services/prometheus/_metrics.html.haml' - - 'app/views/projects/services/slack_slash_commands/_help.html.haml' - - 'app/views/projects/settings/ci_cd/_badge.html.haml' - - 'app/views/projects/settings/ci_cd/_form.html.haml' - - 'app/views/projects/tags/index.html.haml' - - 'app/views/projects/tags/releases/edit.html.haml' - - 'app/views/projects/tree/_tree_row.html.haml' - - 'app/views/projects/tree/_truncated_notice_tree_row.html.haml' - - 'app/views/projects/triggers/_form.html.haml' - - 'app/views/projects/triggers/_index.html.haml' - - 'app/views/projects/triggers/_trigger.html.haml' - - 'app/views/projects/triggers/edit.html.haml' - - 'app/views/search/results/_issue.html.haml' - - 'app/views/search/results/_note.html.haml' - - 'app/views/search/results/_snippet_blob.html.haml' - - 'app/views/search/results/_snippet_title.html.haml' - - 'app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml' - - 'app/views/shared/_commit_message_container.html.haml' - - 'app/views/shared/_delete_label_modal.html.haml' - - 'app/views/shared/_group_form.html.haml' - - 'app/views/shared/_group_tips.html.haml' - - 'app/views/shared/_md_preview.html.haml' - - 'app/views/shared/_milestone_expired.html.haml' - - 'app/views/shared/_no_password.html.haml' - - 'app/views/shared/_ping_consent.html.haml' - - 'app/views/shared/_project_limit.html.haml' - - 'app/views/shared/boards/components/_sidebar.html.haml' - - 'app/views/shared/boards/components/sidebar/_due_date.html.haml' - - 'app/views/shared/boards/components/sidebar/_labels.html.haml' - - 'app/views/shared/boards/components/sidebar/_milestone.html.haml' - - 'app/views/shared/hook_logs/_content.html.haml' - - 'app/views/shared/issuable/_assignees.html.haml' - - 'app/views/shared/issuable/_board_create_list_dropdown.html.haml' - - 'app/views/shared/issuable/_form.html.haml' - - 'app/views/shared/issuable/_search_bar.html.haml' - - 'app/views/shared/issuable/_sidebar.html.haml' - - 'app/views/shared/issuable/form/_default_templates.html.haml' - - 'app/views/shared/issuable/form/_template_selector.html.haml' - - 'app/views/shared/issuable/form/_title.html.haml' - - 'app/views/shared/labels/_form.html.haml' - - 'app/views/shared/members/_member.html.haml' - - 'app/views/shared/milestones/_form_dates.html.haml' - - 'app/views/shared/milestones/_issuable.html.haml' - - 'app/views/shared/milestones/_milestone.html.haml' - - 'app/views/shared/milestones/_sidebar.html.haml' - - 'app/views/shared/milestones/_top.html.haml' - - 'app/views/shared/notes/_hints.html.haml' - - 'app/views/shared/runners/_runner_description.html.haml' - - 'app/views/shared/runners/show.html.haml' - - 'app/views/shared/snippets/_header.html.haml' - - 'app/views/shared/snippets/_snippet.html.haml' - - 'app/views/shared/web_hooks/_form.html.haml' - - 'app/views/shared/web_hooks/_hook.html.haml' - - 'app/views/shared/wikis/_pages_wiki_page.html.haml' - - 'app/views/users/_deletion_guidance.html.haml' - - 'ee/app/views/admin/_namespace_plan_info.html.haml' - - 'ee/app/views/admin/application_settings/_templates.html.haml' - - 'ee/app/views/admin/audit_logs/index.html.haml' - - 'ee/app/views/admin/emails/show.html.haml' - - 'ee/app/views/admin/geo/projects/_registry_failed.html.haml' - - 'ee/app/views/admin/geo/projects/_registry_never.html.haml' - - 'ee/app/views/admin/licenses/_upload_trial_license.html.haml' - - 'ee/app/views/admin/licenses/new.html.haml' - - 'ee/app/views/admin/monitoring/ee/_nav.html.haml' - - 'ee/app/views/admin/projects/_shared_runner_status.html.haml' - - 'ee/app/views/admin/users/_auditor_access_level_radio.html.haml' - - 'ee/app/views/admin/users/_auditor_user_badge.html.haml' - - 'ee/app/views/admin/users/_limits.html.haml' - - 'ee/app/views/admin/users/_user_detail_note.html.haml' - - 'ee/app/views/dashboard/projects/_blank_state_ee_trial.html.haml' - - 'ee/app/views/errors/kerberos_denied.html.haml' - - 'ee/app/views/groups/ee/_settings_nav.html.haml' - - 'ee/app/views/groups/group_members/_ldap_sync.html.haml' - - 'ee/app/views/groups/hooks/edit.html.haml' - - 'ee/app/views/groups/ldap_group_links/index.html.haml' - - 'ee/app/views/layouts/nav/ee/admin/_new_monitoring_sidebar.html.haml' - - 'ee/app/views/layouts/service_desk.html.haml' - - 'ee/app/views/ldap_group_links/_form.html.haml' - - 'ee/app/views/ldap_group_links/_ldap_group_link.html.haml' - - 'ee/app/views/ldap_group_links/_ldap_group_links.html.haml' - - 'ee/app/views/ldap_group_links/_ldap_group_links_show.html.haml' - - 'ee/app/views/namespaces/_shared_runner_status.html.haml' - - 'ee/app/views/namespaces/_shared_runners_minutes_setting.html.haml' - - 'ee/app/views/namespaces/pipelines_quota/_extra_shared_runners_minutes_quota.html.haml' - - 'ee/app/views/namespaces/pipelines_quota/_list.haml' - - 'ee/app/views/notify/approved_merge_request_email.html.haml' - - 'ee/app/views/notify/epic_status_changed_email.html.haml' - - 'ee/app/views/notify/new_review_email.html.haml' - - 'ee/app/views/notify/send_admin_notification.html.haml' - - 'ee/app/views/notify/send_unsubscribed_notification.html.haml' - - 'ee/app/views/notify/unapproved_merge_request_email.html.haml' - - 'ee/app/views/oauth/geo_auth/error.html.haml' - - 'ee/app/views/projects/commits/_mirror_status.html.haml' - - 'ee/app/views/projects/merge_requests/_approvals_count.html.haml' - - 'ee/app/views/projects/merge_requests/widget/open/_geo.html.haml' - - 'ee/app/views/projects/mirrors/_mirrored_repositories_count.html.haml' - - 'ee/app/views/projects/protected_branches/_update_protected_branch.html.haml' - - 'ee/app/views/projects/protected_branches/ee/_create_protected_branch.html.haml' - - 'ee/app/views/projects/protected_branches/ee/_dropdown.html.haml' - - 'ee/app/views/projects/protected_tags/_protected_tag_extra_create_access_levels.haml' - - 'ee/app/views/projects/protected_tags/ee/_create_protected_tag.html.haml' - - 'ee/app/views/projects/push_rules/_index.html.haml' - - 'ee/app/views/projects/services/gitlab_slack_application/_help.html.haml' - - 'ee/app/views/projects/services/gitlab_slack_application/_slack_integration_form.html.haml' - - 'ee/app/views/projects/settings/slacks/edit.html.haml' - - 'ee/app/views/shared/epic/_search_bar.html.haml' - - 'ee/app/views/shared/issuable/_approvals.html.haml' - - 'ee/app/views/shared/issuable/_board_create_list_dropdown.html.haml' - - 'ee/app/views/shared/issuable/_filter_weight.html.haml' - - 'ee/app/views/shared/members/ee/_ldap_tag.html.haml' - - 'ee/app/views/shared/members/ee/_sso_badge.html.haml' - - 'ee/app/views/shared/milestones/_burndown.html.haml' - - 'ee/app/views/shared/milestones/_weight.html.haml' - - 'ee/app/views/shared/promotions/_promote_issue_weights.html.haml' - - 'ee/app/views/shared/promotions/_promote_repository_features.html.haml' - - 'ee/app/views/shared/promotions/_promote_servicedesk.html.haml' - - 'ee/app/views/shared/push_rules/_form.html.haml' - - 'ee/app/views/unsubscribes/show.html.haml' diff --git a/.rubocop.yml b/.rubocop.yml index 8f5407c64c..a19cba5eb4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -629,3 +629,31 @@ Lint/RedundantSafeNavigation: Style/ClassEqualityComparison: Enabled: true + +# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/207950 +Cop/UserAdmin: + Enabled: true + Exclude: + - 'app/controllers/admin/sessions_controller.rb' + - 'app/controllers/concerns/enforces_admin_authentication.rb' + - 'app/policies/base_policy.rb' + - 'lib/gitlab/auth/current_user_mode.rb' + - 'spec/**/*.rb' + - 'ee/spec/**/*.rb' + +Performance/OpenStruct: + Exclude: + - 'ee/spec/**/*.rb' + +# See https://gitlab.com/gitlab-org/gitlab/-/issues/327495 +Style/RegexpLiteral: + Enabled: false + +Style/RegexpLiteralMixedPreserve: + Enabled: true + SupportedStyles: + - slashes + - percent_r + - mixed + - mixed_preserve + EnforcedStyle: mixed_preserve diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml index 9b20af5552..f2aa94ac7e 100644 --- a/.rubocop_manual_todo.yml +++ b/.rubocop_manual_todo.yml @@ -41,23 +41,11 @@ Graphql/Descriptions: - 'ee/app/graphql/types/vulnerability_severity_enum.rb' - 'ee/app/graphql/types/vulnerability_state_enum.rb' -# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/267606 -FactoryBot/InlineAssociation: - Exclude: - - 'spec/factories/atlassian_identities.rb' - - 'spec/factories/events.rb' - - 'spec/factories/git_wiki_commit_details.rb' - - 'spec/factories/gitaly/commit.rb' - - 'spec/factories/group_group_links.rb' - - 'spec/factories/import_export_uploads.rb' - # WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040 Rails/SaveBang: Exclude: - 'ee/spec/controllers/projects/merge_requests_controller_spec.rb' - 'ee/spec/controllers/subscriptions_controller_spec.rb' - - 'ee/spec/frontend/fixtures/analytics.rb' - - 'ee/spec/graphql/resolvers/vulnerabilities_resolver_spec.rb' - 'ee/spec/initializers/fog_google_https_private_urls_spec.rb' - 'ee/spec/lib/analytics/merge_request_metrics_calculator_spec.rb' - 'ee/spec/lib/ee/gitlab/auth/ldap/sync/group_spec.rb' @@ -77,8 +65,6 @@ Rails/SaveBang: - 'ee/spec/models/approval_merge_request_rule_spec.rb' - 'ee/spec/models/approval_project_rule_spec.rb' - 'ee/spec/models/burndown_spec.rb' - - 'ee/spec/models/ci/pipeline_spec.rb' - - 'ee/spec/models/ci/subscriptions/project_spec.rb' - 'ee/spec/models/ee/appearance_spec.rb' - 'ee/spec/models/ee/ci/job_artifact_spec.rb' - 'ee/spec/models/ee/protected_branch_spec.rb' @@ -87,11 +73,7 @@ Rails/SaveBang: - 'ee/spec/models/elasticsearch_indexed_namespace_spec.rb' - 'ee/spec/models/environment_spec.rb' - 'ee/spec/models/epic_spec.rb' - - 'ee/spec/models/geo/project_registry_spec.rb' - - 'ee/spec/models/geo_node_spec.rb' - - 'ee/spec/models/geo_node_status_spec.rb' - 'ee/spec/models/gitlab_subscription_spec.rb' - - 'ee/spec/models/group_spec.rb' - 'ee/spec/models/issue_spec.rb' - 'ee/spec/models/label_note_spec.rb' - 'ee/spec/models/lfs_object_spec.rb' @@ -110,28 +92,6 @@ Rails/SaveBang: - 'ee/spec/models/visible_approvable_spec.rb' - 'ee/spec/models/vulnerabilities/feedback_spec.rb' - 'ee/spec/models/vulnerabilities/issue_link_spec.rb' - - 'ee/spec/presenters/audit_event_presenter_spec.rb' - - 'ee/spec/presenters/epic_presenter_spec.rb' - - 'ee/spec/requests/api/boards_spec.rb' - - 'ee/spec/requests/api/epic_issues_spec.rb' - - 'ee/spec/requests/api/epic_links_spec.rb' - - 'ee/spec/requests/api/epics_spec.rb' - - 'ee/spec/requests/api/geo_nodes_spec.rb' - - 'ee/spec/requests/api/geo_spec.rb' - - 'ee/spec/requests/api/graphql/group/epics_spec.rb' - - 'ee/spec/requests/api/graphql/mutations/epic_tree/reorder_spec.rb' - - 'ee/spec/requests/api/groups_spec.rb' - - 'ee/spec/requests/api/issues_spec.rb' - - 'ee/spec/requests/api/ldap_group_links_spec.rb' - - 'ee/spec/requests/api/merge_request_approval_rules_spec.rb' - - 'ee/spec/requests/api/merge_request_approvals_spec.rb' - - 'ee/spec/requests/api/merge_requests_spec.rb' - - 'ee/spec/requests/api/project_approvals_spec.rb' - - 'ee/spec/requests/api/projects_spec.rb' - - 'ee/spec/requests/api/protected_branches_spec.rb' - - 'ee/spec/requests/api/scim_spec.rb' - - 'ee/spec/requests/api/todos_spec.rb' - - 'ee/spec/requests/lfs_http_spec.rb' - 'ee/spec/services/approval_rules/finalize_service_spec.rb' - 'ee/spec/services/approval_rules/update_service_spec.rb' - 'ee/spec/services/ee/boards/issues/create_service_spec.rb' @@ -188,101 +148,16 @@ Rails/SaveBang: - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_ssh_with_key_spec.rb' - 'spec/controllers/abuse_reports_controller_spec.rb' - - 'spec/controllers/admin/impersonations_controller_spec.rb' - - 'spec/controllers/admin/runners_controller_spec.rb' - - 'spec/controllers/admin/services_controller_spec.rb' - 'spec/controllers/boards/issues_controller_spec.rb' - - 'spec/controllers/groups/milestones_controller_spec.rb' - - 'spec/controllers/groups/runners_controller_spec.rb' - - 'spec/controllers/groups/uploads_controller_spec.rb' - - 'spec/controllers/groups_controller_spec.rb' - - 'spec/controllers/oauth/authorizations_controller_spec.rb' - - 'spec/controllers/omniauth_callbacks_controller_spec.rb' - - 'spec/controllers/profiles/emails_controller_spec.rb' - - 'spec/controllers/profiles/notifications_controller_spec.rb' - - 'spec/controllers/projects/artifacts_controller_spec.rb' - - 'spec/controllers/projects/cycle_analytics/events_controller_spec.rb' - - 'spec/controllers/projects/cycle_analytics_controller_spec.rb' - - 'spec/controllers/projects/discussions_controller_spec.rb' - - 'spec/controllers/projects/forks_controller_spec.rb' - - 'spec/controllers/projects/group_links_controller_spec.rb' - - 'spec/controllers/projects/imports_controller_spec.rb' - - 'spec/controllers/projects/issues_controller_spec.rb' - - 'spec/controllers/projects/labels_controller_spec.rb' - - 'spec/controllers/projects/milestones_controller_spec.rb' - - 'spec/controllers/projects/notes_controller_spec.rb' - - 'spec/controllers/projects/pipelines_controller_spec.rb' - - 'spec/controllers/projects/releases/evidences_controller_spec.rb' - - 'spec/controllers/projects/runners_controller_spec.rb' - - 'spec/controllers/projects/starrers_controller_spec.rb' - - 'spec/controllers/projects/uploads_controller_spec.rb' - - 'spec/controllers/projects_controller_spec.rb' - 'spec/controllers/sent_notifications_controller_spec.rb' - 'spec/controllers/sessions_controller_spec.rb' - - 'spec/factories_spec.rb' - - 'spec/features/admin/admin_appearance_spec.rb' - - 'spec/features/admin/admin_labels_spec.rb' - - 'spec/features/admin/admin_mode/login_spec.rb' - - 'spec/features/admin/admin_runners_spec.rb' - - 'spec/features/admin/admin_sees_project_statistics_spec.rb' - - 'spec/features/admin/admin_sees_projects_statistics_spec.rb' - - 'spec/features/admin/admin_users_impersonation_tokens_spec.rb' - - 'spec/features/boards/sidebar_spec.rb' - - 'spec/features/calendar_spec.rb' - - 'spec/features/commits_spec.rb' - - 'spec/features/dashboard/datetime_on_tooltips_spec.rb' - - 'spec/features/dashboard/issuables_counter_spec.rb' - - 'spec/features/dashboard/project_member_activity_index_spec.rb' - - 'spec/features/dashboard/projects_spec.rb' - - 'spec/features/error_tracking/user_sees_error_index_spec.rb' - - 'spec/features/groups/members/request_access_spec.rb' - - 'spec/features/issuables/close_reopen_report_toggle_spec.rb' - - 'spec/features/issues/bulk_assignment_labels_spec.rb' - - 'spec/features/issues/gfm_autocomplete_spec.rb' - - 'spec/features/issues/issue_sidebar_spec.rb' - - 'spec/features/issues/note_polling_spec.rb' - - 'spec/features/issues/user_creates_branch_and_merge_request_spec.rb' - - 'spec/features/issues/user_creates_confidential_merge_request_spec.rb' - - 'spec/features/issues/user_edits_issue_spec.rb' - - 'spec/features/issues/user_filters_issues_spec.rb' - - 'spec/features/issues/user_sees_live_update_spec.rb' - - 'spec/features/issues/user_sorts_issues_spec.rb' - - 'spec/features/profiles/emails_spec.rb' - - 'spec/features/profiles/password_spec.rb' - - 'spec/features/profiles/personal_access_tokens_spec.rb' - - 'spec/features/projects/features_visibility_spec.rb' - - 'spec/features/projects/fork_spec.rb' - - 'spec/features/projects/jobs_spec.rb' - - 'spec/features/projects/members/user_requests_access_spec.rb' - - 'spec/features/projects/pages_lets_encrypt_spec.rb' - - 'spec/features/projects/pages_spec.rb' - - 'spec/features/projects/pipelines/pipeline_spec.rb' - - 'spec/features/projects/pipelines/pipelines_spec.rb' - - 'spec/features/projects/remote_mirror_spec.rb' - - 'spec/features/projects/services/user_activates_slack_notifications_spec.rb' - - 'spec/features/projects/settings/access_tokens_spec.rb' - - 'spec/features/projects/show/user_sees_deletion_failure_message_spec.rb' - - 'spec/features/projects/user_sees_sidebar_spec.rb' - - 'spec/features/projects/wiki/user_updates_wiki_page_spec.rb' - - 'spec/features/projects/wiki/user_views_wiki_page_spec.rb' - - 'spec/features/projects/wiki/users_views_asciidoc_page_with_includes_spec.rb' - - 'spec/features/runners_spec.rb' - - 'spec/features/security/project/internal_access_spec.rb' - - 'spec/features/security/project/private_access_spec.rb' - - 'spec/features/security/project/public_access_spec.rb' - - 'spec/features/users/login_spec.rb' - - 'spec/features/users/show_spec.rb' - 'spec/frontend/fixtures/issues.rb' - 'spec/frontend/fixtures/merge_requests.rb' - 'spec/graphql/mutations/merge_requests/set_locked_spec.rb' - 'spec/graphql/mutations/merge_requests/set_wip_spec.rb' - 'spec/graphql/resolvers/boards_resolver_spec.rb' - - 'spec/initializers/active_record_locking_spec.rb' - - 'spec/initializers/fog_google_https_private_urls_spec.rb' - 'spec/lib/after_commit_queue_spec.rb' - 'spec/lib/backup/manager_spec.rb' - - 'spec/lib/banzai/reference_parser/external_issue_parser_spec.rb' - - 'spec/lib/banzai/reference_redactor_spec.rb' - 'spec/lib/gitlab/alerting/alert_spec.rb' - 'spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb' - 'spec/lib/gitlab/auth/ldap/user_spec.rb' @@ -291,18 +166,12 @@ Rails/SaveBang: - 'spec/lib/gitlab/auth_spec.rb' - 'spec/lib/gitlab/authorized_keys_spec.rb' - 'spec/lib/gitlab/bitbucket_server_import/importer_spec.rb' - - 'spec/lib/gitlab/ci/ansi2json/style_spec.rb' - - 'spec/lib/gitlab/ci/status/build/common_spec.rb' - 'spec/lib/gitlab/cycle_analytics/base_event_fetcher_spec.rb' - 'spec/lib/gitlab/database/custom_structure_spec.rb' - 'spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb' - 'spec/lib/gitlab/database_importers/self_monitoring/project/create_service_spec.rb' - - 'spec/lib/gitlab/email/handler/create_note_handler_spec.rb' - - 'spec/lib/gitlab/email/handler/unsubscribe_handler_spec.rb' - 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb' - 'spec/lib/gitlab/git_access_spec.rb' - - 'spec/lib/gitlab/gitaly_client/object_pool_service_spec.rb' - - 'spec/lib/gitlab/gitaly_client/repository_service_spec.rb' - 'spec/lib/gitlab/import_export/avatar_saver_spec.rb' - 'spec/lib/gitlab/import_export/base/relation_factory_spec.rb' - 'spec/lib/gitlab/import_export/design_repo_restorer_spec.rb' @@ -327,29 +196,15 @@ Rails/SaveBang: - 'spec/lib/gitlab/import_export/uploads_manager_spec.rb' - 'spec/lib/gitlab/import_export/uploads_saver_spec.rb' - 'spec/lib/gitlab/import_export/wiki_restorer_spec.rb' - - 'spec/lib/gitlab/legacy_github_import/importer_spec.rb' - - 'spec/lib/gitlab/legacy_github_import/issue_formatter_spec.rb' - - 'spec/lib/gitlab/legacy_github_import/milestone_formatter_spec.rb' - - 'spec/lib/gitlab/legacy_github_import/pull_request_formatter_spec.rb' - 'spec/lib/gitlab/lets_encrypt/client_spec.rb' - - 'spec/lib/gitlab/markdown_cache/active_record/extension_spec.rb' - - 'spec/lib/gitlab/markdown_cache/redis/store_spec.rb' - 'spec/lib/gitlab/middleware/go_spec.rb' - 'spec/lib/gitlab/shard_health_cache_spec.rb' - - 'spec/lib/mattermost/command_spec.rb' - - 'spec/lib/mattermost/session_spec.rb' - - 'spec/lib/mattermost/team_spec.rb' - 'spec/mailers/notify_spec.rb' - 'spec/models/appearance_spec.rb' - 'spec/models/application_record_spec.rb' - 'spec/models/application_setting_spec.rb' - 'spec/models/clusters/applications/helm_spec.rb' - - 'spec/models/commit_spec.rb' - - 'spec/models/commit_status_spec.rb' - 'spec/models/container_repository_spec.rb' - - 'spec/models/deploy_keys_project_spec.rb' - - 'spec/models/deploy_token_spec.rb' - - 'spec/models/deployment_spec.rb' - 'spec/models/design_management/version_spec.rb' - 'spec/models/diff_discussion_spec.rb' - 'spec/models/diff_note_spec.rb' @@ -360,11 +215,7 @@ Rails/SaveBang: - 'spec/models/generic_commit_status_spec.rb' - 'spec/models/grafana_integration_spec.rb' - 'spec/models/group_spec.rb' - - 'spec/models/hooks/system_hook_spec.rb' - - 'spec/models/hooks/web_hook_spec.rb' - 'spec/models/identity_spec.rb' - - 'spec/models/issue/metrics_spec.rb' - - 'spec/models/issue_spec.rb' - 'spec/models/jira_import_state_spec.rb' - 'spec/models/key_spec.rb' - 'spec/models/lfs_objects_project_spec.rb' @@ -399,28 +250,6 @@ Rails/SaveBang: - 'spec/models/user_status_spec.rb' - 'spec/models/wiki_page/meta_spec.rb' - 'spec/models/wiki_page_spec.rb' - - 'spec/presenters/ci/build_runner_presenter_spec.rb' - - 'spec/presenters/ci/trigger_presenter_spec.rb' - - 'spec/presenters/packages/conan/package_presenter_spec.rb' - - 'spec/requests/api/ci/runner_spec.rb' - - 'spec/requests/api/commit_statuses_spec.rb' - - 'spec/requests/api/conan_packages_spec.rb' - - 'spec/requests/api/deployments_spec.rb' - - 'spec/requests/api/environments_spec.rb' - - 'spec/requests/api/go_proxy_spec.rb' - - 'spec/requests/api/graphql/mutations/merge_requests/set_labels_spec.rb' - - 'spec/requests/api/graphql/user_query_spec.rb' - - 'spec/requests/api/graphql_spec.rb' - - 'spec/requests/api/group_import_spec.rb' - - 'spec/requests/api/group_milestones_spec.rb' - - 'spec/requests/api/internal/base_spec.rb' - - 'spec/requests/api/issues/get_group_issues_spec.rb' - - 'spec/requests/api/issues/post_projects_issues_spec.rb' - - 'spec/requests/api/jobs_spec.rb' - - 'spec/requests/api/labels_spec.rb' - - 'spec/requests/api/project_import_spec.rb' - - 'spec/requests/projects/cycle_analytics_events_spec.rb' - - 'spec/requests/users_controller_spec.rb' Rails/TimeZone: Enabled: true @@ -578,6 +407,620 @@ Rails/TimeZone: - 'spec/tooling/rspec_flaky/listener_spec.rb' - 'spec/tooling/rspec_flaky/report_spec.rb' +# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/325836 +RSpec/EmptyLineAfterFinalLetItBe: + Exclude: + - ee/spec/controllers/groups/analytics/cycle_analytics/stages_controller_spec.rb + - ee/spec/controllers/groups/analytics/cycle_analytics/summary_controller_spec.rb + - ee/spec/controllers/groups/analytics/cycle_analytics/value_streams_controller_spec.rb + - ee/spec/controllers/groups/analytics/tasks_by_type_controller_spec.rb + - ee/spec/controllers/groups/autocomplete_sources_controller_spec.rb + - ee/spec/controllers/groups/insights_controller_spec.rb + - ee/spec/controllers/groups/todos_controller_spec.rb + - ee/spec/controllers/projects/branches_controller_spec.rb + - ee/spec/controllers/projects/incident_management/oncall_schedules_controller_spec.rb + - ee/spec/controllers/projects/insights_controller_spec.rb + - ee/spec/controllers/projects/licenses_controller_spec.rb + - ee/spec/controllers/projects/merge_requests_controller_spec.rb + - ee/spec/controllers/projects/mirrors_controller_spec.rb + - ee/spec/controllers/projects/threat_monitoring_controller_spec.rb + - ee/spec/controllers/subscriptions_controller_spec.rb + - ee/spec/features/boards/group_boards/multiple_boards_spec.rb + - ee/spec/features/ci_shared_runner_warnings_spec.rb + - ee/spec/features/dashboards/todos_spec.rb + - ee/spec/features/groups/groups_security_credentials_spec.rb + - ee/spec/features/groups/hooks/user_edits_hooks_spec.rb + - ee/spec/features/groups/iterations/user_edits_iteration_spec.rb + - ee/spec/features/groups/usage_quotas_spec.rb + - ee/spec/features/integrations/jira/jira_issues_list_spec.rb + - ee/spec/features/issues/bulk_assignment_epic_spec.rb + - ee/spec/features/issues/user_uses_quick_actions_spec.rb + - ee/spec/features/markdown/metrics_spec.rb + - ee/spec/features/registrations/group_invites_during_signup_flow_spec.rb + - ee/spec/features/subscriptions_spec.rb + - ee/spec/graphql/ee/mutations/concerns/mutations/resolves_issuable_spec.rb + - ee/spec/graphql/mutations/boards/update_epic_user_preferences_spec.rb + - ee/spec/graphql/mutations/clusters/agent_tokens/create_spec.rb + - ee/spec/graphql/mutations/compliance_management/frameworks/create_spec.rb + - ee/spec/graphql/mutations/compliance_management/frameworks/destroy_spec.rb + - ee/spec/graphql/mutations/compliance_management/frameworks/update_spec.rb + - ee/spec/graphql/mutations/dast_scanner_profiles/delete_spec.rb + - ee/spec/graphql/mutations/epics/add_issue_spec.rb + - ee/spec/graphql/mutations/gitlab_subscriptions/activate_spec.rb + - ee/spec/graphql/mutations/incident_management/oncall_rotation/create_spec.rb + - ee/spec/graphql/mutations/incident_management/oncall_rotation/destroy_spec.rb + - ee/spec/graphql/mutations/incident_management/oncall_schedule/create_spec.rb + - ee/spec/graphql/mutations/incident_management/oncall_schedule/destroy_spec.rb + - ee/spec/graphql/mutations/incident_management/oncall_schedule/update_spec.rb + - ee/spec/graphql/mutations/issues/set_epic_spec.rb + - ee/spec/graphql/mutations/requirements_management/export_requirements_spec.rb + - ee/spec/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb + - ee/spec/graphql/types/issue_type_spec.rb + - ee/spec/helpers/ee/graph_helper_spec.rb + - ee/spec/helpers/ee/issues_helper_spec.rb + - ee/spec/helpers/ee/projects/incidents_helper_spec.rb + - ee/spec/helpers/ee/projects/security/api_fuzzing_configuration_helper_spec.rb + - ee/spec/helpers/ee/projects/security/configuration_helper_spec.rb + - ee/spec/helpers/ee/projects/security/sast_configuration_helper_spec.rb + - ee/spec/helpers/ee/trial_helper_spec.rb + - ee/spec/helpers/ee/user_callouts_helper_spec.rb + - ee/spec/helpers/vulnerabilities_helper_spec.rb + - ee/spec/lib/ee/api/entities/user_with_admin_spec.rb + - ee/spec/lib/ee/api/entities/vulnerability_spec.rb + - ee/spec/lib/ee/event_filter_spec.rb + - ee/spec/lib/ee/gitlab/alert_management/payload/generic_spec.rb + - ee/spec/lib/ee/gitlab/alert_management/payload_spec.rb + - ee/spec/lib/ee/gitlab/ci/pipeline/chain/validate/external_spec.rb + - ee/spec/lib/ee/gitlab/ci/pipeline/quota/activity_spec.rb + - ee/spec/lib/ee/gitlab/ci/pipeline/quota/job_activity_spec.rb + - ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb + - ee/spec/lib/ee/gitlab/git_access_design_spec.rb + - ee/spec/lib/ee/gitlab/git_access_snippet_spec.rb + - ee/spec/lib/ee/gitlab/hook_data/issue_builder_spec.rb + - ee/spec/lib/ee/gitlab/import_export/project/tree_restorer_spec.rb + - ee/spec/lib/ee/gitlab/snippet_search_results_spec.rb + - ee/spec/lib/elastic/latest/git_class_proxy_spec.rb + - ee/spec/lib/gitlab/alert_management/payload/cilium_spec.rb + - ee/spec/lib/gitlab/analytics/cycle_analytics/summary/group/stage_time_summary_spec.rb + - ee/spec/lib/gitlab/checks/diff_check_spec.rb + - ee/spec/lib/gitlab/code_owners/loader_spec.rb + - ee/spec/lib/gitlab/elastic/document_reference_spec.rb + - ee/spec/lib/gitlab/elastic/group_search_results_spec.rb + - ee/spec/lib/gitlab/elastic/project_search_results_spec.rb + - ee/spec/lib/gitlab/git_access_spec.rb + - ee/spec/lib/gitlab/git_access_wiki_spec.rb + - ee/spec/lib/gitlab/graphql/aggregations/vulnerability_statistics/lazy_aggregate_spec.rb + - ee/spec/lib/gitlab/insights/project_insights_config_spec.rb + - ee/spec/lib/gitlab/sitemaps/url_extractor_spec.rb + - ee/spec/requests/api/analytics/code_review_analytics_spec.rb + - ee/spec/requests/api/audit_events_spec.rb + - ee/spec/requests/api/commits_spec.rb + - ee/spec/requests/api/dora/metrics_spec.rb + - ee/spec/requests/api/epics_spec.rb + - ee/spec/requests/api/external_approval_rules_spec.rb + - ee/spec/requests/api/geo_spec.rb + - ee/spec/requests/api/graphql/boards/epic_board_list_epics_query_spec.rb + - ee/spec/requests/api/graphql/current_user/todos_query_spec.rb + - ee/spec/requests/api/graphql/group/epic/epic_issues_spec.rb + - ee/spec/requests/api/graphql/group/epics_spec.rb + - ee/spec/requests/api/graphql/mutations/analytics/devops_adoption/segments/create_spec.rb + - ee/spec/requests/api/graphql/mutations/analytics/devops_adoption/segments/delete_spec.rb + - ee/spec/requests/api/graphql/mutations/boards/create_spec.rb + - ee/spec/requests/api/graphql/mutations/boards/epic_boards/create_spec.rb + - ee/spec/requests/api/graphql/mutations/boards/epic_boards/update_spec.rb + - ee/spec/requests/api/graphql/mutations/boards/issues/issue_move_list_spec.rb + - ee/spec/requests/api/graphql/mutations/boards/lists/update_limit_metrics_spec.rb + - ee/spec/requests/api/graphql/mutations/compliance_management/frameworks/destroy_spec.rb + - ee/spec/requests/api/graphql/mutations/compliance_management/frameworks/update_spec.rb + - ee/spec/requests/api/graphql/mutations/dast_scanner_profiles/update_spec.rb + - ee/spec/requests/api/graphql/mutations/environments/canary_ingress/update_spec.rb + - ee/spec/requests/api/graphql/mutations/epics/add_issue_spec.rb + - ee/spec/requests/api/graphql/mutations/epics/set_subscription_spec.rb + - ee/spec/requests/api/graphql/mutations/epics/update_spec.rb + - ee/spec/requests/api/graphql/mutations/gitlab_subscriptions/activate_spec.rb + - ee/spec/requests/api/graphql/mutations/incident_management/oncall_rotation/create_spec.rb + - ee/spec/requests/api/graphql/mutations/incident_management/oncall_schedule/create_spec.rb + - ee/spec/requests/api/graphql/mutations/incident_management/oncall_schedule/destroy_spec.rb + - ee/spec/requests/api/graphql/mutations/incident_management/oncall_schedule/update_spec.rb + - ee/spec/requests/api/graphql/mutations/issues/promote_to_epic_spec.rb + - ee/spec/requests/api/graphql/mutations/issues/update_spec.rb + - ee/spec/requests/api/graphql/mutations/iterations/create_spec.rb + - ee/spec/requests/api/graphql/mutations/notes/create/note_spec.rb + - ee/spec/requests/api/graphql/mutations/quality_management/test_cases/create_spec.rb + - ee/spec/requests/api/graphql/namespace/compliance_frameworks_spec.rb + - ee/spec/requests/api/graphql/project/alert_management/payload_fields_spec.rb + - ee/spec/requests/api/graphql/project/requirements_management/requirements_spec.rb + - ee/spec/requests/api/graphql/projects/compliance_frameworks_spec.rb + - ee/spec/requests/api/groups_spec.rb + - ee/spec/requests/api/internal/base_spec.rb + - ee/spec/requests/api/issues_spec.rb + - ee/spec/requests/api/ldap_spec.rb + - ee/spec/requests/api/merge_request_approval_rules_spec.rb + - ee/spec/requests/api/merge_request_approvals_spec.rb + - ee/spec/requests/api/merge_requests_spec.rb + - ee/spec/requests/api/merge_trains_spec.rb + - ee/spec/requests/api/project_approval_rules_spec.rb + - ee/spec/requests/api/project_approval_settings_spec.rb + - ee/spec/requests/api/projects_spec.rb + - ee/spec/requests/api/todos_spec.rb + - ee/spec/requests/api/vulnerabilities_spec.rb + - ee/spec/requests/api/vulnerability_issue_links_spec.rb + - ee/spec/requests/api/wikis_spec.rb + - ee/spec/requests/callout_spec.rb + - ee/spec/requests/git_http_geo_spec.rb + - ee/spec/requests/repositories/git_http_controller_spec.rb + - ee/spec/services/alert_management/extract_alert_payload_fields_service_spec.rb + - ee/spec/services/alert_management/process_prometheus_alert_service_spec.rb + - ee/spec/services/approval_rules/create_service_spec.rb + - ee/spec/services/audit_event_service_spec.rb + - ee/spec/services/award_emojis/add_service_spec.rb + - ee/spec/services/award_emojis/destroy_service_spec.rb + - ee/spec/services/billable_members/destroy_service_spec.rb + - ee/spec/services/boards/epic_boards/destroy_service_spec.rb + - ee/spec/services/clusters/agent_tokens/create_service_spec.rb + - ee/spec/services/compliance_management/frameworks/create_service_spec.rb + - ee/spec/services/compliance_management/frameworks/update_service_spec.rb + - ee/spec/services/dast_scanner_profiles/destroy_service_spec.rb + - ee/spec/services/dast_scanner_profiles/update_service_spec.rb + - ee/spec/services/dast_site_profiles/destroy_service_spec.rb + - ee/spec/services/dora/aggregate_metrics_service_spec.rb + - ee/spec/services/external_approval_rules/create_service_spec.rb + - ee/spec/services/external_approval_rules/destroy_service_spec.rb + - ee/spec/services/external_approval_rules/update_service_spec.rb + - ee/spec/services/gitlab_subscriptions/activate_service_spec.rb + - ee/spec/services/gitlab_subscriptions/apply_trial_service_spec.rb + - ee/spec/services/incident_management/incidents/upload_metric_service_spec.rb + - ee/spec/services/incident_management/oncall_rotations/edit_service_spec.rb + - ee/spec/services/merge_request_approval_settings/update_service_spec.rb + - ee/spec/services/personal_access_tokens/create_service_audit_log_spec.rb + - ee/spec/services/personal_access_tokens/groups/update_lifetime_service_spec.rb + - ee/spec/services/projects/after_rename_service_spec.rb + - ee/spec/services/projects/alerting/notify_service_spec.rb + - ee/spec/services/projects/destroy_service_spec.rb + - ee/spec/services/projects/gitlab_projects_import_service_spec.rb + - ee/spec/services/projects/import_export/export_service_spec.rb + - ee/spec/services/projects/transfer_service_spec.rb + - ee/spec/services/push_rules/create_or_update_service_spec.rb + - ee/spec/services/quality_management/test_cases/create_service_spec.rb + - ee/spec/services/quick_actions/interpret_service_spec.rb + - ee/spec/services/requirements_management/create_requirement_service_spec.rb + - ee/spec/services/requirements_management/export_csv_service_spec.rb + - ee/spec/services/requirements_management/update_requirement_service_spec.rb + - ee/spec/services/resource_access_tokens/create_service_spec.rb + - ee/spec/services/resource_access_tokens/revoke_service_spec.rb + - ee/spec/services/todo_service_spec.rb + - ee/spec/support/shared_examples/graphql/geo/geo_registries_resolver_shared_examples.rb + - ee/spec/support/shared_examples/graphql/mutations/set_multiple_assignees_shared_examples.rb + - ee/spec/support/shared_examples/quick_actions/issue/status_page_quick_actions_shared_examples.rb + - ee/spec/support/shared_examples/services/search_notes_shared_examples.rb + - spec/controllers/confirmations_controller_spec.rb + - spec/controllers/dashboard/projects_controller_spec.rb + - spec/controllers/invites_controller_spec.rb + - spec/controllers/profiles/emails_controller_spec.rb + - spec/controllers/users/terms_controller_spec.rb + - spec/features/cycle_analytics_spec.rb + - spec/features/dashboard/datetime_on_tooltips_spec.rb + - spec/features/dashboard/merge_requests_spec.rb + - spec/features/file_uploads/group_import_spec.rb + - spec/features/file_uploads/project_import_spec.rb + - spec/features/file_uploads/user_avatar_spec.rb + - spec/features/issues/user_sees_breadcrumb_links_spec.rb + - spec/features/markdown/metrics_spec.rb + - spec/features/merge_request/user_creates_merge_request_spec.rb + - spec/features/merge_request/user_posts_notes_spec.rb + - spec/features/operations_sidebar_link_spec.rb + - spec/features/participants_autocomplete_spec.rb + - spec/features/projects/badges/pipeline_badge_spec.rb + - spec/features/projects/branches/user_deletes_branch_spec.rb + - spec/features/projects/commit/cherry_pick_spec.rb + - spec/features/projects/commit/user_comments_on_commit_spec.rb + - spec/features/projects/commit/user_reverts_commit_spec.rb + - spec/features/projects/commit/user_views_user_status_on_commit_spec.rb + - spec/features/projects/confluence/user_views_confluence_page_spec.rb + - spec/features/projects/files/gitlab_ci_syntax_yml_dropdown_spec.rb + - spec/features/projects/issues/design_management/user_views_design_images_spec.rb + - spec/features/projects/labels/user_sees_links_to_issuables_spec.rb + - spec/features/projects/labels/user_views_labels_spec.rb + - spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb + - spec/features/projects/merge_request_button_spec.rb + - spec/features/projects/pages/user_adds_domain_spec.rb + - spec/features/projects/pipelines/pipeline_spec.rb + - spec/features/projects/product_analytics/events_spec.rb + - spec/features/projects/settings/project_settings_spec.rb + - spec/features/projects/settings/repository_settings_spec.rb + - spec/features/projects/snippets/user_views_snippets_spec.rb + - spec/features/projects/user_sees_user_popover_spec.rb + - spec/features/snippets/embedded_snippet_spec.rb + - spec/finders/alert_management/alerts_finder_spec.rb + - spec/finders/ci/commit_statuses_finder_spec.rb + - spec/finders/container_repositories_finder_spec.rb + - spec/finders/deployments_finder_spec.rb + - spec/finders/events_finder_spec.rb + - spec/finders/group_descendants_finder_spec.rb + - spec/finders/groups_finder_spec.rb + - spec/finders/packages/conan/package_file_finder_spec.rb + - spec/finders/packages/go/module_finder_spec.rb + - spec/finders/packages/group_packages_finder_spec.rb + - spec/finders/packages/nuget/package_finder_spec.rb + - spec/finders/packages/package_file_finder_spec.rb + - spec/finders/packages/package_finder_spec.rb + - spec/finders/template_finder_spec.rb + - spec/finders/todos_finder_spec.rb + - spec/finders/user_recent_events_finder_spec.rb + - spec/frontend/fixtures/pipelines.rb + - spec/graphql/features/authorization_spec.rb + - spec/graphql/gitlab_schema_spec.rb + - spec/graphql/mutations/alert_management/alerts/todo/create_spec.rb + - spec/graphql/mutations/alert_management/create_alert_issue_spec.rb + - spec/graphql/mutations/alert_management/http_integration/create_spec.rb + - spec/graphql/mutations/alert_management/http_integration/destroy_spec.rb + - spec/graphql/mutations/alert_management/http_integration/reset_token_spec.rb + - spec/graphql/mutations/alert_management/http_integration/update_spec.rb + - spec/graphql/mutations/alert_management/prometheus_integration/create_spec.rb + - spec/graphql/mutations/alert_management/prometheus_integration/reset_token_spec.rb + - spec/graphql/mutations/alert_management/prometheus_integration/update_spec.rb + - spec/graphql/mutations/alert_management/update_alert_status_spec.rb + - spec/graphql/mutations/boards/lists/update_spec.rb + - spec/graphql/mutations/custom_emoji/create_spec.rb + - spec/graphql/mutations/discussions/toggle_resolve_spec.rb + - spec/graphql/mutations/environments/canary_ingress/update_spec.rb + - spec/graphql/mutations/issues/set_severity_spec.rb + - spec/graphql/mutations/labels/create_spec.rb + - spec/graphql/mutations/notes/reposition_image_diff_note_spec.rb + - spec/graphql/resolvers/admin/analytics/usage_trends/measurements_resolver_spec.rb + - spec/graphql/resolvers/alert_management/alert_status_counts_resolver_spec.rb + - spec/graphql/resolvers/branch_commit_resolver_spec.rb + - spec/graphql/resolvers/design_management/designs_resolver_spec.rb + - spec/graphql/resolvers/design_management/version/designs_at_version_resolver_spec.rb + - spec/graphql/resolvers/group_milestones_resolver_spec.rb + - spec/graphql/resolvers/merge_request_pipelines_resolver_spec.rb + - spec/graphql/resolvers/metrics/dashboards/annotation_resolver_spec.rb + - spec/graphql/resolvers/project_pipeline_resolver_spec.rb + - spec/graphql/resolvers/project_pipelines_resolver_spec.rb + - spec/graphql/resolvers/timelog_resolver_spec.rb + - spec/lib/bulk_imports/groups/loaders/group_loader_spec.rb + - spec/lib/extracts_path_spec.rb + - spec/lib/extracts_ref_spec.rb + - spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb + - spec/lib/gitlab/ci/build/policy/changes_spec.rb + - spec/lib/gitlab/ci/config/external/file/local_spec.rb + - spec/lib/gitlab/ci/config/external/file/project_spec.rb + - spec/lib/gitlab/ci/config/external/file/template_spec.rb + - spec/lib/gitlab/ci/config/external/mapper_spec.rb + - spec/lib/gitlab/ci/config/external/processor_spec.rb + - spec/lib/gitlab/ci/pipeline/chain/build_spec.rb + - spec/lib/gitlab/ci/pipeline/chain/cancel_pending_pipelines_spec.rb + - spec/lib/gitlab/ci/pipeline/chain/template_usage_spec.rb + - spec/lib/gitlab/ci/pipeline/chain/validate/external_spec.rb + - spec/lib/gitlab/ci/pipeline/chain/validate/repository_spec.rb + - spec/lib/gitlab/ci/pipeline/seed/build_spec.rb + - spec/lib/gitlab/ci/pipeline/seed/deployment_spec.rb + - spec/lib/gitlab/ci/pipeline/seed/environment_spec.rb + - spec/lib/gitlab/ci/pipeline/seed/processable/resource_group_spec.rb + - spec/lib/gitlab/ci/reports/test_failure_history_spec.rb + - spec/lib/gitlab/ci/syntax_templates_spec.rb + - spec/lib/gitlab/ci/trace/chunked_io_spec.rb + - spec/lib/gitlab/ci/trace_spec.rb + - spec/lib/gitlab/closing_issue_extractor_spec.rb + - spec/lib/gitlab/composer/cache_spec.rb + - spec/lib/gitlab/data_builder/wiki_page_spec.rb + - spec/lib/gitlab/database/partitioning_migration_helpers/foreign_key_helpers_spec.rb + - spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb + - spec/lib/gitlab/deploy_key_access_spec.rb + - spec/lib/gitlab/email/handler/service_desk_handler_spec.rb + - spec/lib/gitlab/git/lfs_changes_spec.rb + - spec/lib/gitlab/git/merge_base_spec.rb + - spec/lib/gitlab/git/push_spec.rb + - spec/lib/gitlab/git_access_design_spec.rb + - spec/lib/gitlab/git_access_project_spec.rb + - spec/lib/gitlab/git_access_wiki_spec.rb + - spec/lib/gitlab/gitaly_client/operation_service_spec.rb + - spec/lib/gitlab/gl_repository/repo_type_spec.rb + - spec/lib/gitlab/group_search_results_spec.rb + - spec/lib/gitlab/json_cache_spec.rb + - spec/lib/gitlab/language_detection_spec.rb + - spec/lib/gitlab/project_search_results_spec.rb + - spec/lib/gitlab/prometheus/query_variables_spec.rb + - spec/lib/gitlab/reactive_cache_set_cache_spec.rb + - spec/lib/gitlab/reference_extractor_spec.rb + - spec/lib/gitlab/repository_cache_spec.rb + - spec/lib/gitlab/repository_hash_cache_spec.rb + - spec/lib/gitlab/repository_set_cache_spec.rb + - spec/lib/gitlab/repository_size_checker_spec.rb + - spec/lib/gitlab/repository_size_error_message_spec.rb + - spec/lib/gitlab/search_results_spec.rb + - spec/lib/gitlab/shell_spec.rb + - spec/models/abuse_report_spec.rb + - spec/models/alert_management/alert_spec.rb + - spec/models/audit_event_spec.rb + - spec/models/chat_name_spec.rb + - spec/models/chat_team_spec.rb + - spec/models/clusters/kubernetes_namespace_spec.rb + - spec/models/commit_spec.rb + - spec/models/deploy_token_spec.rb + - spec/models/deployment_spec.rb + - spec/models/diff_viewer/server_side_spec.rb + - spec/models/environment_spec.rb + - spec/models/event_collection_spec.rb + - spec/models/label_note_spec.rb + - spec/models/lfs_file_lock_spec.rb + - spec/models/member_spec.rb + - spec/models/merge_request_diff_spec.rb + - spec/models/namespace/root_storage_statistics_spec.rb + - spec/models/note_spec.rb + - spec/models/notification_setting_spec.rb + - spec/models/operations/feature_flag_spec.rb + - spec/models/packages/dependency_spec.rb + - spec/models/packages/go/module_version_spec.rb + - spec/models/packages/package_spec.rb + - spec/models/packages/tag_spec.rb + - spec/models/plan_limits_spec.rb + - spec/models/prometheus_alert_spec.rb + - spec/models/protected_branch/push_access_level_spec.rb + - spec/models/release_spec.rb + - spec/models/releases/evidence_spec.rb + - spec/models/releases/source_spec.rb + - spec/models/repository_spec.rb + - spec/models/service_spec.rb + - spec/models/snippet_repository_spec.rb + - spec/models/snippet_spec.rb + - spec/models/terraform/state_spec.rb + - spec/models/u2f_registration_spec.rb + - spec/models/user_spec.rb + - spec/models/wiki_page/meta_spec.rb + - spec/models/wiki_page_spec.rb + - spec/presenters/alert_management/alert_presenter_spec.rb + - spec/presenters/ci/pipeline_presenter_spec.rb + - spec/presenters/label_presenter_spec.rb + - spec/presenters/packages/composer/packages_presenter_spec.rb + - spec/presenters/packages/conan/package_presenter_spec.rb + - spec/presenters/packages/detail/package_presenter_spec.rb + - spec/presenters/packages/npm/package_presenter_spec.rb + - spec/presenters/packages/nuget/search_results_presenter_spec.rb + - spec/presenters/project_presenter_spec.rb + - spec/presenters/prometheus_alert_presenter_spec.rb + - spec/presenters/release_presenter_spec.rb + - spec/presenters/user_presenter_spec.rb + - spec/requests/api/api_spec.rb + - spec/requests/api/award_emoji_spec.rb + - spec/requests/api/branches_spec.rb + - spec/requests/api/ci/pipelines_spec.rb + - spec/requests/api/composer_packages_spec.rb + - spec/requests/api/deploy_tokens_spec.rb + - spec/requests/api/deployments_spec.rb + - spec/requests/api/error_tracking_spec.rb + - spec/requests/api/feature_flags_spec.rb + - spec/requests/api/freeze_periods_spec.rb + - spec/requests/api/generic_packages_spec.rb + - spec/requests/api/graphql/boards/board_lists_query_spec.rb + - spec/requests/api/graphql/ci/pipelines_spec.rb + - spec/requests/api/graphql/current_user_todos_spec.rb + - spec/requests/api/graphql/group/timelogs_spec.rb + - spec/requests/api/graphql/issue_status_counts_spec.rb + - spec/requests/api/graphql/metrics/dashboard_query_spec.rb + - spec/requests/api/graphql/mutations/admin/sidekiq_queues/delete_jobs_spec.rb + - spec/requests/api/graphql/mutations/alert_management/alerts/set_assignees_spec.rb + - spec/requests/api/graphql/mutations/alert_management/alerts/todo/create_spec.rb + - spec/requests/api/graphql/mutations/alert_management/alerts/update_alert_status_spec.rb + - spec/requests/api/graphql/mutations/alert_management/http_integration/create_spec.rb + - spec/requests/api/graphql/mutations/alert_management/prometheus_integration/create_spec.rb + - spec/requests/api/graphql/mutations/award_emojis/add_spec.rb + - spec/requests/api/graphql/mutations/award_emojis/toggle_spec.rb + - spec/requests/api/graphql/mutations/boards/create_spec.rb + - spec/requests/api/graphql/mutations/boards/destroy_spec.rb + - spec/requests/api/graphql/mutations/boards/lists/destroy_spec.rb + - spec/requests/api/graphql/mutations/boards/lists/update_spec.rb + - spec/requests/api/graphql/mutations/branches/create_spec.rb + - spec/requests/api/graphql/mutations/ci/ci_cd_settings_update_spec.rb + - spec/requests/api/graphql/mutations/commits/create_spec.rb + - spec/requests/api/graphql/mutations/container_expiration_policy/update_spec.rb + - spec/requests/api/graphql/mutations/discussions/toggle_resolve_spec.rb + - spec/requests/api/graphql/mutations/environments/canary_ingress/update_spec.rb + - spec/requests/api/graphql/mutations/issues/set_locked_spec.rb + - spec/requests/api/graphql/mutations/issues/set_severity_spec.rb + - spec/requests/api/graphql/mutations/issues/update_spec.rb + - spec/requests/api/graphql/mutations/jira_import/import_users_spec.rb + - spec/requests/api/graphql/mutations/jira_import/start_spec.rb + - spec/requests/api/graphql/mutations/labels/create_spec.rb + - spec/requests/api/graphql/mutations/merge_requests/accept_spec.rb + - spec/requests/api/graphql/mutations/merge_requests/create_spec.rb + - spec/requests/api/graphql/mutations/metrics/dashboard/annotations/create_spec.rb + - spec/requests/api/graphql/mutations/namespace/package_settings/update_spec.rb + - spec/requests/api/graphql/mutations/notes/create/diff_note_spec.rb + - spec/requests/api/graphql/mutations/notes/create/image_diff_note_spec.rb + - spec/requests/api/graphql/mutations/notes/create/note_spec.rb + - spec/requests/api/graphql/mutations/notes/reposition_image_diff_note_spec.rb + - spec/requests/api/graphql/mutations/notes/update/image_diff_note_spec.rb + - spec/requests/api/graphql/mutations/snippets/mark_as_spam_spec.rb + - spec/requests/api/graphql/mutations/snippets/update_spec.rb + - spec/requests/api/graphql/mutations/user_callouts/create_spec.rb + - spec/requests/api/graphql/namespace/package_settings_spec.rb + - spec/requests/api/graphql/project/alert_management/alert/issue_spec.rb + - spec/requests/api/graphql/project/alert_management/alert_status_counts_spec.rb + - spec/requests/api/graphql/project/error_tracking/sentry_detailed_error_request_spec.rb + - spec/requests/api/graphql/project/error_tracking/sentry_errors_request_spec.rb + - spec/requests/api/graphql/project/issue/designs/designs_spec.rb + - spec/requests/api/graphql/project/project_pipeline_statistics_spec.rb + - spec/requests/api/graphql/project_query_spec.rb + - spec/requests/api/graphql/query_spec.rb + - spec/requests/api/graphql/user/starred_projects_query_spec.rb + - spec/requests/api/graphql/user_query_spec.rb + - spec/requests/api/graphql_spec.rb + - spec/requests/api/group_import_spec.rb + - spec/requests/api/group_milestones_spec.rb + - spec/requests/api/group_packages_spec.rb + - spec/requests/api/groups_spec.rb + - spec/requests/api/helpers_spec.rb + - spec/requests/api/import_bitbucket_server_spec.rb + - spec/requests/api/internal/base_spec.rb + - spec/requests/api/lint_spec.rb + - spec/requests/api/markdown_spec.rb + - spec/requests/api/merge_requests_spec.rb + - spec/requests/api/metrics/dashboard/annotations_spec.rb + - spec/requests/api/metrics/user_starred_dashboards_spec.rb + - spec/requests/api/nuget_project_packages_spec.rb + - spec/requests/api/project_clusters_spec.rb + - spec/requests/api/project_container_repositories_spec.rb + - spec/requests/api/project_milestones_spec.rb + - spec/requests/api/project_packages_spec.rb + - spec/requests/api/pypi_packages_spec.rb + - spec/requests/api/rubygem_packages_spec.rb + - spec/requests/api/unleash_spec.rb + - spec/requests/api/users_spec.rb + - spec/requests/groups/email_campaigns_controller_spec.rb + - spec/requests/import/gitlab_groups_controller_spec.rb + - spec/requests/jwt_controller_spec.rb + - spec/requests/lfs_http_spec.rb + - spec/requests/product_analytics/collector_app_spec.rb + - spec/requests/rack_attack_global_spec.rb + - spec/services/admin/propagate_service_template_spec.rb + - spec/services/alert_management/create_alert_issue_service_spec.rb + - spec/services/audit_event_service_spec.rb + - spec/services/auth/dependency_proxy_authentication_service_spec.rb + - spec/services/auto_merge_service_spec.rb + - spec/services/bulk_create_integration_service_spec.rb + - spec/services/ci/change_variable_service_spec.rb + - spec/services/ci/change_variables_service_spec.rb + - spec/services/ci/create_pipeline_service/cross_project_pipeline_spec.rb + - spec/services/ci/create_pipeline_service/custom_config_content_spec.rb + - spec/services/ci/create_pipeline_service/dry_run_spec.rb + - spec/services/ci/create_pipeline_service/environment_spec.rb + - spec/services/ci/create_pipeline_service/parameter_content_spec.rb + - spec/services/ci/create_pipeline_service/parent_child_pipeline_spec.rb + - spec/services/ci/create_pipeline_service_spec.rb + - spec/services/ci/create_web_ide_terminal_service_spec.rb + - spec/services/ci/expire_pipeline_cache_service_spec.rb + - spec/services/ci/external_pull_requests/create_pipeline_service_spec.rb + - spec/services/ci/find_exposed_artifacts_service_spec.rb + - spec/services/ci/job_artifacts/create_service_spec.rb + - spec/services/ci/parse_dotenv_artifact_service_spec.rb + - spec/services/ci/pipeline_bridge_status_service_spec.rb + - spec/services/ci/pipeline_trigger_service_spec.rb + - spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb + - spec/services/ci/register_job_service_spec.rb + - spec/services/ci/resource_groups/assign_resource_from_resource_group_service_spec.rb + - spec/services/ci/retry_build_service_spec.rb + - spec/services/ci/stop_environments_service_spec.rb + - spec/services/clusters/applications/prometheus_health_check_service_spec.rb + - spec/services/container_expiration_policy_service_spec.rb + - spec/services/dependency_proxy/find_or_create_manifest_service_spec.rb + - spec/services/discussions/resolve_service_spec.rb + - spec/services/discussions/unresolve_service_spec.rb + - spec/services/feature_flags/create_service_spec.rb + - spec/services/feature_flags/destroy_service_spec.rb + - spec/services/feature_flags/disable_service_spec.rb + - spec/services/feature_flags/enable_service_spec.rb + - spec/services/feature_flags/update_service_spec.rb + - spec/services/git/branch_push_service_spec.rb + - spec/services/import/bitbucket_server_service_spec.rb + - spec/services/incident_management/incidents/create_service_spec.rb + - spec/services/incident_management/pager_duty/create_incident_issue_service_spec.rb + - spec/services/incident_management/pager_duty/process_webhook_service_spec.rb + - spec/services/integrations/test/project_service_spec.rb + - spec/services/issuable/bulk_update_service_spec.rb + - spec/services/jira_connect/sync_service_spec.rb + - spec/services/jira_import/start_import_service_spec.rb + - spec/services/jira_import/users_importer_spec.rb + - spec/services/markdown_content_rewriter_service_spec.rb + - spec/services/members/create_service_spec.rb + - spec/services/members/invite_service_spec.rb + - spec/services/metrics/dashboard/annotations/create_service_spec.rb + - spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb + - spec/services/metrics/users_starred_dashboards/create_service_spec.rb + - spec/services/notes/copy_service_spec.rb + - spec/services/notes/create_service_spec.rb + - spec/services/notes/destroy_service_spec.rb + - spec/services/notes/quick_actions_service_spec.rb + - spec/services/notes/update_service_spec.rb + - spec/services/notification_service_spec.rb + - spec/services/packages/composer/create_package_service_spec.rb + - spec/services/packages/conan/search_service_spec.rb + - spec/services/packages/create_package_file_service_spec.rb + - spec/services/packages/debian/find_or_create_package_service_spec.rb + - spec/services/packages/generic/create_package_file_service_spec.rb + - spec/services/packages/maven/find_or_create_package_service_spec.rb + - spec/services/packages/nuget/search_service_spec.rb + - spec/services/packages/rubygems/dependency_resolver_service_spec.rb + - spec/services/pod_logs/base_service_spec.rb + - spec/services/pod_logs/elasticsearch_service_spec.rb + - spec/services/pod_logs/kubernetes_service_spec.rb + - spec/services/projects/alerting/notify_service_spec.rb + - spec/services/projects/create_service_spec.rb + - spec/services/projects/destroy_rollback_service_spec.rb + - spec/services/projects/destroy_service_spec.rb + - spec/services/projects/gitlab_projects_import_service_spec.rb + - spec/services/projects/group_links/create_service_spec.rb + - spec/services/projects/group_links/destroy_service_spec.rb + - spec/services/projects/group_links/update_service_spec.rb + - spec/services/projects/prometheus/alerts/notify_service_spec.rb + - spec/services/projects/transfer_service_spec.rb + - spec/services/projects/update_pages_service_spec.rb + - spec/services/prometheus/create_default_alerts_service_spec.rb + - spec/services/quick_actions/interpret_service_spec.rb + - spec/services/releases/create_evidence_service_spec.rb + - spec/services/repositories/destroy_rollback_service_spec.rb + - spec/services/repositories/destroy_service_spec.rb + - spec/services/repositories/shell_destroy_service_spec.rb + - spec/services/resource_access_tokens/create_service_spec.rb + - spec/services/resource_access_tokens/revoke_service_spec.rb + - spec/services/resource_events/change_labels_service_spec.rb + - spec/services/resource_events/merge_into_notes_service_spec.rb + - spec/services/security/ci_configuration/sast_create_service_spec.rb + - spec/services/snippets/bulk_destroy_service_spec.rb + - spec/services/snippets/create_service_spec.rb + - spec/services/snippets/update_service_spec.rb + - spec/services/spam/ham_service_spec.rb + - spec/services/spam/spam_action_service_spec.rb + - spec/services/spam/spam_verdict_service_spec.rb + - spec/services/system_note_service_spec.rb + - spec/services/system_notes/issuables_service_spec.rb + - spec/services/test_hooks/project_service_spec.rb + - spec/services/test_hooks/system_service_spec.rb + - spec/services/users/approve_service_spec.rb + - spec/services/users/reject_service_spec.rb + - spec/services/users/validate_otp_service_spec.rb + - spec/services/wiki_pages/event_create_service_spec.rb + - spec/support/shared_examples/graphql/design_fields_shared_examples.rb + - spec/support/shared_examples/graphql/mutations/set_assignees_shared_examples.rb + - spec/support/shared_examples/models/slack_mattermost_notifications_shared_examples.rb + - spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb + - spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb + - spec/support/shared_examples/services/packages_shared_examples.rb + - spec/tasks/gitlab/db_rake_spec.rb + - spec/tasks/gitlab/packages/composer_rake_spec.rb + - spec/tasks/gitlab/snippets_rake_spec.rb + - spec/uploaders/content_type_whitelist_spec.rb + - spec/uploaders/dependency_proxy/file_uploader_spec.rb + - spec/views/admin/application_settings/_eks.html.haml_spec.rb + - spec/views/admin/application_settings/_package_registry.html.haml_spec.rb + - spec/views/layouts/nav/sidebar/_project_security_link.html.haml_spec.rb + - spec/views/projects/pipelines/new.html.haml_spec.rb + - spec/views/projects/pipelines/show.html.haml_spec.rb + - spec/views/search/_results.html.haml_spec.rb + - spec/views/shared/_label_row.html.haml_spec.rb + - spec/views/shared/milestones/_top.html.haml_spec.rb + - spec/workers/ci/create_cross_project_pipeline_worker_spec.rb + - spec/workers/cluster_update_app_worker_spec.rb + - spec/workers/environments/canary_ingress/update_worker_spec.rb + - spec/workers/expire_job_cache_worker_spec.rb + - spec/workers/gitlab/jira_import/import_issue_worker_spec.rb + - spec/workers/gitlab/jira_import/stage/start_import_worker_spec.rb + - spec/workers/gitlab/jira_import/stuck_jira_import_jobs_worker_spec.rb + - spec/workers/import_issues_csv_worker_spec.rb + - spec/workers/incident_management/add_severity_system_note_worker_spec.rb + - spec/workers/incident_management/process_alert_worker_spec.rb + - spec/workers/incident_management/process_prometheus_alert_worker_spec.rb + - spec/workers/jira_connect/sync_project_worker_spec.rb + - spec/workers/namespaces/onboarding_issue_created_worker_spec.rb + - spec/workers/packages/composer/cache_update_worker_spec.rb + - spec/workers/pages_domain_ssl_renewal_cron_worker_spec.rb + - spec/workers/projects/git_garbage_collect_worker_spec.rb + - spec/workers/prometheus/create_default_alerts_worker_spec.rb + - spec/workers/propagate_integration_group_worker_spec.rb + - spec/workers/propagate_integration_project_worker_spec.rb + - spec/workers/run_pipeline_schedule_worker_spec.rb + - spec/workers/update_external_pull_requests_worker_spec.rb + RSpec/TimecopFreeze: Exclude: - 'ee/spec/controllers/admin/application_settings_controller_spec.rb' @@ -756,7 +1199,6 @@ RSpec/AnyInstanceOf: - 'ee/spec/migrations/update_vulnerability_severity_column_spec.rb' - 'ee/spec/models/ee/namespace_spec.rb' - 'ee/spec/models/geo_node_status_spec.rb' - - 'ee/spec/models/group_spec.rb' - 'ee/spec/models/issue_spec.rb' - 'ee/spec/models/merge_request_spec.rb' - 'ee/spec/models/project_import_state_spec.rb' @@ -892,8 +1334,8 @@ RSpec/AnyInstanceOf: - 'spec/lib/backup/files_spec.rb' - 'spec/lib/backup/manager_spec.rb' - 'spec/lib/banzai/commit_renderer_spec.rb' - - 'spec/lib/banzai/filter/external_issue_reference_filter_spec.rb' - - 'spec/lib/banzai/filter/issue_reference_filter_spec.rb' + - 'spec/lib/banzai/filter/references/external_issue_reference_filter_spec.rb' + - 'spec/lib/banzai/filter/references/issue_reference_filter_spec.rb' - 'spec/lib/banzai/filter/repository_link_filter_spec.rb' - 'spec/lib/banzai/pipeline/gfm_pipeline_spec.rb' - 'spec/lib/extracts_ref_spec.rb' @@ -1249,6 +1691,7 @@ Gitlab/NamespacedClass: - 'app/finders/deployments_finder.rb' - 'app/finders/environment_names_finder.rb' - 'app/finders/environments_finder.rb' + - 'app/finders/environments_by_deployments_finder.rb' - 'app/finders/events_finder.rb' - 'app/finders/feature_flags_finder.rb' - 'app/finders/feature_flags_user_lists_finder.rb' @@ -1320,7 +1763,6 @@ Gitlab/NamespacedClass: - 'app/models/application_setting/term.rb' - 'app/models/approval.rb' - 'app/models/audit_event.rb' - - 'app/models/audit_event_archived.rb' - 'app/models/authentication_event.rb' - 'app/models/award_emoji.rb' - 'app/models/badge.rb' @@ -1673,6 +2115,7 @@ Gitlab/NamespacedClass: - 'app/policies/service_policy.rb' - 'app/policies/suggestion_policy.rb' - 'app/policies/timebox_policy.rb' + - 'app/policies/timelog_policy.rb' - 'app/policies/todo_policy.rb' - 'app/policies/user_policy.rb' - 'app/policies/wiki_page_policy.rb' @@ -2275,7 +2718,6 @@ Gitlab/NamespacedClass: - 'ee/app/policies/iteration_policy.rb' - 'ee/app/policies/push_rule_policy.rb' - 'ee/app/policies/saml_provider_policy.rb' - - 'ee/app/policies/timelog_policy.rb' - 'ee/app/policies/vulnerability_policy.rb' - 'ee/app/presenters/approval_rule_presenter.rb' - 'ee/app/presenters/audit_event_presenter.rb' @@ -2451,59 +2893,404 @@ Gitlab/NamespacedClass: - 'spec/tasks/gitlab/task_helpers_spec.rb' - 'spec/uploaders/object_storage_spec.rb' -# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/322739 -Style/HashTransformation: +Style/ClassEqualityComparison: Exclude: - - 'app/controllers/projects/branches_controller.rb' - - 'app/finders/ci/commit_statuses_finder.rb' - - 'app/helpers/learn_gitlab_helper.rb' - - 'app/models/ci/build_trace_chunk.rb' - - 'app/models/concerns/cache_markdown_field.rb' - - 'app/models/gpg_key.rb' - - 'app/presenters/packages/npm/package_presenter.rb' - - 'app/services/ci/pipeline_processing/atomic_processing_service/status_collection.rb' - - 'app/services/ci/retry_build_service.rb' - - 'app/services/packages/nuget/create_dependency_service.rb' + - spec/lib/peek/views/active_record_spec.rb + - ee/spec/lib/peek/views/active_record_spec.rb + +# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/207950 +Cop/UserAdmin: + Exclude: + - 'app/controllers/admin/impersonations_controller.rb' + - 'app/controllers/concerns/spammable_actions.rb' + - 'app/controllers/sessions_controller.rb' + - 'app/finders/autocomplete/routes_finder.rb' + - 'app/finders/ci/jobs_finder.rb' + - 'app/finders/ci/runners_finder.rb' + - 'app/finders/personal_access_tokens_finder.rb' + - 'app/finders/users_finder.rb' + - 'app/graphql/mutations/admin/sidekiq_queues/delete_jobs.rb' + - 'app/graphql/resolvers/admin/analytics/usage_trends/measurements_resolver.rb' + - 'app/helpers/application_helper.rb' + - 'app/helpers/import_helper.rb' + - 'app/helpers/nav_helper.rb' + - 'app/helpers/projects_helper.rb' + - 'app/helpers/search_helper.rb' + - 'app/helpers/user_callouts_helper.rb' + - 'app/helpers/users_helper.rb' + - 'app/helpers/visibility_level_helper.rb' + - 'app/models/concerns/protected_ref_access.rb' + - 'app/models/concerns/spammable.rb' + - 'app/models/issue_collection.rb' + - 'app/models/merge_requests_closing_issues.rb' + - 'app/models/protected_branch.rb' + - 'app/models/user.rb' + - 'app/policies/note_policy.rb' + - 'app/serializers/deploy_key_entity.rb' + - 'app/services/auth/container_registry_authentication_service.rb' + - 'app/services/emails/create_service.rb' + - 'app/services/projects/enable_deploy_key_service.rb' + - 'app/services/projects/fork_service.rb' + - 'app/services/users/build_service.rb' + - 'ee/app/controllers/ee/projects_controller.rb' + - 'ee/app/graphql/mutations/admin/analytics/devops_adoption/segments/mixins.rb' + - 'ee/app/graphql/resolvers/admin/analytics/devops_adoption/segments_resolver.rb' + - 'ee/app/helpers/ee/dashboard_helper.rb' + - 'ee/app/helpers/ee/import_helper.rb' + - 'ee/app/helpers/ee/subscribable_banner_helper.rb' + - 'ee/app/helpers/ee/user_callouts_helper.rb' + - 'ee/app/helpers/license_monitoring_helper.rb' + - 'ee/app/helpers/push_rules_helper.rb' + - 'ee/app/models/concerns/ee/protected_ref_access.rb' + - 'ee/app/models/ee/user.rb' + - 'ee/app/models/protected_environment/deploy_access_level.rb' + - 'ee/app/policies/ee/group_policy.rb' + - 'ee/app/policies/ee/project_policy.rb' + - 'ee/app/services/ee/groups/create_service.rb' + - 'ee/app/services/ee/groups/update_service.rb' + - 'ee/app/services/ee/projects/update_service.rb' + - 'ee/lib/ee/api/helpers.rb' + - 'ee/lib/ee/gitlab/git_access.rb' + - 'lib/api/award_emoji.rb' + - 'lib/api/ci/runners.rb' + - 'lib/api/entities/runner_details.rb' + - 'lib/api/entities/user_safe.rb' + - 'lib/api/groups.rb' + - 'lib/api/helpers.rb' + - 'lib/api/personal_access_tokens.rb' + - 'lib/api/users.rb' + - 'lib/api/v3/github.rb' + - 'lib/constraints/admin_constrainer.rb' + - 'lib/gitlab/auth.rb' + - 'lib/gitlab/background_migration/user_mentions/models/group.rb' + - 'lib/gitlab/ci/runner_instructions.rb' + - 'lib/gitlab/import_export/members_mapper.rb' + - 'lib/gitlab/performance_bar.rb' + - 'lib/gitlab/visibility_level.rb' + - 'qa/qa/runtime/api/client.rb' + +# WIP https://gitlab.com/gitlab-org/gitlab/-/issues/325744 +Performance/OpenStruct: + Exclude: + - 'Guardfile' + - 'app/finders/snippets_finder.rb' + - 'app/helpers/application_settings_helper.rb' + - 'app/models/cycle_analytics/project_level_stage_adapter.rb' + - 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb' + - 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb' + - 'lib/api/wikis.rb' + - 'lib/gitlab/ci/ansi2html.rb' + - 'lib/gitlab/ci/reports/test_suite_comparer.rb' + - 'lib/gitlab/git/diff_collection.rb' + - 'lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb' + - 'lib/gitlab/testing/request_inspector_middleware.rb' + - 'lib/mattermost/session.rb' + +# WIP: https://gitlab.com/gitlab-org/gitlab/-/issues/324629 +Gitlab/DelegatePredicateMethods: + Exclude: + - 'app/models/clusters/cluster.rb' + - 'app/models/clusters/platforms/kubernetes.rb' + - 'app/models/concerns/ci/metadatable.rb' + - 'app/models/concerns/diff_positionable_note.rb' + - 'app/models/concerns/resolvable_discussion.rb' + - 'app/models/concerns/services/data_fields.rb' + - 'app/models/project.rb' + - 'ee/app/models/concerns/ee/ci/metadatable.rb' + - 'ee/app/models/ee/group.rb' + - 'ee/app/models/ee/namespace.rb' + - 'ee/app/models/license.rb' + - 'lib/gitlab/ci/trace/stream.rb' + +# Offense count: 298 +Gitlab/FeatureAvailableUsage: + Exclude: + - 'app/controllers/projects/application_controller.rb' + - 'app/graphql/types/project_type.rb' + - 'app/helpers/events_helper.rb' + - 'app/helpers/labels_helper.rb' + - 'app/policies/project_policy.rb' + - 'app/views/groups/issues.html.haml' + - 'app/views/groups/merge_requests.html.haml' + - 'app/views/shared/boards/_switcher.html.haml' + - 'ee/app/controllers/concerns/description_diff_actions.rb' + - 'ee/app/controllers/concerns/ee/boards_actions.rb' + - 'ee/app/controllers/concerns/security_dashboards_permissions.rb' + - 'ee/app/controllers/ee/boards/lists_controller.rb' + - 'ee/app/controllers/ee/groups/application_controller.rb' + - 'ee/app/controllers/ee/groups/group_members_controller.rb' + - 'ee/app/controllers/ee/projects/autocomplete_sources_controller.rb' + - 'ee/app/controllers/ee/projects/issues_controller.rb' + - 'ee/app/controllers/ee/projects/security/configuration_controller.rb' + - 'ee/app/controllers/ee/projects/settings/ci_cd_controller.rb' + - 'ee/app/controllers/ee/projects/settings/operations_controller.rb' + - 'ee/app/controllers/ee/projects/settings/repository_controller.rb' + - 'ee/app/controllers/groups/analytics/application_controller.rb' + - 'ee/app/controllers/groups/audit_events_controller.rb' + - 'ee/app/controllers/groups/bulk_update_controller.rb' + - 'ee/app/controllers/groups/contribution_analytics_controller.rb' + - 'ee/app/controllers/groups/epics_controller.rb' + - 'ee/app/controllers/groups/hooks_controller.rb' + - 'ee/app/controllers/groups/issues_analytics_controller.rb' + - 'ee/app/controllers/groups/iterations_controller.rb' + - 'ee/app/controllers/projects/analytics/issues_analytics_controller.rb' + - 'ee/app/controllers/projects/audit_events_controller.rb' + - 'ee/app/controllers/projects/cluster_agents_controller.rb' + - 'ee/app/controllers/projects/iterations/inherited_controller.rb' + - 'ee/app/controllers/projects/iterations_controller.rb' + - 'ee/app/controllers/projects/path_locks_controller.rb' + - 'ee/app/controllers/projects/subscriptions_controller.rb' + - 'ee/app/finders/autocomplete/vulnerabilities_autocomplete_finder.rb' + - 'ee/app/finders/clusters/agents_finder.rb' + - 'ee/app/finders/ee/alert_management/alerts_finder.rb' + - 'ee/app/finders/ee/alert_management/http_integrations_finder.rb' + - 'ee/app/finders/ee/group_projects_finder.rb' + - 'ee/app/graphql/ee/types/group_type.rb' + - 'ee/app/graphql/mutations/dast/profiles/create.rb' + - 'ee/app/graphql/mutations/dast/profiles/run.rb' + - 'ee/app/graphql/mutations/dast/profiles/update.rb' + - 'ee/app/graphql/mutations/instance_security_dashboard/remove_project.rb' + - 'ee/app/graphql/resolvers/boards/epic_boards_resolver.rb' + - 'ee/app/graphql/resolvers/clusters/agent_tokens_resolver.rb' + - 'ee/app/graphql/resolvers/epics_resolver.rb' + - 'ee/app/helpers/ee/analytics/navbar_helper.rb' + - 'ee/app/helpers/ee/application_helper.rb' + - 'ee/app/helpers/ee/boards_helper.rb' + - 'ee/app/helpers/ee/clusters_helper.rb' + - 'ee/app/helpers/ee/dashboard_helper.rb' + - 'ee/app/helpers/ee/form_helper.rb' + - 'ee/app/helpers/ee/graph_helper.rb' + - 'ee/app/helpers/ee/groups_helper.rb' + - 'ee/app/helpers/ee/issues_helper.rb' + - 'ee/app/helpers/ee/lock_helper.rb' + - 'ee/app/helpers/ee/operations_helper.rb' + - 'ee/app/helpers/ee/projects/incidents_helper.rb' + - 'ee/app/helpers/ee/projects_helper.rb' + - 'ee/app/helpers/ee/releases_helper.rb' + - 'ee/app/helpers/ee/search_helper.rb' + - 'ee/app/helpers/ee/tree_helper.rb' + - 'ee/app/helpers/groups/security_features_helper.rb' + - 'ee/app/models/approval_state.rb' + - 'ee/app/models/concerns/approvable.rb' + - 'ee/app/models/concerns/ee/project_security_scanners_information.rb' + - 'ee/app/models/concerns/ee/protected_ref_access.rb' + - 'ee/app/models/concerns/has_timelogs_report.rb' + - 'ee/app/models/concerns/insights_feature.rb' + - 'ee/app/models/ee/board.rb' - 'ee/app/models/ee/ci/build.rb' - - 'ee/app/models/productivity_analytics.rb' - - 'ee/app/models/sca/license_compliance.rb' - - 'ee/app/services/security/store_report_service.rb' - - 'ee/lib/ee/gitlab/auth/ldap/sync/group.rb' - - 'ee/lib/ee/gitlab/usage_data.rb' - - 'ee/lib/gitlab/custom_file_templates.rb' - - 'ee/spec/elastic_integration/global_search_spec.rb' - - 'ee/spec/lib/ee/gitlab/application_context_spec.rb' - - 'lib/api/helpers/packages/conan/api_helpers.rb' - - 'lib/api/projects.rb' - - 'lib/atlassian/jira_connect/client.rb' - - 'lib/banzai/filter/repository_link_filter.rb' - - 'lib/gitlab/ci/config/entry/product/variables.rb' - - 'lib/gitlab/ci/config/entry/variables.rb' - - 'lib/gitlab/ci/variables/collection.rb' - - 'lib/gitlab/ci/variables/helpers.rb' - - 'lib/gitlab/git/commit.rb' - - 'lib/gitlab/import_sources.rb' - - 'lib/gitlab/language_detection.rb' - - 'lib/gitlab/metrics/samplers/database_sampler.rb' - - 'lib/gitlab/metrics/subscribers/active_record.rb' - - 'lib/gitlab/phabricator_import/project_creator.rb' - - 'lib/gitlab/prometheus_client.rb' - - 'lib/gitlab/repository_hash_cache.rb' - - 'lib/gitlab/static_site_editor/config/file_config.rb' - - 'lib/gitlab/template/base_template.rb' - - 'lib/gitlab/usage_data_counters/base_counter.rb' - - 'lib/gitlab/usage_data_counters/note_counter.rb' - - 'spec/lib/atlassian/jira_connect/serializers/pull_request_entity_spec.rb' - - 'spec/lib/gitlab/ci/status/composite_spec.rb' - - 'spec/lib/gitlab/conflict/file_spec.rb' - - 'spec/lib/gitlab/import_export/project/tree_restorer_spec.rb' + - 'ee/app/models/ee/ci/build_dependencies.rb' + - 'ee/app/models/ee/ci/pipeline.rb' + - 'ee/app/models/ee/group.rb' + - 'ee/app/models/ee/group_member.rb' + - 'ee/app/models/ee/issue.rb' + - 'ee/app/models/ee/list.rb' + - 'ee/app/models/ee/merge_request.rb' + - 'ee/app/models/ee/milestone_release.rb' + - 'ee/app/models/ee/namespace.rb' + - 'ee/app/models/ee/namespace_setting.rb' + - 'ee/app/models/ee/project.rb' + - 'ee/app/models/ee/project_ci_cd_setting.rb' + - 'ee/app/models/namespace_statistics.rb' + - 'ee/app/models/project_security_setting.rb' + - 'ee/app/models/saml_provider.rb' + - 'ee/app/policies/compliance_management/framework_policy.rb' + - 'ee/app/policies/compliance_management/framework_policy.rb' + - 'ee/app/policies/ee/group_policy.rb' + - 'ee/app/policies/ee/namespace_policy.rb' + - 'ee/app/policies/ee/project_policy.rb' + - 'ee/app/policies/ee/protected_branch_policy.rb' + - 'ee/app/presenters/ee/label_presenter.rb' + - 'ee/app/presenters/epic_presenter.rb' + - 'ee/app/presenters/merge_request_approver_presenter.rb' + - 'ee/app/serializers/dashboard_operations_project_entity.rb' + - 'ee/app/serializers/ee/environment_entity.rb' + - 'ee/app/serializers/ee/evidences/release_entity.rb' + - 'ee/app/serializers/ee/note_entity.rb' + - 'ee/app/services/boards/epic_boards/update_service.rb' + - 'ee/app/services/ci/audit_variable_change_service.rb' + - 'ee/app/services/clusters/agent_tokens/create_service.rb' + - 'ee/app/services/clusters/agents/create_service.rb' + - 'ee/app/services/dashboard/projects/create_service.rb' + - 'ee/app/services/dashboard/projects/list_service.rb' + - 'ee/app/services/dast/profiles/create_service.rb' + - 'ee/app/services/dast/profiles/update_service.rb' + - 'ee/app/services/dast_on_demand_scans/create_service.rb' + - 'ee/app/services/dast_site_tokens/create_service.rb' + - 'ee/app/services/dast_site_validations/create_service.rb' + - 'ee/app/services/dast_site_validations/revoke_service.rb' + - 'ee/app/services/dast_site_validations/validate_service.rb' + - 'ee/app/services/ee/alert_management/http_integrations/create_service.rb' + - 'ee/app/services/ee/audit_event_service.rb' + - 'ee/app/services/ee/boards/issues/list_service.rb' + - 'ee/app/services/ee/boards/lists/create_service.rb' + - 'ee/app/services/ee/boards/update_service.rb' + - 'ee/app/services/ee/groups/create_service.rb' + - 'ee/app/services/ee/ide/schemas_config_service.rb' + - 'ee/app/services/ee/issuable_base_service.rb' + - 'ee/app/services/ee/issue_links/create_service.rb' + - 'ee/app/services/ee/issues/build_service.rb' + - 'ee/app/services/ee/lfs/lock_file_service.rb' + - 'ee/app/services/ee/lfs/unlock_file_service.rb' + - 'ee/app/services/ee/merge_requests/approval_service.rb' + - 'ee/app/services/ee/merge_requests/build_service.rb' + - 'ee/app/services/ee/merge_requests/merge_base_service.rb' + - 'ee/app/services/ee/merge_requests/refresh_service.rb' + - 'ee/app/services/ee/merge_requests/update_service.rb' + - 'ee/app/services/ee/projects/create_service.rb' + - 'ee/app/services/ee/protected_branches/create_service.rb' + - 'ee/app/services/ee/releases/create_evidence_service.rb' + - 'ee/app/services/ee/search/group_service.rb' + - 'ee/app/services/iterations/cadences/create_service.rb' + - 'ee/app/services/iterations/cadences/update_service.rb' + - 'ee/app/services/iterations/create_service.rb' + - 'ee/app/services/iterations/update_service.rb' + - 'ee/app/services/merge_requests/sync_report_approver_approval_rules.rb' + - 'ee/app/services/merge_requests/update_blocks_service.rb' + - 'ee/app/services/projects/mark_for_deletion_service.rb' + - 'ee/app/services/quality_management/test_cases/create_service.rb' + - 'ee/app/services/requirements_management/process_test_reports_service.rb' + - 'ee/app/services/security/store_scans_service.rb' + - 'ee/app/views/groups/_templates_setting.html.haml' + - 'ee/app/views/groups/contribution_analytics/show.html.haml' + - 'ee/app/views/groups/ee/_settings_nav.html.haml' + - 'ee/app/views/groups/epics/index.html.haml' + - 'ee/app/views/groups/epics/show.html.haml' + - 'ee/app/views/groups/epics/show.html.haml' + - 'ee/app/views/groups/hooks/index.html.haml' + - 'ee/app/views/groups/roadmap/show.html.haml' + - 'ee/app/views/groups/settings/_allowed_email_domain.html.haml' + - 'ee/app/views/groups/settings/_ip_restriction.html.haml' + - 'ee/app/views/layouts/nav/_test_cases_link.html.haml' + - 'ee/app/views/layouts/nav/sidebar/_project_iterations_link.html.haml' + - 'ee/app/views/projects/_merge_request_approvals_settings.html.haml' + - 'ee/app/views/projects/_merge_request_settings.html.haml' + - 'ee/app/views/projects/_merge_request_settings_description_text.html.haml' + - 'ee/app/views/projects/audit_events/index.html.haml' + - 'ee/app/views/projects/blob/_header_file_locks.html.haml' + - 'ee/app/views/projects/issues/_related_issues.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/merge_requests/show.html.haml' + - 'ee/app/views/projects/pipelines/_tabs_content.html.haml' + - 'ee/app/views/projects/protected_branches/ee/_code_owner_approval_form.html.haml' + - 'ee/app/views/projects/protected_branches/ee/_code_owner_approval_table.html.haml' + - 'ee/app/views/projects/protected_branches/ee/_code_owner_approval_table_head.html.haml' + - 'ee/app/views/projects/push_rules/_index.html.haml' + - 'ee/app/views/projects/settings/_default_issue_template.html.haml' + - 'ee/app/views/projects/settings/_marked_for_removal.html.haml' + - 'ee/app/views/projects/settings/_restore.html.haml' + - 'ee/app/views/projects/settings/ci_cd/_auto_rollback.html.haml' + - 'ee/app/views/projects/settings/ci_cd/_pipeline_subscriptions.html.haml' + - 'ee/app/views/projects/settings/operations/_status_page.html.haml' + - 'ee/app/views/projects/settings/repository/_protected_branches.html.haml' + - 'ee/app/views/projects/sidebar/_repository_locked_files.html.haml' + - 'ee/app/views/shared/issuable/_board_create_list_dropdown.html.haml' + - 'ee/app/views/shared/issuable/_board_create_list_dropdown.html.haml' + - 'ee/app/views/shared/issuable/_group_bulk_update_sidebar.html.haml' + - 'ee/app/views/shared/issuable/_iteration_select.html.haml' + - 'ee/app/views/shared/issuable/form/_default_templates.html.haml' + - 'ee/app/views/shared/labels/_create_label_help_text.html.haml' + - 'ee/app/views/shared/promotions/_promote_mr_features.html.haml' + - 'ee/app/views/shared/promotions/_promote_mr_features.html.haml' + - 'ee/app/views/shared/promotions/_promote_repository_features.html.haml' + - 'ee/app/views/shared/promotions/_promote_repository_features.html.haml' + - 'ee/app/views/shared/promotions/_promote_repository_features.html.haml' + - 'ee/app/views/shared/promotions/_promote_repository_features.html.haml' + - 'ee/app/views/shared/promotions/_promote_repository_features.html.haml' + - 'ee/app/views/shared/promotions/_promote_repository_features.html.haml' + - 'ee/app/workers/analytics/code_review_metrics_worker.rb' + - 'ee/app/workers/group_saml_group_sync_worker.rb' + - 'ee/lib/api/external_approval_rules.rb' + - 'ee/lib/api/helpers/epics_helpers.rb' + - 'ee/lib/api/ldap_group_links.rb' + - 'ee/lib/ee/api/entities/approval_state.rb' + - 'ee/lib/ee/api/entities/board.rb' + - 'ee/lib/ee/api/entities/group.rb' + - 'ee/lib/ee/api/entities/issue.rb' + - 'ee/lib/ee/api/entities/project.rb' + - 'ee/lib/ee/api/groups.rb' + - 'ee/lib/ee/api/helpers.rb' + - 'ee/lib/ee/api/internal/kubernetes.rb' + - 'ee/lib/ee/api/job_artifacts.rb' + - 'ee/lib/ee/api/projects.rb' + - 'ee/lib/ee/gitlab/alert_management/payload/generic.rb' + - 'ee/lib/ee/gitlab/checks/diff_check.rb' + - 'ee/lib/ee/gitlab/gon_helper.rb' + - 'ee/lib/ee/gitlab/tree_summary.rb' + - 'ee/lib/gitlab/alert_management.rb' + - 'ee/lib/gitlab/auth/group_saml/group_lookup.rb' + - 'ee/lib/gitlab/ci/pipeline/chain/config/content/compliance.rb' + - 'ee/lib/gitlab/code_owners.rb' + - 'ee/lib/gitlab/import_export/group/group_and_descendants_repo_restorer.rb' + - 'ee/lib/gitlab/incident_management.rb' + - 'ee/lib/gitlab/path_locks_finder.rb' + - 'ee/lib/incident_management/incident_sla.rb' + - 'ee/spec/models/ee/namespace_spec.rb' + - 'ee/spec/models/instance_security_dashboard_spec.rb' + - 'ee/spec/models/license_spec.rb' + - 'ee/spec/models/project_spec.rb' + - 'lib/api/helpers/related_resources_helpers.rb' - 'spec/models/concerns/featurable_spec.rb' - - 'spec/models/event_spec.rb' - - 'spec/models/packages/dependency_spec.rb' - - 'spec/requests/api/graphql/project/alert_management/alert/assignees_spec.rb' - - 'spec/requests/api/graphql/project/alert_management/alert/notes_spec.rb' - - 'spec/requests/api/graphql/project/alert_management/alert/todos_spec.rb' + +# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/327490 +Style/RegexpLiteralMixedPreserve: + Exclude: + - 'app/controllers/projects/repositories_controller.rb' + - 'app/helpers/ci/variables_helper.rb' + - 'app/models/alert_management/alert.rb' + - 'app/models/application_setting.rb' + - 'app/models/blob_viewer/go_mod.rb' + - 'app/models/concerns/ci/maskable.rb' + - 'app/models/operations/feature_flag.rb' + - 'app/models/packages/go/module.rb' + - 'app/models/project_services/chat_message/base_message.rb' + - 'app/services/packages/conan/search_service.rb' + - 'app/services/projects/update_remote_mirror_service.rb' + - 'config/initializers/rspec_profiling.rb' + - 'ee/app/models/status_page/project_setting.rb' + - 'ee/app/presenters/vulnerability_presenter.rb' + - 'ee/lib/api/geo_nodes.rb' + - 'ee/lib/gitlab/vulnerabilities/standard_vulnerability.rb' + - 'ee/spec/controllers/concerns/ee/routable_actions/sso_enforcement_redirect_spec.rb' + - 'ee/spec/controllers/concerns/routable_actions_spec.rb' + - 'ee/spec/controllers/groups/groups_controller_spec.rb' + - 'ee/spec/features/groups/saml_enforcement_spec.rb' + - 'ee/spec/features/markdown/metrics_spec.rb' + - 'ee/spec/lib/gitlab/database/load_balancing/load_balancer_spec.rb' + - 'ee/spec/models/project_services/jira_service_spec.rb' + - 'ee/spec/services/jira/requests/issues/list_service_spec.rb' + - 'lib/api/invitations.rb' + - 'lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb' + - 'lib/gitlab/metrics/requests_rack_middleware.rb' + - 'lib/gitlab/metrics/subscribers/active_record.rb' + - 'lib/gitlab/regex.rb' + - 'lib/gitlab/utils.rb' + - 'lib/product_analytics/tracker.rb' + - 'qa/qa/page/project/settings/advanced.rb' + - 'qa/spec/service/docker_run/gitlab_runner_spec.rb' + - 'rubocop/cop/gitlab/duplicate_spec_location.rb' + - 'spec/features/clusters/cluster_health_dashboard_spec.rb' + - 'spec/features/markdown/metrics_spec.rb' + - 'spec/features/search/user_searches_for_code_spec.rb' + - 'spec/features/snippets/embedded_snippet_spec.rb' + - 'spec/helpers/diff_helper_spec.rb' + - 'spec/helpers/releases_helper_spec.rb' + - 'spec/lib/gitlab/ci/reports/test_case_spec.rb' + - 'spec/lib/gitlab/consul/internal_spec.rb' + - 'spec/lib/gitlab/import_export/shared_spec.rb' + - 'spec/lib/gitlab/utils/usage_data_spec.rb' + - 'spec/presenters/ci/build_runner_presenter_spec.rb' - 'spec/requests/api/projects_spec.rb' - - 'spec/support/helpers/graphql_helpers.rb' - - 'spec/support/import_export/project_tree_expectations.rb' - - 'spec/support/shared_contexts/services/projects/container_repository/delete_tags_service_shared_context.rb' + - 'spec/services/jira/requests/projects/list_service_spec.rb' + - 'spec/support/capybara.rb' + - 'spec/support/helpers/grafana_api_helpers.rb' + - 'spec/support/helpers/query_recorder.rb' + - 'spec/support/helpers/require_migration.rb' + - 'spec/support/shared_examples/models/slack_mattermost_notifications_shared_examples.rb' + - 'spec/views/layouts/_head.html.haml_spec.rb' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index deb7f287f7..4bd885c35d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -32,24 +32,6 @@ Graphql/IDType: Layout/ArgumentAlignment: Enabled: false -# Offense count: 11 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleAlignWith, Severity. -# SupportedStylesAlignWith: start_of_line, begin -Layout/BeginEndAlignment: - Exclude: - - 'app/controllers/groups/shared_projects_controller.rb' - - 'app/workers/concerns/reactive_cacheable_worker.rb' - - 'ee/app/services/security/token_revocation_service.rb' - - 'ee/lib/gitlab/analytics/cycle_analytics/summary/group/deploy.rb' - - 'ee/lib/gitlab/ci/config/entry/vault/secret.rb' - - 'lib/api/internal/base.rb' - - 'lib/atlassian/jira_connect/serializers/build_entity.rb' - - 'lib/gitlab/ci/jwt.rb' - - 'lib/gitlab/external_authorization/client.rb' - - 'lib/gitlab/phabricator_import/project_creator.rb' - - 'scripts/gitaly_test.rb' - # Offense count: 54 # Cop supports --auto-correct. # Configuration parameters: AllowAliasSyntax, AllowedMethods. @@ -94,20 +76,6 @@ Layout/LineLength: Layout/MultilineOperationIndentation: Enabled: false -# Offense count: 11 -# Cop supports --auto-correct. -Layout/RescueEnsureAlignment: - Exclude: - - 'app/models/blob_viewer/dependency_manager.rb' - - 'app/models/project.rb' - - 'app/services/prometheus/proxy_service.rb' - - 'app/workers/concerns/reactive_cacheable_worker.rb' - - 'app/workers/delete_stored_files_worker.rb' - - 'config/initializers/1_settings.rb' - - 'config/initializers/trusted_proxies.rb' - - 'lib/api/internal/base.rb' - - 'lib/gitlab/highlight.rb' - # Offense count: 53 # Cop supports --auto-correct. Layout/SpaceAroundMethodCallOperator: @@ -202,21 +170,6 @@ Lint/MixedRegexpCaptureTypes: Lint/RedundantCopDisableDirective: Enabled: false -# Offense count: 9 -# Cop supports --auto-correct. -# Configuration parameters: AllowedMethods. -# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal? -Lint/RedundantSafeNavigation: - Exclude: - - 'app/controllers/concerns/labels_as_hash.rb' - - 'app/policies/note_policy.rb' - - 'app/services/users/update_canonical_email_service.rb' - - 'ee/app/presenters/iteration_presenter.rb' - - 'ee/app/services/ee/members/destroy_service.rb' - - 'ee/lib/ee/gitlab/email/handler/reply_processing.rb' - - 'qa/qa/specs/helpers/quarantine.rb' - - 'spec/controllers/boards/issues_controller_spec.rb' - # Offense count: 1 Lint/SelfAssignment: Exclude: @@ -255,12 +208,6 @@ Metrics/CyclomaticComplexity: Metrics/PerceivedComplexity: Max: 25 -# Offense count: 1 -# Cop supports --auto-correct. -Migration/DepartmentName: - Exclude: - - 'app/models/commit.rb' - # Offense count: 196 # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms. # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS @@ -693,11 +640,6 @@ Rails/WhereEquals: Rails/WhereExists: Enabled: false -# Offense count: 21 -# Cop supports --auto-correct. -Rails/WhereNot: - Enabled: false - # Offense count: 8 # Cop supports --auto-correct. Security/YAMLLoad: @@ -903,11 +845,6 @@ Style/Next: Style/NumericLiteralPrefix: Enabled: false -# Offense count: 140 -# Cop supports --auto-correct. -Style/ParallelAssignment: - Enabled: false - # Offense count: 2698 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. @@ -922,11 +859,6 @@ Style/RaiseArgs: Enabled: false EnforcedStyle: exploded -# Offense count: 73 -# Cop supports --auto-correct. -Style/RedundantAssignment: - Enabled: false - # Offense count: 2 # Cop supports --auto-correct. Style/RedundantBegin: @@ -951,11 +883,6 @@ Style/RedundantFetchBlock: Style/RedundantFileExtensionInRequire: Enabled: false -# Offense count: 248 -# Cop supports --auto-correct. -Style/RedundantFreeze: - Enabled: false - # Offense count: 206 # Cop supports --auto-correct. Style/RedundantInterpolation: @@ -985,20 +912,6 @@ Style/RedundantRegexpEscape: Style/RedundantSelf: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -Style/RedundantSelfAssignment: - Exclude: - - 'app/models/concerns/issuable.rb' - - 'spec/db/schema_spec.rb' - -# Offense count: 213 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, AllowInnerSlashes. -# SupportedStyles: slashes, percent_r, mixed -Style/RegexpLiteral: - Enabled: false - # Offense count: 53 # Cop supports --auto-correct. Style/RescueModifier: diff --git a/CHANGELOG.md b/CHANGELOG.md index d9436b873d..a48f0afd15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,18 +2,834 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. -## 13.10.4 (2021-04-27) +## 13.11.2 (2021-04-27) -### Security (6 changes) +### Security (5 changes) - Prevent tokens with only read_api scope from executing mutations. -- Update mermaid to version 8.9.2. - Do not allow deploy tokens in the dependency proxy authentication service. - Disable keyset pagination for branches by default. - Bump Carrierwave gem to v1.3.2. - Restrict setting system_note_timestamp to owners. +## 13.11.1 (2021-04-22) + +### Changed (1 change) + +- Change unsubscribe language for email campaign on self managed. !59121 + +### Added (1 change) + +- Add documentation about Pages deployment migration. !59475 + + +## 13.11.0 (2021-04-22) + +### Security (3 changes) + +- Update to Rails v6.0.3.6. !59328 +- Update mermaid to version 8.9.2. +- Allow to disable exiftool depending on env variable. + +### Removed (10 changes, 1 of them is from the community) + +- Redirect deprecated pipeline routes. !53990 +- Remove CI lint button from Jobs page nav. !56854 +- Remove graphql_individual_release_page feature flag. !56882 +- Remove deprecated repository archive routes. !57236 +- Remove add issues modal from issue boards (this has been disabled since 13.6). !57329 +- Remove unused feature flag ':roadmap_buffered_rendering'. !57486 +- Remove HipChat integration from frontend and docs. !57556 +- Remove temporary index from vulnerabilities table. !57656 (Huzaifa Iftikhar @huzaifaiftikhar) +- Remove unused feature flag checks. !58469 +- Remove ability to create new service templates. !58624 + +### Fixed (175 changes, 90 of them are from the community) + +- Update gatsby project template to address the pipeline failure. !37410 (Takuya Noguchi) +- Fixed an issue where the link commit message did not end with a newline. !49086 (Kazuya Kojima) +- Partially fix incorrect icons for non-standard license files. !53207 +- Add language- prefix to CSS class of markdown code blocks. !55076 (Camil Staps) +- Filter out pipelines that were excluded in the relation scope in Ci::Pipeline#latest_pipeline_per_commit. !55657 (Cong Chen @gentcys) +- Fix mermaid diagrams in dark mode. !56183 +- Catch network errors. !56457 (Shubham Kumar (@imskr)) +- Fix the Maven sync worker to not fail if the versionless package is not found. !56514 +- Fix `#current_authenticated_job` when used with `.authenticate_with` in Grape APIs. !56564 +- Move graphql timelogs to CE. !56633 (Lee Tickett @leetickett) +- Fix bug in wiki link rewriter filter. !56636 +- Fix bug in Gollum Tags filter. !56638 +- Fix derivation of effective permissions (access level) of group members. !56677 (Jonas Wälter @wwwjon) +- Fix word wrapping in parallel diffs. !56713 +- Don't close issue label select box on click if only mouseup outside. !56721 (Simon Stieger @sim0) +- Fix reference widget icon and text spacing. !56759 +- Fix test report merge request widget summary and issues alignment. !56768 +- Fix artifacts section from showing up when no artifacts are present. !56784 +- Push confidential_notes feature flag to mr frontend. !56798 (Lee Tickett @leetickett) +- Fixed offenses Layout/BeginEndAlignment. !56827 (Shubham Kumar (@imskr)) +- Close DropLab dropdowns on click instead of mousedown. !56847 (Simon Stieger @sim0) +- Add labels to UI toggles. !56848 +- Fix offense Layout/RescueEnsureAlignment. !56870 (Shubham Kumar (@imskr)) +- Fixes offense Lint/RedundantSafeNavigation. !56884 (Shubham Kumar (@imskr)) +- In admin new user page, fix external checkbox warning hide with keyboard interaction. !56896 +- Fix Conan project-level API to return correct download-urls and fix Conan project-level functionality. !56899 +- Remove Kramdown patch and update to v2.3.1 gem. !56917 +- Fixed styling of commit comment buttons. !56982 +- Update weight transaltion for Russian locale. !56986 (Gennady Kovalev (@belolap)) +- Fixes rubocop offense Migration/DepartmentName. !56997 (Shubham Kumar (@imskr)) +- Do not render empty title in HelpPopover. !57025 +- Validate import manifest url scheme. !57071 +- Inherit default branch name for subgroups. !57101 +- Fix ruby alpine CI template. !57109 +- Fix rails binding for ruby alpine template. !57112 +- Update admin edit button icon class. !57151 +- Fix branch switch to be exact instead of partial match. !57197 +- Add aria labels to icon buttons. !57261 +- Ensure search param is kept in scrolled commit. !57307 +- Fix remote_mirrors usage ping metric. !57332 +- Remove calls to jQuery animations to fix infinite scrolling on the Repository commits page. !57379 +- Hide project-specific views on group / instance level integrations. !57381 +- A blocked URL for a push mirror is a hard failure. !57392 +- Fix usage data count start/finish export issue. !57403 +- Fix tooltip position in mini pipeline chart. !57425 +- Use search param in refs call to filter revisions. !57442 +- Update the Package settings to use the blue primary button. !57468 +- Always save default on empty values in Exp Policies. !57470 +- Allow all file types to be uploaded from the repo file upload tool. !57498 +- Fix Assignee dropdown showing assignee(s) twice. !57513 +- Fix inconsistent production environment definition on VSA. !57557 +- Fix namespace validation (unique path) on group creation. !57563 (Jonas Wälter @wwwjon) +- Give better feedback when quick actions have no effect. !57570 (Hilco van der Wilk) +- Fix security report fetching in Merge Requests. !57574 +- Display error message when runner installation instructions modal cannot be loaded correctly. !57588 +- Fix two data races in the branch names cache. !57607 +- Add aria labels to icon-only buttons. !57610 +- Fix Rails/SaveBang rubocop offenses in spec/controllers/projects/*. !57643 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang Rubocop offenses for admin controllers. !57644 (Huzaifa Iftikhar @huzaifaiftikhar) +- Make NuGet SearchQueryService q parameter optional. !57654 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix MR Source Branch styling. !57662 +- Fix updating GraphQL boards cards on assignees update. !57687 +- Revert Ignore default_enabled value in Feature.enabled?. !57707 +- Simplify Build Group name correction. !57739 +- Fix force_random_password option when creating Users via API. !57751 +- Fix issue where merge description not showing when merged with merge train. !57787 +- Covert has-tooltip on commit page to pajamas. !57858 +- Fix Rails/SaveBang rubocop offenses in spec/controllers/groups*. !57879 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang Rubocop offenses for requests module. !57883 (Huzaifa Iftikhar @huzaifaiftikhar) +- Disable trigger manual job button after click. !57885 +- Fix Rails/SaveBang rubocop offenses in auth controllers. !57886 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang Rubocop offenses for requests/api module. !57887 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang Rubocop offenses for presenters. !57888 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang rubocop offenses in profiles & projects controllers. !57890 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang rubocop offenses in spec/features/admin. !57891 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang rubocop offenses in spec/features/dashboard. !57898 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang rubocop offenses in spec/features/issues. !57900 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang rubocop offenses in spec/features/projects. !57904 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang rubocop offenses in spec/features/. !57907 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang Rubocop offenses for hooks module. !57918 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fixes rubocop offenses Style/RedundantSelfAssignment. !57920 (Shubham Kumar (@imskr)) +- Fix closed icon for merge requests to match close issue icon. !57981 (jesus beltran) +- Resolves offenses Style/ParallelAssignment. !57999 (Shubham Kumar (@imskr)) +- Resolves offenses Style/RedundantAssignment. !58013 (Shubham Kumar (@imskr)) +- Fix Rails/SaveBang Rubocop offenses for deployment modules. !58040 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang Rubocop offenses for mattermost modules. !58048 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang rubocop offenses in spec/initializers. !58049 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang Rubocop offenses for issue models. !58052 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang Rubocop offenses for legacy github import. !58054 (Huzaifa Iftikhar @huzaifaiftikhar) +- Resolves rubocop offenses Rails/WhereNot. !58062 (Shubham Kumar (@imskr)) +- Fix Rails/SaveBang Rubocop offenses for markdown cache modules. !58063 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang Rubocop offenses for commit models. !58069 (Huzaifa Iftikhar @huzaifaiftikhar) +- Only link merge requests to successful deployments. !58072 +- Fix Rails/SaveBang Rubocop offenses for gitaly client models. !58089 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang Rubocop offenses for email handlers. !58095 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang rubocop offenses in spec/factories_spec.rb. !58102 (Abdul Wadood @abdulwd) +- Fix Rails/SaveBang Rubocop offenses for ci models. !58104 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix Rails/SaveBang Rubocop offenses for banzai modules. !58108 (Huzaifa Iftikhar @huzaifaiftikhar) +- Ensures that the "Suggest GitLab CI" popover is shown after selecting a template type. !58120 +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for groups controller. !58174 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for boards module. !58180 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses for error tracking module. !58182 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for groups module. !58183 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses for design management module. !58189 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for metrics module. !58190 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for helpers. !58192 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for api entities. !58193 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for api helpers. !58194 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix overflow UI bug with longer commit title on Wiki Page History. !58212 (Takuya Noguchi) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/graphql/types. !58241 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/banzai. !58242 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe in spec/lib/gitlab/alert_management. !58244 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/analytics. !58245 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/auth. !58246 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/checks. !58248 (Huzaifa Iftikhar @huzaifaiftikhar) +- Disable pages_serve_with_zip_file_protocol by default. !58253 +- Fix EmptyLineAfterFinalLetItBe offenses spec/lib/gitlab/github_import. !58256 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/graphql. !58261 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/hook_data. !58262 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses spec/lib/gitlab/import_export. !58264 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/jira_import. !58266 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix visibility filter on explore projects page. !58293 (Jonas Wälter @wwwjon) +- Fix EmptyLineAfterFinalLetItBe in spec/lib/gitlab/phabricator_import. !58297 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab. !58314 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/mailers. !58319 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/models/blob_viewer. !58325 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/models/ci. !58327 (Huzaifa Iftikhar @huzaifaiftikhar) +- Update the group permission check in packages finder helper. !58329 +- Fix EmptyLineAfterFinalLetItBe offenses in spec/models/concerns. !58367 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/models/project. !58372 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/policies. !58393 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/serializers. !58406 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/services/award_emojis. !58407 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/services/boards. !58413 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe in spec/services/design_management. !58416 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/services/environments. !58418 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/services/groups. !58423 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/services/ide. !58424 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/services/issues. !58425 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fix EmptyLineAfterFinalLetItBe offenses in spec/services/merge_requests. !58429 (Huzaifa Iftikhar @huzaifaiftikhar) +- Add aria labels to icon-only buttons. !58459 +- Fixes admin ci variables not showing up. !58496 +- Fix previous deployment fetches wrong deployment. !58567 +- Fix delete source branch status message. !58605 +- Fix member autocomplete sort order. !58652 +- Show bottom border on milestones sidebar widget for incident issues. !58662 +- Fix project access token creation group settings link. !58686 +- Avoid listing snippets through GraphQL when user profile is private. !58739 +- Fix notification when new Service Desk Issue is created. !58803 +- Fix dark mode colors of retried jobs in job details page. !58855 +- Fix Forward Deployment Worker causes deadlock. !58861 +- Fix select2 dropdowns in dark mode. !58862 +- Fix badge s and borders in dark mode info wells. !58875 +- Dark mode nav improvements. !58891 +- Fix style for adding a related issue in free tiers. !58893 (Michael Telgkamp @michael.telgkamp) +- Fix user reference transformation in EpicsPipeline. !58913 +- Avoid inflating Redis memory when aborting pipelines. !59018 +- Fix sign out button in error pages. !59030 +- Add aria labels to icon-only buttons. !59037 +- Skip Rack Attack rate limiting for container registry event API. !59085 +- Fix loading pipelines by commit SHA for GraphQL. !59110 +- Drop user pipelines async when user is blocked. !59129 +- IPython KaTeX rendering of comparison operators for markdown. !59132 (Reinhold Gschweicher ) +- Fix MR diff file tree being hidden behind review bar. !59150 +- Add invited group members to search results on assignees widget. !59152 +- Fix tooltip not rendering. !59202 +- Fix revert commit query. !59356 +- Do not show sort by project in Package project page. !59367 +- Return 403 status code to the Runner when CI Job is deleted. !59382 +- Fix character escaping in Resolved By tooltips. !59428 +- Fix Jenkins integration for GitLab FOSS. !59476 +- Exclude projects dropdown from revert modal. !59504 +- Ensure all tooltips appear with a 500ms delay. !59561 +- Added feature flag to show/hide assignees GraphQL widget. !59620 +- Fix rare race condition in GitLab-internal feature flags with database load balancing enabled. + +### Deprecated (5 changes, 1 of them is from the community) + +- Rename event to action in Snowplow helpers and FE event handlers. !55698 +- Deprecate Product Intelligence test aggregated metrics. !57377 +- Bump recommended Redis version from 4.0 to 5.0. !59072 (Takuya Noguchi) +- Deprecate Alerts for Managed Prometheus. !59433 +- Deprecate assigneeUsername issue filter in GraphQL. !59538 + +### Changed (211 changes, 76 of them are from the community) + +- Adds CI pipeline and job features to GraphQL API. !44703 +- Unify the Docker Image build CI template and use the default branch instead of hardcoded 'master'. !51931 (dnsmichi) +- Update performance bar background color to use Pajamas compliant colour palette. !52775 (Yogi (@yo)) +- Remove extra tooltip from pipelines overview page. !52902 (Yogi (@yo)) +- Update RubyGems metadata constraints and add gem metadata extraction. !53673 +- Returns deep stringified keys for merged_yaml in linting endpoint. !54336 +- Add space to graph in contributor page. !54431 (Yogi (@yo)) +- Move from btn-success to btn-confirm in app/views/profiles directory. !54748 (Yogi (@yo)) +- Add multi-line styling within contribution tooltip. !54765 (Yogi (@yo)) +- Update import statuses texts and icons. !54957 +- Add branch names field to repository GraphQL type. !55074 +- Remove referencing TokenWithIv model in the codebase and dynamic nonce creation feature flag. !55209 +- Move to btn-confirm from btn-success in views/invites directory. !55293 (Yogi (@yo)) +- Add validation for emails on push recipients. !55550 +- Migrate bootstrap modal to GlModal for repo single file uploads. !55587 +- Record sent in-product marketing emails and don't send the same email twice. !55840 +- Alerts integration form UX cleanup. !55892 +- Sync single-file mode user preference when changed from the MR cog menu checkbox. !55931 +- Remove group member: add option to also remove direct user membership from subgroups and projects. !55980 (Jonas Wälter @wwwjon) +- Move to btn-danger for delete button in applications. !56088 (Yogi (@yo)) +- Apply new GitLab UI for badge in starrers page. !56091 (Yogi (@yo)) +- Move to btn-confirm from btn-primary in wiki empty state. !56192 (Yogi (@yo)) +- Move to btn-confirm in download directory dropdown. !56193 (Yogi (@yo)) +- Add btn-default class for Service Desk toggle in settings. !56195 (Yogi (@yo)) +- Move to confirm variant from success in pipeline_new directory. !56199 (Yogi (@yo)) +- Move to confirm varient from success in pipeline_editor directory. !56200 (Yogi (@yo)) +- Move from btn-success to btn-confirm in pipeline_schedules directory. !56201 (Yogi (@yo)) +- Move to confirm variant from success in feature_flags directory. !56202 (Yogi (@yo)) +- Move to confirm variant from success in alert_management directory. !56206 (Yogi (@yo)) +- Move from btn-success to btn-confirm in tracings directory. !56209 (Yogi (@yo)) +- Move from btn-success to btn-confirm in logs directory. !56211 (Yogi (@yo)) +- Move from btn-success to btn-confirm in environments directory. !56212 (Yogi (@yo)) +- Move from btn-success to btn-confirm in blob directory. !56213 (Yogi (@yo)) +- BulkImports: Track pipeline worker with BulkImports::Tracker#status. !56242 +- Update master to main inside monitor copy. !56264 +- Project Settings Operations headers Alerts/Error tracking/Jeager tracing/Jeager tracing expand/collapse on-click/on-tap. !56269 (Daniel Schömer) +- Project Settings Operations header Grafana authentication expand/collapse on-click/on-tap. !56270 (Daniel Schömer) +- Add support for commit_email to Users API. !56272 +- Project Settings Operations header Incidents expand/collapse on-click/on-tap. !56273 (Daniel Schömer) +- Project Settings Operations header Metrics dashboard expand/collapse on-click/on-tap. !56274 (Daniel Schömer) +- Clean up integration form titles and password fields. !56309 +- Move from btn-success to btn-confirm in branches directory. !56325 (Yogi (@yo)) +- Move from btn-success to btn-confirm in cleanup directory. !56329 (Yogi (@yo)) +- Move from btn-success to btn-confirm in default_branch directory. !56330 (Yogi (@yo)) +- Move from btn-success to btn-confirm in deploy_keys directory. !56331 (Yogi (@yo)) +- Move from btn-success to btn-confirm in forks directory. !56333 (Yogi (@yo)) +- Move from btn-success to btn-confirm in hooks directory. !56334 (Yogi (@yo)) +- Move from btn-success to btn-confirm in imports directory. !56336 (Yogi (@yo)) +- Allow setting the shard/replica separately for standalone indexes. !56344 +- Move from btn-success to btn-confirm in network directory. !56345 (Yogi (@yo)) +- Move usage of delayed_project_removal to namespace settings. !56397 +- Update buttons on issue page. !56425 +- Create new policies for read, destroy, and create tokens. !56464 +- Update Jira issues list to use new UI components. !56465 +- Move from btn-success to btn-confirm in protected_branches directory. !56477 (Yogi (@yo)) +- Move from btn-success to btn-confirm in protected_tags directory. !56478 (Yogi (@yo)) +- Move from btn-success to btn-confirm in runners directory. !56485 (Yogi (@yo)) +- Enable new RPC call to retrieve wiki files. !56491 +- Center the pipeline stages dropdown in the commit details page. !56505 +- Update mini pipeline appearance in commit page to match other mini pipelines in the application. !56510 +- Disable pipeline schedules when a user is blocked. !56513 +- Add Username to Email From Header in Notifications. !56588 +- WebIDE show fork button when cannot push code. !56608 +- Add empty state CTA in pipeline editor section for new root CI files. !56665 +- Support newlines for the chatops "run" command. !56668 +- Adds skipped state to duration cell for single stage manual pipelines. !56669 +- Support for --prefer-source option for Composer registry. !56693 +- Allow Email Replies to Notes to Create Discussions. !56711 +- Add id and short_sha GraphQL fields to jobType in the CI namespace. !56714 +- Remove the commit message from the package details UI. !56716 +- Assignee dropdown in issue page displays only participants by default. !56742 +- Render Kramdown format using Gitlab markup. !56750 +- Relax version validation on generic packages. !56755 +- Show popovers on hover and focus by default. !56778 +- Change icon size in the pipeline editor. !56780 +- Show password hint only if password_authentication_enabled_for_web? on new location logins. !56783 (Roger Meier) +- Add Vulnerabilities::FindingEvidence model. !56790 +- Update compare branches button to btn-confirm. !56791 +- Update buttons and spacing on commit page. !56793 +- Update secondary nav elements right margin to 8px. !56794 +- Add created_at to job webhooks. !56835 +- Rename pipelines setting to CI/CD and move out from under repository section. !56857 +- Change the way deprecation information is presented in GraphQL documentation. !56864 +- Validate null constraint for cluster token name. !56868 +- Move from btn-success to btn-confirm in projects/services directory. !56937 (Yogi (@yo)) +- Move from btn-success to btn-confirm in projects/settings directory. !56938 (Yogi (@yo)) +- Move from btn-success to btn-confirm in projects/snippets directory. !56939 (Yogi (@yo)) +- Move from btn-success to btn-confirm in projects/tags directory. !56940 (Yogi (@yo)) +- Move from btn-success to btn-confirm in projects directory. !56943 (Yogi (@yo)) +- Move from btn-success to btn-confirm in registrations directory. !56944 (Yogi (@yo)) +- Move from btn-success to btn-confirm in users directory. !56945 (Yogi (@yo)) +- Adjust gitlab_database_transaction_seconds histogram bucket. !56952 +- Add extra fields to the external pipeline validation payload. !56969 +- Change assignee dropdown invite to utilize invite modal. !57002 +- Enable DISTINCT optimization for ObjectHierarchy globally. !57052 +- Redirect to the pipeline editor when clicking on CI/CD quick links. !57085 +- Update learn gitlab template for new registrations. !57098 +- Add loading icon to create merge request button. !57105 +- Move Pipeline Editor repo link outside of feature flag conditional. !57144 +- Show the Contribution Analytics promotion page for users without permission. !57222 +- Show skipped duration state for all skipped pipelines. !57242 +- Add Runner ID as title in Runner details page. !57247 +- Remove feature flag usage_data_track_ci_templates_unique_projects. !57280 +- Deprecate but keep support for Klar up to version 3. A new analyzer based on Trivy will be used from version 4 onwards. !57281 +- Hydrate some of the variables in the Overview tab suggestion commit placeholder by switching the Diffs data source for it. !57419 +- Remove Slack attachment from new issues created via Slash commands. !57431 +- Make VALIDATION_REQUEST_TIMEOUT configurable. !57521 +- Remove programmatic access to registration tokens. !57524 +- Update Jira subscriptions list to use Vue. !57561 +- Update runner badges look and feel in admin runners table. !57566 +- Rename jobs to promote a smoother transition between Klar and Trivy based scanners. !57593 +- Do not trim input for sample & test payload on alerts integration form. !57617 +- Allow a Global ID to be used when filtering issue by iterationId in GraphQL. !57620 +- Add tags field to jobType in the CI namespace. !57631 +- Expose createdAt and updatedAt fields for Board in the GraphQL API. !57645 +- Update validation trigger flow on the alerts integration form. !57697 +- Remove groupId and projectId arguments to Runner install instructions. !57720 +- GraphQL: expose milestone iid. !57732 +- Move commit neighbor buttons to sticky MR controls. !57743 +- Update title on revoke member invite modal and hide unneeded related issues and merge requests checkbox. !57755 +- Deprecate btn-warning on admin area delete user modal. !57761 +- Remove deprecated button classes from issue detail view. !57763 +- Utilize btn-tertiary for copy project id on project overview. !57766 +- Remove top margin for print layout. !57824 +- Fail batch-aborted pipelines with reason. !57838 +- Replace deprecated Close Milestone button on list view. !57871 +- Replace deprecated button on new epic creation form. !57874 +- Hide pipeline filtered search when no pipeline exists. !57881 +- Add gl-badge for badges in group members page. !57933 (Yogi (@yo)) +- Add gl-badge for badges in project members page. !57934 (Yogi (@yo)) +- Display error message when dashboard activity fetch fails. !57935 +- Add gl-badge for badges in dashboard nav. !57936 (Yogi (@yo)) +- Update GIicon size in geo_node_header.vue. !57952 (singhanshuman) +- Move to confirm variant for buttons in vulnerabilities page. !57961 (Yogi (@yo)) +- Add gl-badge for badges in MR page nav. !57969 (Yogi (@yo)) +- Align project stars and date to center of project in groups page. !57972 (Yogi (@yo)) +- Add btn-icon class for GPG key delete button. !57974 (Yogi (@yo)) +- Add btn-default for mirror update button. !57978 (Yogi (@yo)) +- Update ruby-magic-static to v0.3.5. !57984 +- Reduce button size for revoke button in PAT page. !57989 (Yogi (@yo)) +- Apply gl-form-input for fields in GPG keys page. !58002 (Yogi (@yo)) +- Apply gl-form-input for fields in new schedule page. !58015 (Yogi (@yo)) +- Move to btn-confirm from btn-success in licenses directory. !58024 (Yogi (@yo)) +- Move to btn-confirm from btn-success in geo directory. !58031 (Yogi (@yo)) +- Move to btn-confirm from btn-success in push_rules directory. !58033 (Yogi (@yo)) +- Move to btn-confirm from btn-success in devise directory. !58035 (Yogi (@yo)) +- Add btn-default class for toggle button in admin templates. !58041 (Yogi (@yo)) +- Move to btn-confirm from btn-success in ee project settings. !58047 (Yogi (@yo)) +- Improve UI of Runner Installation instructions: add a loading indicator, use checkmark on selected options, reduce height of modal. !58055 +- Update New Issue form description copy from 'wite a comment' to 'wite a description'. !58068 +- BulkImports: Import milestone iid. !58107 +- Replace deprecated buttons on epic detail view. !58152 +- Replace deprecated buttons on board view. !58153 +- Small text updates on the SAST Config UI page. !58188 +- Update GlIcon size in environments.vue. !58208 (Md. Pial Ahamed (@root.pial)) +- Link to revision in version on admin dashboard. !58225 (Yogi (@yo)) +- Rename Gitlab to GitLab in admin dashboard. !58228 (Yogi (@yo)) +- Remove underline in apply for credit button in k8s page alert. !58232 (Yogi (@yo)) +- Add btn-default class for file picker button. !58238 (Yogi (@yo)) +- Rename Submit issue to Create issue in boards and docs. !58243 (Yogi (@yo)) +- Update label container background and border colour from dark grey to use the same light grey as the board's containers. !58279 +- UI improvement of Admin Dashboard top page. !58373 (Takuya Noguchi) +- Add warning icon beside in progress text if pipeline is stuck. !58427 +- Set workhorse_extract_filename_base feature flag to default. !58504 +- Update resolving alert system notes to use term Recovery Alert. !58513 +- Update default spinner color to pajamas. !58517 +- Update ruby-magic to v0.3.2. !58537 +- Fix HAML in _promote_issue_weights.html.haml. !58546 (Yogi (@yo)) +- Update popover placement and cursor on warning icon in PB. !58552 (Yogi (@yo)) +- Remove vertical-align-middle from user location and work in profile. !58554 (Yogi (@yo)) +- Enable chronological sort order for other items in the performance bar. !58572 +- Use GlTable design system component for pipelines table. !58581 +- Update MobSF to version 3.4.0 in the SAST template. !58594 +- Add count of unique users to receive on-call notification to usage ping. !58606 +- Add global callout for Service template deprecation. !58613 +- Remove cached_api_merge_request_version feature flag. !58670 +- Bump minimum git version to v2.31.0. !58737 +- Add a chaos endpoint that signals QUIT. !58755 +- Improve runners status icon usability and accessibility in the project settings view. !58781 +- Make ref parameter optional in get raw file api. !58787 +- Centralize shared state in Authoring section. !58790 +- Update default branch in divergence graph. !58871 +- Update Pipeline Graph Visualization. !58889 +- Move initial pipeline processing to Sidekiq. !58901 +- Display runner token and description consistently in the job sidebar and admin list. !58904 +- Update ruby-magic to v0.4.0. !58947 +- Update search and sort from the branches page. !58951 +- Return email confirmation time from email entity. !58957 +- Update runner type indicators in view/edit pages. !59005 +- Default enable cascading settings feature flag. !59026 +- Fix gl-emoji in abuse report page. !59078 (Yogi (@yo)) +- Adds new clusters_integrations_prometheus table and model for Prometheus Cluster Integration. !59091 +- Include project and build ID in Pages tmp directory. !59106 +- Deactivate prune webhook logs worker. !59120 +- Reduce pipeline tooltip delay to 0. !59155 +- Remove gldropdown_branches feature flag. !59179 +- Clarify on welcome page that we do not share any data. !59183 +- Schedule artifact expiry backfill again. !59270 +- Create prometheus service asynchronously by default when creating a project. !59273 +- Show archive notice on empty project. !59286 +- Enable in-product emails only for free instances. !59290 +- Log all API uploads that exceed max attachment size. !59292 +- Pages: Add feature flag to disable deployment to legacy storage. !59298 +- Hide What's New for unauthenticated users. !59330 +- Add queue label to metrics dispatched by background transaction. !59344 +- Update Ruby from 2.5 to 2.7 in Dockerfile templates. !59345 (Takuya Noguchi) +- Update profile SSH key labels to refer to expired keys as "Expired". !59381 +- Display project settings runners identifiers consistently. !59383 +- Migrate Start Review button on MRs to use confirm variant. !59523 +- Update auto-build-image to v0.6.0, updating the included docker to 20.10.6 and pack to 0.18.0. !59525 +- Apply new GitLab UI for buttons in create tag page. (Yogi (@yo)) + +### Performance (107 changes, 1 of them is from the community) + +- Cache namespace traversal path. !52854 +- Use empty-query by default to check database connection. !54366 (Leandro Gomes @leandrogs) +- API JSON caching for tags endpoint. !54975 +- Cache open merge requests count in group sidebar. !55971 +- Add index on ci_stages to speed up batch pipeline cancellation. !56126 +- Backfill traversal_ids for gitlab-org staging. !56293 +- Linear version of Namespace#self_and_descendants. !56296 +- Add database index for cancelable ci_pipelines on user and id. !56314 +- Improve the performance of Merge Request Analytics table. !56380 +- Move fetching projects and groups on todos page to API call. !56507 +- Fix Workhorse acceleration for encoded project IDs in API. !56731 +- Prevent sticking to DB primary when experiments are tracked. !56852 +- Move link icon to CSS. !56980 +- Drop unused preload from PipelineSerializer. !56988 +- Speed up destroying of group Todos when user leaves group. !56995 +- Optimise query for Deployment#previous_environment_deployment in LinkMergeRequestWorker. !57039 +- Optimize database performance of loading assigned issue count on header bar. !57073 +- Backfill traversal_ids for gitlab-org .com. !57075 +- Check access only for requesting user when checking if subscribed. !57201 +- Add gin index for namespaces.traversal_ids. !57207 +- Accelerate uploads via API with Workhorse. !57250 +- Add additional index to merge_requests table for project/status/created_at. !57267 +- Preload group parent to fix N+1 queries for project search. !57277 +- Preload additional data to fix N+1 queries for merge request search. !57284 +- Remove N+1 for API commits/:sha/merge_requests. !57290 +- Remove N+1 for API :id/deploy_keys. !57295 +- Reduce query count for ExpirePipelineCacheWorker. !57304 +- Remove N + 1 for milestones issues. !57349 +- Add partial index to improve mirrors update. !57353 +- Apply optimizations to JobsController#show.json. !57367 +- Fix N+1 issue when loading merge request comments. !57374 +- Perform more merge request creation tasks asynchronously to improve response times. !57453 +- Fix N+1 for searching notes (comments) scope. !57460 +- Resolve N + 1 for JIRA pulls. !57482 +- Make `ci_runner_builds_queue_on_replicas` default. !57484 +- Reduce queries on group labels controller. !57517 +- Reduce number of queries in mergeRequestSetAssignees GraphQL mutation. !57523 +- Reduce N+1 queries in creating todos after user mentions in a note. !57525 +- Optimize Deploy Keys Presenter. !57551 +- Add index to improve project deployments endpoint performance. !57554 +- Resolve N + 1 for deployments API. !57558 +- Cache merge request diff version API. !57568 +- Reduce SQL requests number for issue links. !57602 +- Avoid N+1 query when updating todo count cache. !57622 +- Resolve N + 1 for commits notes API. !57641 +- Resolve more N+1 issues in Jira pulls API. !57658 +- Reduce number of SQL queries in Profiles::SlacksController#edit. !57674 +- Preload all user callouts in a single request. !57679 +- Add TargetProject And SourceBranch Index To MergeRequest. !57691 +- Optimize group level Maven package finder query. !57692 +- Remove ci_lower_frequency_trace_update feature flag. !57713 +- Cache MRs count on milestone page. !57714 +- Fix N+1 for searching milestone scope. !57715 +- Avoid N+1 queries in breadcrumbs. !57725 +- Move project hooks routes under /-/ scope. !57734 +- Add composite index to support epic filtering by award emoji. !57759 +- Reduce query count for popular worker ExpireJobCacheWorker. !57773 +- Remove feature flag optimize_issue_filter_assigned_to_self. !57775 +- Ensure a project iid is set before transitioning on pipeline error. !57783 +- Fix N+1 in projects REST endpoint with forked projects. !57798 +- Bulk-abort user pipelines on block. !57801 +- Move pipelines calculation from widget.json to cached_widget.json. !57822 +- Delete all issuable todos asynchronously when issuable is destroyed. !57830 +- Reduce queries on projects labels controller. !57864 +- Optimize database query for last deployment. !57979 +- Fix N + 1 for MilestonesController#merge_requests. !57980 +- Minor performance improvement for ref finder. !58099 +- Reduce milestone issue list display limit to 500. !58168 +- Partial index optimization for namespaces id. !58220 +- Add caching to variables calculation of builds. !58286 +- Reduce SQL requests on building artifacts. !58339 +- Drop unused mirror_data index. !58349 +- Add index on file_store for pages_deployments table. !58355 +- Eliminage N+1 database queries on the user notifications page. !58397 +- Create finder for searching branch names via redis. !58439 +- Preload associations in Ci::Pipeline#cancel_running. !58484 +- Add new MergeRequests::SyncCodeOwnerApprovalRulesWorker. !58512 +- Create the pipelines asynchronously when refreshing merge requests. !58542 +- Optimize searching cherry-picked merge requests for linking deployments. !58568 +- Use object quarantine directory to enumerate new LFS pointers. !58634 +- Resolve merge request todos asynchronously on update. !58647 +- Enable cached avatar lookups by email. !58659 +- Resolve group_member policy n+1. !58668 +- Move CI related paths to cached MR widget. !58711 +- Fix N+1 in REST projects and service desk. !58747 +- Optimize environment serializer to reduce N+1 problems. !58748 +- Handle assignee changes side effects asynchronously. !58783 +- Remove paths from BuildArtifactEntity. !58818 +- Use fast path helpers in BuildDetailsEntity. !58824 +- Add framework for using specialized services to improve performance of MergeRequests::UpdateService. !58836 +- Fix N+1 for searching commits. !58867 +- Fix N+1 queries to find or initialize services. !58879 +- Adjust indices to improve query performance for notification_settings. !58895 +- Fix N+1 queries for issues search. !58915 +- Optimize query for cherry picked merge requests. !58967 +- Cache issues count in sidebar at group level. !59004 +- Improve performance by moving TODO creation out of the jobs/request path. !59022 +- Eliminate N+1 database queries on the user notifications page within the project notifications section. !59029 +- Add migration to index members on user_id, source_id, and source_type. !59051 +- Reduce the number of SQL queries executed on Maven file API endpoints. !59136 +- Add user index on spam logs. !59151 +- Limit number of GraphQL requests tracked in performance bar to 10. !59158 +- Add index for the path column on the packages_maven_metadata table. !59241 +- Reduce timeouts on tab counts for searches to 5s. !59435 +- Add partial index on members to optimize highest access level query. !59455 +- Optimize issuable updates. !59468 +- Ensure the project iid is set before dropping pipeline. !59626 + +### Added (108 changes, 11 of them are from the community) + +- Support adding and removing assignees w/ push opts. !25904 +- Add Go Packages as a cache for the Go proxy. !34558 (Ethan Reesor (@firelizzard)) +- Allow admin users to define admin notes on groups. !47825 +- Resolve nested variable values sent to the runner. !48627 +- Hide "Resolve conflicts" button when source branch is protected. !51121 (Marcin Majkowski @marcinmajkowski) +- Allow Add Comment To Review. !51718 (Lee Tickett @leetickett) +- Add click to copy button over project ID. !53224 (Virgile MATHIEU @vmathieu) +- Convert admin mode feature flag to system application setting. !53610 (Diego Louzán) +- Send in-product marketing emails to guide users setting up their groups. !53715 +- Automatically try to migrate gitlab pages to zip storage. !54578 +- Add user-merge request interaction type. !54588 +- Save usage_data_id from versions app in raw_usage_data. !54738 +- Create UserPreferences API. !55033 +- Support group applications. !55152 (Jonas Wälter @wwwjon, Bastian Blank) +- Ability to add Prometheus as cluster integration. !55244 +- Add JavaScript, TypeScript, and React support to the semgrep analyzer. !55257 +- Added local_store to Pages settings in gitlab.yml file. !55470 +- Add additional fields to dast_site_profiles database table. !55579 +- Cascade delayed project removal setting lookup to parent namespace. !55678 +- Support automatic transitions of Jira issues. !55773 +- Add blocked issues detail popover for boards cards. !55821 +- Allow users to mark pages projects as not deployed during migration to zip storage. !55862 +- Add dast_profile_secret_variables table. !56067 +- Support daily DORA metrics API. !56080 +- Track agent token last_used. !56143 +- Add CI_COMMIT_AUTHOR predefined variable. !56144 (Craig Andrews @candrews) +- Linking to a single line number in Web IDE. !56159 +- Migrate group badges when using Bulk Import. !56357 +- Add Ability to Edit Freeze Periods. !56407 +- Add GraphQL mutation to delete an existing release asset link. !56417 +- Personal access token revoke for managed accounts (feature flag removed). !56427 +- Migration: add trial extension type to gitlab_subscription. !56460 +- Geo: Prepare snippet_repositories and snippet_repository_registry tables for adding verification. !56596 +- User Availability - Allow users to schedule un-setting of their status values. !56649 +- Add missing icon for files with .c++ extension. !56650 (Peter Kovář @peter.kovar) +- Add in-page search for all settings pages. !56659 +- Support include_ancestors when querying group milestones via GraphQL. !56667 +- Add recaptcha to top-level group creation behind feature flag. !56707 +- Configure issue and merge request description templates at group level and rolldown description templates in the group hierarchy. !56737 +- Enabled phabricator importer by default. !56765 +- Generalize alert details status. !56800 +- Create database table dast_profiles_pipelines. !56821 +- Allow selecting a CI template by providing the template name as a URL param gitlab_ci_yml. !56861 +- Group SAML - Check SSO status on Git activity. !56867 +- Send email notification on SSH key expiration. !56888 +- Support custom tag formats for changelogs. !56889 +- Delete records from security_findings table with missing UUID values. !56975 +- Link squashed commits using the changelog API. !56985 +- Allow users to enable force push to protected branches. !57053 +- Add rake tasks for Pages deployment migration. !57120 +- Code suggestions correctly add based on multi-line comments. !57125 +- BulkImports: Add `BulkImports::PipelineWorker` to process each BulkImport pipeline on its own background job. !57153 +- Connect Registries searches to URL. !57251 +- Sort code quality degradations in MR Widget comparison reports. !57258 +- Add unified metrics definition YAML file API endpoint. !57270 +- Clarify what coverage means on the merge request pipeline section. !57275 +- Improve payload format of DORA metrics API. !57314 +- Expose timelogs against issues and merge requests in GraphQL. !57321 (Lee Tickett @leetickett) +- Populate missing dismissal information for vulnerabilities. !57347 +- Clarify the impact of selecting incidents in the new issue form. !57373 +- Add jobs field to the project type. !57376 +- When removing a user, warn Admin user is part of an on-call schedule. !57397 +- Exposes schedulingType on CiJobType and adds usesNeeds to PipelineType. !57398 +- '/projects/:id/repository/compare' supports comparing branches/commits on different projects. !57418 (Exchizz (@Exchizz)) +- Add geo database changes for pipeline artifact replication. !57506 +- Add more fields to the job type. !57530 +- Capture test report summary widget views via usage ping. !57543 +- Allow filtering GraphQL alertManagementIntegrations and alertManagementHttpIntegrations by ID. !57590 +- Add search functionality to Jira Connect App namespaces. !57669 +- Add Conan GraphQL type to package. !57719 +- Log message when upload via API exceeds limit. !57774 +- Migration: Add cloud column to licenses. !57781 +- Re-add swap revisions feature (legacy). !57802 +- Add support for SMTP connection pooling when sending emails. !57805 +- Add a migration to insert trail plans within SAAS for Ultimate and Premium plans. !57814 +- Add link to test case file in the test report for merge requests. !57911 +- Upgrade GitLab Pages to v1.37.0. !57946 +- Add negative filters for merge requests API. !58021 +- Add setting to change default target project for merge requests from forks. !58093 +- Support negated filtering of issues by iids, label_name, milestone_title, assignee_usernames and assignee_id in GraphQL. !58154 +- User notification when SSH key is set to expire soon. !58171 +- Allow user to filter epics by their reaction emoji via GraphQL. !58211 +- Add config support for using Microsoft Graph with MailRoom. !58250 +- Let users create groups and projects at signup and onboard them through issues on gitlab.com. !58301 +- Reschedule background migration to copy projects.container_registry_enabled to project_features.container_registry_access_level. !58360 +- Prettify JSON of sample alert payload. !58433 +- Add spent quick action alias. !58539 (Lee Tickett @leetickett) +- Add GraphQL endpoint for test report summary for pipelines. !58596 +- Show pipeline finished timestamp on MR widget. !58618 +- Add Hello World CI Template. !58649 +- Make blobs directly accessible through the graphql repository. !58677 +- Add target_type column to dast_site_profiles database table. !58723 +- Add GraphQL endpoint for a specific test suite in pipelines. !58924 +- Add blob filename to attachment content disposition. !58977 +- Rollout product_intelligence_metrics_names_suggestions feature flag. !58995 +- Support filtering by assignee wildcard in GraphQL board list issues query. !58996 +- Remove pages_serve_from_migrated_zip feature flag. !59002 +- Enables multiple_cache_per_job feature flag by default. !59016 +- Add CODECLIMATE_PREFIX variable to code quality template. !59041 +- Add instance_url column to the jira_connect_installations table. !59148 +- Remove codequality_backend_comparison feature flag. !59320 +- Allow cherry-picking to a fork's parent. !59399 +- Add kotlin support to spotbugs-sast job. !59431 +- Upgrade GitLab Pages to 1.38.0. !59464 +- Add documentation about Pages deployment migration. !59475 +- Re-enable serving pages with zip file protocol. !59486 +- Enable pipeline_status_for_pipeline_editor by default. !59495 +- Extract creation of prometheus service from Projects::CreateService. + +### Other (160 changes, 74 of them are from the community) + +- Resolve Improve text for error No issue found for given params in UI. !45064 +- Update gon gem to 6.4.0. !51210 +- Initialize conversion of events.id to bigint, and add execute_batched_migrations_on_schedule feature flag to control scheduled background migrations. !51332 +- Apply new GitLab UI buttons in the webhooks list. !51977 (Yogi (@yo)) +- Fix alignment of folder-caret and actions button in the subgroup list. !52400 (Yogi (@yo)) +- Remove JSON endpoint for project container index. !52407 (Takuya Noguchi) +- Update HIPAA logo for project templates. !53270 +- Apply GitLab UI button styles to buttons in app/views/shared directory. !53474 (Yogi (@yo)) +- Drop non-partitioned audit_events_archived table. !53880 +- Add message for repository backup skip. !54285 +- Updated MR Approvals to specify settings section. !54985 +- Remove markdown from comment search result. !55255 +- Deduplicate issue_metrics table. !55285 +- Document how to use custom omniauth button icon. !55388 (Diego Louzán) +- Create Cop to enforce using policies framework for administrators. !55693 (Diego Louzán) +- Remove tabindex on skip link that could negatively impact keyboard focus management and order. !55756 +- Mark merge request as preparing on create. !56086 +- Update Search and Apply buttons to confirm variant to align with Pajamas design system. !56122 +- Decrease spacing between controls on the Commit page header. !56129 +- Create new unit test tables. !56137 +- Convert Commit dropdown to Vue. !56142 +- Enable the instance variables UI. !56255 +- Set the scope in search context from group issue and MR pages. !56383 +- Remove On-call Edit feature flag. !56445 +- Fix cop offenses for Style/HashTransformation in app directory. !56579 (Karthik Sivadas @karthik.sivadas) +- Fix cop offenses for Style/HashTransformation in ee directory. !56581 (Karthik Sivadas @karthik.sivadas) +- Fix cop offenses for Style/HashTransformation in lib directory. !56583 (Karthik Sivadas @karthik.sivadas) +- Fix cop offenses for Style/HashTransformation in spec directory. !56586 (Karthik Sivadas @karthik.sivadas) +- Track epic note created via usage ping. !56609 +- Aggregate code review metrics. !56734 +- Update android template to default branch. !56738 +- Stop using json-schema gem for production. !56745 +- Refactor docs and UI for Jaeger tracing. !56819 +- Add support for the MATERIALIZED keyword when using WITH (CTE) queries in PostgreSQL 12. !56976 +- Externalize project deploy keys (edit) strings. !57015 (Jonston Chan @JonstonChan) +- Migrates the expand button in MR reports to GitLab UI. !57021 +- Update GitLab Runner Helm Chart to 0.27.0. !57048 +- Remove unnecessary use of freeze. !57056 (Lee Tickett @leetickett) +- Remove unnecessary use of freeze. !57057 (Lee Tickett @leetickett) +- Remove unnecessary use of freeze. !57058 (Lee Tickett @leetickett) +- Remove unnecessary use of freeze. !57059 (Lee Tickett @leetickett) +- Remove unnecessary use of freeze. !57060 (Lee Tickett @leetickett) +- Remove the FF skip_dag_manual_and_delayed_jobs. !57086 +- Remove the FF ci_trigger_payload_into_pipeline. !57087 +- Updated documented K8s snippet to undeprecated API. !57100 (Raimund Hook (@stingrayza)) +- Validate NOT NULL constraint on gitlab_subscriptions namespace_id. !57113 +- Update button variants on the project boards controller to better align with the Pajamas Design System. !57129 +- Remove the recursive_namespace_lookup_as_inner_join feature flag. !57131 +- Only display focus mode button at md+ breakpoint and make it the tertiary style. !57139 +- Remove feature flag for customize homepage banner. !57147 +- Update issuable submit content order, button variants, and button alignment. !57172 +- Send invited users to sign up instead of sign in when possible. !57240 +- Updated UI text to match style guidelines. !57276 +- Enable RedundantFreeze Cop and Remove Remaining Offenses. !57288 (Lee Tickett @leetickett) +- Review and revise Integrations/Asana UI text. !57362 +- Add enqueueing of Onboarding Progress to the Invite Service. !57372 +- Validate foreign key on ServiceHooks. !57483 +- Removed migrate_delayed_project_removal feature flag. !57541 +- Migration to cleanup after partitioned web_hook_logs backfill. !57580 +- Update BulkImport default page size to 500 in order to process larger page of data. !57594 +- Refactor member/invitation services to share common code. !57618 +- Fix triggers page externalization. !57637 (Jonston Chan @JonstonChan) +- Add foreign key from web_hooks to groups. !57735 +- Remove batch_suggestions feature flag. !57745 +- Remove remove_resolve_note feature flag. !57757 +- Remove deprecated info button from issue list view. !57762 +- Track the different overflows for diff collections. !57790 +- Update Jira plugin UI copy. !57793 (Russell Dickenson rdickenson@gitlab.com) +- Rename table/model vulnerability_finding_fingerprints to *_signatures. !57840 +- Move to btn-confirm from btn-success in pipelines quotas page. !57861 (Yogi (@yo)) +- Remove records without group from webhooks table. !57863 +- Updated UI text to match style guidelines. !57884 +- Add a template for using Indeni Cloudrail in GitLab. !57919 +- Externalise-strings in _ip_limits.html.haml. !58003 (nuwe1) +- Externalise strings in application_settings/_pages.html.haml. !58011 (nuwe1) +- Externalize strings in _performance.html.haml. !58016 (nuwe1) +- Externalise strings in application_settings/_performance_bar.html.haml. !58018 (nuwe1) +- Externalise strings in /application_settings/_realtime.html.haml. !58039 (nuwe1) +- Externalise strings in _registry.html.haml. !58051 (nuwe1) +- Externalise strings in /application_settings/_repository_check.html.haml. !58058 (nuwe1) +- Update Design Management added design icon to be slightly smaller which conforms to the Pajamas design guide. !58086 (Andreas Resch @reschandreas) +- Externalise strings in admin/users/_head.html.haml. !58101 (nuwe1) +- Updating success button to confirm variant and reordering buttons per Pajamas Design System guidelines for buttons. !58112 +- Externalize strings in /abuse_reports/index.html.haml. !58132 (nuwe1) +- Use Gitlab::AppLogger in settings. !58134 (Huzaifa Iftikhar @huzaifaiftikhar) +- Fill in all placeholder values in the apply suggestion commit message placeholder text. !58136 +- Externalize strings in broadcast_messages/index.html.haml. !58146 (nuwe1) +- Externalize strings in deploy_keys/new.html.haml. !58148 (nuwe1) +- Externalize strings in hook_logs/_index.html.haml. !58155 (nuwe1) +- Externalize strings in projects/_projects.html.haml. !58158 (nuwe1) +- Externalize strings in projects/index.html.haml. !58160 (nuwe1) +- Externalize strings in services/index.html.haml. !58167 (nuwe1) +- Externalise strings in runners/_runner.html.haml. !58168 (nuwe1) +- Externalise strings in spam_logs/_spam_log.html.haml. !58169 (nuwe1) +- Fix EmptyLineAfterFinalLetItBe Rubocop offenses for projects controller. !58176 (Huzaifa Iftikhar @huzaifaiftikhar) +- Externalize strings in _confirmation_instructions_account.html.haml. !58214 (nuwe1) +- Externalize strings in _confirmation_instructions_account.text.erb. !58215 (nuwe1) +- Externalize strings in _confirmation_instructions_secondary.text.erb. !58218 (nuwe1) +- Externalise strings in password_change files. !58219 (nuwe1) +- Externalize strings in unlock_instructions.html.haml. !58227 (nuwe1) +- Externalize strings in passwords/edit.html.haml. !58233 (nuwe1) +- Externalize strings in passwords/new.html.haml. !58236 (nuwe1) +- Externalize strings in sessions/_new_ldap.html.haml. !58267 (nuwe1) +- Externalize strings in registrations/edit.html.erb. !58268 (nuwe1) +- Externalize strings in sessions/_new_crowd.html.haml. !58269 (nuwe1) +- Externalise strings in sessions/new.html.haml. !58274 (nuwe1) +- Externalize strings in sessions/two_factor.html.haml. !58275 (nuwe1) +- Externalize strings in shared/_omniauth_box.html.haml. !58281 (nuwe1) +- Externalize strings in shared/_sign_in_link.html.haml. !58283 (nuwe1) +- Externalise strings in shared/_tabs_ldap.html.haml. !58285 (nuwe1) +- Externalize strings in unlocks/new.html.haml. !58289 (nuwe1) +- Externalise strings in labels/edit.html.haml. !58294 (nuwe1) +- Externalize strings in milestones/_form.html.haml. !58298 (nuwe1) +- Externalize strings in milestones/edit.html.haml. !58306 (nuwe1) +- Externalise strings in runners/edit.html.haml. !58315 (nuwe1) +- Externalise strings in groups/_activities.html.haml. !58324 (nuwe1) +- Externalize strings in groups/_create_chat_team.html.haml. !58328 (nuwe1) +- Externalise strings in groups/_group_admin_settings.html.haml. !58331 (nuwe1) +- Externalises strings in groups/activity.html.haml. !58332 (nuwe1) +- Update pipeline email service UI text. !58377 +- Update pot file. !58392 +- Updated UI text for Assembla integration to match style guidelines. !58400 +- Externalize strings in instance_configuration/_gitlab_ci.html.haml. !58435 (nuwe1) +- Externalize strings in instance_configuration/_gitlab_pages.html.haml. !58437 (nuwe1) +- Externalize strings in help/index.html.haml. !58441 (nuwe1) +- Externalize strings in instance_configuration.html.haml. !58443 (nuwe1) +- Externalize strings in chat_names/_chat_name.html.haml. !58444 (nuwe1) +- Externalizes strings in viewers/_empty.html.haml. !58451 (nuwe1) +- Externalize strings in viewers/_loading_auxiliary.html.haml. !58454 (nuwe1) +- Review and revise Pages settings-related UI text. !58479 +- Updated Alert integration UI text to match style guidelines. !58507 +- If creating a new issue fails in boards, remove the issue card from a list. !58558 +- Enable Layout/SpaceAfterColon cop for HAML. !58564 (Takuya Noguchi) +- Update mattermost integration UI text. !58570 +- Update Emails on push UI Text to match style guidelines. !58597 +- Updated outdated UI text and docs. !58600 +- Update UI text of Jenkins integration. !58623 +- Track total_tuple_count for batched migrations. !58675 +- Update Project Management metrics definitions. !58710 +- Add correlation id in X-Request-ID for external pipeline validation. !58741 +- Update UI text from timing to Duration. !58838 +- Update Discord integration UI text. !58842 +- Update UI text for slack notifications integration. !58845 +- Review and revise Redmine Integration UI text. !58899 +- Bump devise-two-factor version. !58929 +- Update metric definition under verify testing group. !59028 +- Remove issue_perform_after_creation_tasks_async feature flag. !59042 +- Obtain pipeline validation service token from config not ENV. !59101 +- Bump rspec-rails to 4.1.2. !59130 +- Add index services on project and type where inherit is null. !59168 +- Replace deprecated skeleton loader in the user popover with slightly darker SVG based skelton loader. !59180 +- Bump rspec-rails to 5.0.1. !59194 +- Update drone integration UI text. !59231 +- Add index on (created_at, web_hook_id) to the partitioned web_hook_logs. !59261 +- Add index on web_hook_id to partitioned web_hook_logs. !59266 +- Add a foreign key from the partitioned web_hook_logs to web_hooks. !59282 +- Bump minimum required Go version for workhorse to 1.15. !59347 +- Update UI text for TeamCity integration. !59493 +- Remove redundant index from epics. !59494 +- Externalize strings in labels/new.html.haml. (nuwe1) + + ## 13.10.3 (2021-04-13) ### Security (3 changes) @@ -583,6 +1399,43 @@ entry. - Convert mattermost alert to pajamas. !56556 +## 13.9.6 (2021-04-13) + +### Security (2 changes) + +- Clean only legitimate JPG and TIFF files. +- Update ruby-saml and rexml gems. + + +## 13.9.5 (2021-03-31) + +### Security (6 changes) + +- Leave pool repository on fork unlinking. +- Fixed XSS in merge requests sidebar. +- Fix arbitrary read/write in AsciiDoctor and Kroki gems. +- Prevent infinite loop when checking if collaboration is allowed. +- Disable arbitrary URI and file reads in JSON validator. +- Require POST request to trigger system hooks. + +### Removed (1 change) + +- Make HipChat project service do nothing. !57434 + +### Other (3 changes) + +- Remove direct mimemagic dependency. !57387 +- Refactor MimeMagic calls to new MimeType class. !57421 +- Switch to using a fake mimemagic gem. !57443 + + +## 13.9.4 (2021-03-17) + +### Security (1 change) + +- Patch Kramdown syntax highlighter gem. + + ## 13.9.3 (2021-03-08) ### Fixed (4 changes) @@ -1191,6 +2044,42 @@ entry. - Apply new GitLab UI for buttons in pipeline schedules. +## 13.8.8 (2021-04-13) + +### Security (2 changes) + +- Clean only legitimate JPG and TIFF files. +- Update ruby-saml and rexml gems. + + +## 13.8.7 (2021-03-31) + +### Security (5 changes) + +- Fixed XSS in merge requests sidebar. +- Leave pool repository on fork unlinking. +- Fix arbitrary read/write in AsciiDoctor and Kroki gems. +- Prevent infinite loop when checking if collaboration is allowed. +- Require POST request to trigger system hooks. + +### Removed (1 change) + +- Make HipChat project service do nothing. !57434 + +### Other (3 changes) + +- Remove direct mimemagic dependency. !57387 +- Refactor MimeMagic calls to new MimeType class. !57421 +- Switch to using a fake mimemagic gem. !57443 + + +## 13.8.6 (2021-03-17) + +### Security (1 change) + +- Patch Kramdown syntax highlighter gem. + + ## 13.8.5 (2021-03-04) ### Security (6 changes) @@ -1603,6 +2492,13 @@ entry. - Add verbiage + link sast to show it's in core. !51935 +## 13.7.9 (2021-03-17) + +### Security (1 change) + +- Patch Kramdown syntax highlighter gem. + + ## 13.7.8 (2021-03-04) ### Security (5 changes) diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 402deed307..07ae670e11 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -13.10.4 \ No newline at end of file +13.11.2 \ No newline at end of file diff --git a/GITLAB_KAS_VERSION b/GITLAB_KAS_VERSION index 8ba26053a6..f35ba50998 100644 --- a/GITLAB_KAS_VERSION +++ b/GITLAB_KAS_VERSION @@ -1 +1 @@ -13.9.1 +13.11.1 diff --git a/GITLAB_PAGES_VERSION b/GITLAB_PAGES_VERSION index 39fc130ef8..ebeef2f2d6 100644 --- a/GITLAB_PAGES_VERSION +++ b/GITLAB_PAGES_VERSION @@ -1 +1 @@ -1.36.0 +1.38.0 diff --git a/Gemfile b/Gemfile index ab8e7cc3b9..876bcfaabf 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' -gem 'rails', '~> 6.0.3.1' +gem 'rails', '~> 6.0.3.6' gem 'bootsnap', '~> 1.4.6' @@ -61,7 +61,7 @@ gem 'akismet', '~> 3.0' gem 'invisible_captcha', '~> 1.1.0' # Two-factor authentication -gem 'devise-two-factor', '~> 3.1.0' +gem 'devise-two-factor', '~> 4.0.0' gem 'rqrcode-rails3', '~> 0.1.7' gem 'attr_encrypted', '~> 3.1.0' gem 'u2f', '~> 0.2.1' @@ -110,7 +110,7 @@ gem 'hashie-forbidden_attributes' gem 'kaminari', '~> 1.0' # HAML -gem 'hamlit', '~> 2.14.4' +gem 'hamlit', '~> 2.15.0' # Files attachments gem 'carrierwave', '~> 1.3' @@ -152,7 +152,7 @@ gem 'deckar01-task_list', '2.3.1' gem 'gitlab-markup', '~> 1.7.1' gem 'github-markup', '~> 1.7.0', require: 'github/markup' gem 'commonmarker', '~> 0.21' -gem 'kramdown', '~> 2.3.0' +gem 'kramdown', '~> 2.3.1' gem 'RedCloth', '~> 4.3.2' gem 'rdoc', '~> 6.1.2' gem 'org-ruby', '~> 0.9.12' @@ -200,7 +200,7 @@ gem 'acts-as-taggable-on', '~> 7.0' gem 'sidekiq', '~> 5.2.7' gem 'sidekiq-cron', '~> 1.0' gem 'redis-namespace', '~> 1.7.0' -gem 'gitlab-sidekiq-fetcher', '0.5.5', require: 'sidekiq-reliable-fetch' +gem 'gitlab-sidekiq-fetcher', '0.5.6', require: 'sidekiq-reliable-fetch' # Cron Parser gem 'fugit', '~> 1.2.1' @@ -276,10 +276,7 @@ gem 'licensee', '~> 9.14.1' gem 'charlock_holmes', '~> 0.7.7' # Detect mime content type from content -gem 'ruby-magic-static', '~> 0.3.4' - -# Fake version of the gem to trick bundler -gem 'mimemagic', '0.3.7', path: 'vendor/shims/mimemagic', require: false +gem 'ruby-magic', '~> 0.4' # Faster blank gem 'fast_blank' @@ -296,11 +293,11 @@ gem 'terser', '1.0.2' gem 'addressable', '~> 2.7' gem 'gemojione', '~> 3.3' -gem 'gon', '~> 6.2' +gem 'gon', '~> 6.4.0' gem 'request_store', '~> 1.5' gem 'base32', '~> 0.3.0' -gem "gitlab-license", "~> 1.3" +gem "gitlab-license", "~> 1.4" # Protect against bruteforcing gem 'rack-attack', '~> 6.3.0' @@ -314,7 +311,7 @@ gem 'pg_query', '~> 1.3.0' gem 'premailer-rails', '~> 1.10.3' # LabKit: Tracing and Correlation -gem 'gitlab-labkit', '~> 0.16.1' +gem 'gitlab-labkit', '~> 0.16.2' # Thrift is a dependency of gitlab-labkit, we want a version higher than 0.14.0 # because of https://gitlab.com/gitlab-org/gitlab/-/issues/321900 gem 'thrift', '>= 0.14.0' @@ -345,13 +342,12 @@ group :metrics do end group :development do - gem 'brakeman', '~> 4.2', require: false - gem 'lefthook', '~> 0.7', require: false + gem 'lefthook', '~> 0.7.0', require: false - gem 'letter_opener_web', '~> 1.3.4' + gem 'letter_opener_web', '~> 1.4.0' # Better errors handler - gem 'better_errors', '~> 2.7.1' + gem 'better_errors', '~> 2.9.0' # thin instead webrick gem 'thin', '~> 1.8.0' @@ -368,7 +364,7 @@ group :development, :test do gem 'database_cleaner', '~> 1.7.0' gem 'factory_bot_rails', '~> 6.1.0' - gem 'rspec-rails', '~> 4.0.2' + gem 'rspec-rails', '~> 5.0.1' # Prevent occasions where minitest is not bundled in packaged versions of ruby (see #3826) gem 'minitest', '~> 5.11.0' @@ -379,14 +375,14 @@ group :development, :test do gem 'spring', '~> 2.1.0' gem 'spring-commands-rspec', '~> 1.0.4' - gem 'gitlab-styles', '~> 6.1.0', require: false + gem 'gitlab-styles', '~> 6.2.0', require: false gem 'haml_lint', '~> 0.36.0', require: false gem 'bundler-audit', '~> 0.7.0.1', require: false gem 'benchmark-ips', '~> 2.3.0', require: false - gem 'knapsack', '~> 1.17' + gem 'knapsack', '~> 1.21.1' gem 'crystalball', '~> 0.7.0', require: false gem 'simple_po_parser', '~> 1.1.2', require: false @@ -398,11 +394,12 @@ group :development, :test do gem 'parallel', '~> 1.19', require: false gem 'rblineprof', '~> 0.3.6', platform: :mri, require: false + + gem 'test_file_finder', '~> 0.1.3' end group :development, :test, :danger do - gem 'danger-gitlab', '~> 8.0', require: false - gem 'gitlab-dangerfiles', '~> 0.8.0', require: false + gem 'gitlab-dangerfiles', '~> 1.1.1', require: false end group :development, :test, :coverage do @@ -416,6 +413,7 @@ group :development, :test, :omnibus do end group :test do + gem 'json-schema', '~> 2.8.0' gem 'fuubar', '~> 2.2.0' gem 'rspec-retry', '~> 0.6.1' gem 'rspec_profiling', '~> 0.0.6' @@ -477,11 +475,11 @@ group :ed25519 do end # Gitaly GRPC protocol definitions -gem 'gitaly', '~> 13.9.0.pre.rc1' +gem 'gitaly', '~> 13.11.0.pre.rc1' gem 'grpc', '~> 1.30.2' -gem 'google-protobuf', '~> 3.12' +gem 'google-protobuf', '~> 3.14.0' gem 'toml-rb', '~> 1.0.0' @@ -490,7 +488,7 @@ gem 'flipper', '~> 0.17.1' gem 'flipper-active_record', '~> 0.17.1' gem 'flipper-active_support_cache_store', '~> 0.17.1' gem 'unleash', '~> 0.1.5' -gem 'gitlab-experiment', '~> 0.5.0' +gem 'gitlab-experiment', '~> 0.5.3' # Structured logging gem 'lograge', '~> 0.5' @@ -513,16 +511,16 @@ gem 'erubi', '~> 1.9.0' # Monkey-patched in `config/initializers/mail_encoding_patch.rb` # See https://gitlab.com/gitlab-org/gitlab/issues/197386 gem 'mail', '= 2.7.1' +gem 'mail-smtp_pool', '~> 0.1.0', path: 'vendor/gems/mail-smtp_pool', require: false # File encryption -gem 'lockbox', '~> 0.3.3' +gem 'lockbox', '~> 0.6.2' # Email validation gem 'valid_email', '~> 0.1' # JSON gem 'json', '~> 2.3.0' -gem 'json-schema', '~> 2.8.0' gem 'json_schemer', '~> 0.2.12' gem 'oj', '~> 3.10.6' gem 'multi_json', '~> 1.14.1' diff --git a/Gemfile.lock b/Gemfile.lock index b5bbd5a61d..007ca87b46 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,9 @@ PATH - remote: vendor/shims/mimemagic + remote: vendor/gems/mail-smtp_pool specs: - mimemagic (0.3.7) + mail-smtp_pool (0.1.0) + connection_pool (~> 2.0) + mail (~> 2.7) GEM remote: https://rubygems.org/ @@ -10,59 +12,59 @@ GEM abstract_type (0.0.7) acme-client (2.0.6) faraday (>= 0.17, < 2.0.0) - actioncable (6.0.3.4) - actionpack (= 6.0.3.4) + actioncable (6.0.3.6) + actionpack (= 6.0.3.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.3.4) - actionpack (= 6.0.3.4) - activejob (= 6.0.3.4) - activerecord (= 6.0.3.4) - activestorage (= 6.0.3.4) - activesupport (= 6.0.3.4) + actionmailbox (6.0.3.6) + actionpack (= 6.0.3.6) + activejob (= 6.0.3.6) + activerecord (= 6.0.3.6) + activestorage (= 6.0.3.6) + activesupport (= 6.0.3.6) mail (>= 2.7.1) - actionmailer (6.0.3.4) - actionpack (= 6.0.3.4) - actionview (= 6.0.3.4) - activejob (= 6.0.3.4) + actionmailer (6.0.3.6) + actionpack (= 6.0.3.6) + actionview (= 6.0.3.6) + activejob (= 6.0.3.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.3.4) - actionview (= 6.0.3.4) - activesupport (= 6.0.3.4) + actionpack (6.0.3.6) + actionview (= 6.0.3.6) + activesupport (= 6.0.3.6) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.3.4) - actionpack (= 6.0.3.4) - activerecord (= 6.0.3.4) - activestorage (= 6.0.3.4) - activesupport (= 6.0.3.4) + actiontext (6.0.3.6) + actionpack (= 6.0.3.6) + activerecord (= 6.0.3.6) + activestorage (= 6.0.3.6) + activesupport (= 6.0.3.6) nokogiri (>= 1.8.5) - actionview (6.0.3.4) - activesupport (= 6.0.3.4) + actionview (6.0.3.6) + activesupport (= 6.0.3.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.0.3.4) - activesupport (= 6.0.3.4) + activejob (6.0.3.6) + activesupport (= 6.0.3.6) globalid (>= 0.3.6) - activemodel (6.0.3.4) - activesupport (= 6.0.3.4) - activerecord (6.0.3.4) - activemodel (= 6.0.3.4) - activesupport (= 6.0.3.4) + activemodel (6.0.3.6) + activesupport (= 6.0.3.6) + activerecord (6.0.3.6) + activemodel (= 6.0.3.6) + activesupport (= 6.0.3.6) activerecord-explain-analyze (0.1.0) activerecord (>= 4) pg - activestorage (6.0.3.4) - actionpack (= 6.0.3.4) - activejob (= 6.0.3.4) - activerecord (= 6.0.3.4) - marcel (~> 0.3.1) - activesupport (6.0.3.4) + activestorage (6.0.3.6) + actionpack (= 6.0.3.6) + activejob (= 6.0.3.6) + activerecord (= 6.0.3.6) + marcel (~> 1.0.0) + activesupport (6.0.3.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -138,7 +140,7 @@ GEM benchmark-ips (2.3.0) benchmark-memory (0.1.2) memory_profiler (~> 0.9) - better_errors (2.7.1) + better_errors (2.9.1) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) @@ -149,7 +151,6 @@ GEM bootstrap_form (4.2.0) actionpack (>= 5.0) activemodel (>= 5.0) - brakeman (4.2.1) browser (4.2.0) builder (3.2.4) bullet (6.1.3) @@ -265,12 +266,12 @@ GEM railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-two-factor (3.1.0) - activesupport (< 6.1) + devise-two-factor (4.0.0) + activesupport (< 6.2) attr_encrypted (>= 1.3, < 4, != 2) devise (~> 4.0) - railties (< 6.1) - rotp (~> 2.0) + railties (< 6.2) + rotp (~> 6.0) diff-lcs (1.4.4) diff_match_patch (0.1.0) diffy (3.3.0) @@ -434,7 +435,7 @@ GEM rails (>= 3.2.0) git (1.7.0) rchardet (~> 1.8) - gitaly (13.9.0.pre.rc1) + gitaly (13.11.0.pre.rc1) grpc (~> 1.0) github-markup (1.7.0) gitlab (4.16.1) @@ -442,11 +443,11 @@ GEM terminal-table (~> 1.5, >= 1.5.1) gitlab-chronic (0.10.5) numerizer (~> 0.2) - gitlab-dangerfiles (0.8.0) - danger - gitlab-experiment (0.5.0) + gitlab-dangerfiles (1.1.1) + danger-gitlab + gitlab-experiment (0.5.3) activesupport (>= 3.0) - scientist (~> 1.5, >= 1.5.0) + scientist (~> 1.6, >= 1.6.0) gitlab-fog-azure-rm (1.0.1) azure-storage-blob (~> 2.0) azure-storage-common (~> 2.0) @@ -461,7 +462,7 @@ GEM fog-xml (~> 0.1.0) google-api-client (>= 0.44.2, < 0.51) google-cloud-env (~> 1.2) - gitlab-labkit (0.16.1) + gitlab-labkit (0.16.2) actionpack (>= 5.0.0, < 7.0.0) activesupport (>= 5.0.0, < 7.0.0) grpc (~> 1.19) @@ -469,16 +470,16 @@ GEM opentracing (~> 0.4) pg_query (~> 1.3) redis (> 3.0.0, < 5.0.0) - gitlab-license (1.3.1) + gitlab-license (1.4.0) gitlab-mail_room (0.0.9) gitlab-markup (1.7.1) gitlab-net-dns (0.9.1) gitlab-pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) - gitlab-sidekiq-fetcher (0.5.5) + gitlab-sidekiq-fetcher (0.5.6) sidekiq (~> 5) - gitlab-styles (6.1.0) + gitlab-styles (6.2.0) rubocop (~> 0.91, >= 0.91.1) rubocop-gitlab-security (~> 0.1.1) rubocop-performance (~> 1.9.2) @@ -493,8 +494,9 @@ GEM rubyntlm (~> 0.5) globalid (0.4.2) activesupport (>= 4.2.0) - gon (6.2.0) - actionpack (>= 3.0) + gon (6.4.0) + actionpack (>= 3.0.20) + i18n (>= 0.7) multi_json request_store (>= 1.0) google-api-client (0.50.0) @@ -508,7 +510,7 @@ GEM signet (~> 0.12) google-cloud-env (1.4.0) faraday (>= 0.17.3, < 2.0) - google-protobuf (3.12.4) + google-protobuf (3.14.0) googleapis-common-protos-types (1.0.5) google-protobuf (~> 3.11) googleauth (0.14.0) @@ -585,7 +587,7 @@ GEM rainbow rubocop (>= 0.50.0) sysexits (~> 1.1) - hamlit (2.14.4) + hamlit (2.15.0) temple (>= 0.8.2) thor tilt @@ -620,7 +622,7 @@ GEM mime-types (~> 3.0) multi_xml (>= 0.5.2) httpclient (2.8.3) - i18n (1.8.9) + i18n (1.8.10) concurrent-ruby (~> 1.0) i18n_data (0.8.0) icalendar (2.4.1) @@ -646,7 +648,7 @@ GEM activesupport (>= 4.2) aes_key_wrap bindata - json-schema (2.8.0) + json-schema (2.8.1) addressable (>= 2.4) json_schemer (0.2.12) ecma-re-validator (~> 0.2) @@ -670,9 +672,9 @@ GEM kaminari-core (= 1.2.1) kaminari-core (1.2.1) kgio (2.11.3) - knapsack (1.17.0) + knapsack (1.21.1) rake - kramdown (2.3.0) + kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) @@ -681,12 +683,12 @@ GEM jsonpath (~> 1.0) recursive-open-struct (~> 1.1, >= 1.1.1) rest-client (~> 2.0) - launchy (2.4.3) - addressable (~> 2.3) + launchy (2.5.0) + addressable (~> 2.7) lefthook (0.7.2) letter_opener (1.7.0) launchy (~> 2.2) - letter_opener_web (1.3.4) + letter_opener_web (1.4.0) actionmailer (>= 3.2) letter_opener (~> 1.0) railties (>= 3.2) @@ -708,21 +710,20 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) locale (2.1.3) - lockbox (0.3.3) + lockbox (0.6.2) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.8.0) + loofah (2.9.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) lru_redux (1.1.0) lumberjack (1.2.7) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.1) marginalia (1.10.0) actionpack (>= 2.3) activerecord (>= 2.3) @@ -736,7 +737,7 @@ GEM mime-types-data (3.2020.0512) mini_histogram (0.3.1) mini_magick (4.10.1) - mini_mime (1.0.2) + mini_mime (1.1.0) mini_portile2 (2.5.0) minitest (5.11.3) mixlib-cli (2.1.8) @@ -775,7 +776,7 @@ GEM netrc (0.11.0) nio4r (2.5.4) no_proxy_fix (0.1.2) - nokogiri (1.11.1) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) nokogumbo (2.0.2) @@ -954,20 +955,20 @@ GEM rack-test (1.1.0) rack (>= 1.0, < 3) rack-timeout (0.5.2) - rails (6.0.3.4) - actioncable (= 6.0.3.4) - actionmailbox (= 6.0.3.4) - actionmailer (= 6.0.3.4) - actionpack (= 6.0.3.4) - actiontext (= 6.0.3.4) - actionview (= 6.0.3.4) - activejob (= 6.0.3.4) - activemodel (= 6.0.3.4) - activerecord (= 6.0.3.4) - activestorage (= 6.0.3.4) - activesupport (= 6.0.3.4) + rails (6.0.3.6) + actioncable (= 6.0.3.6) + actionmailbox (= 6.0.3.6) + actionmailer (= 6.0.3.6) + actionpack (= 6.0.3.6) + actiontext (= 6.0.3.6) + actionview (= 6.0.3.6) + activejob (= 6.0.3.6) + activemodel (= 6.0.3.6) + activerecord (= 6.0.3.6) + activestorage (= 6.0.3.6) + activesupport (= 6.0.3.6) bundler (>= 1.3.0) - railties (= 6.0.3.4) + railties (= 6.0.3.6) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -981,9 +982,9 @@ GEM rails-i18n (6.0.0) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 7) - railties (6.0.3.4) - actionpack (= 6.0.3.4) - activesupport (= 6.0.3.4) + railties (6.0.3.6) + actionpack (= 6.0.3.6) + activesupport (= 6.0.3.6) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -1045,7 +1046,7 @@ GEM nokogiri rexml (3.2.5) rinku (2.0.0) - rotp (2.1.2) + rotp (6.2.0) rouge (3.26.0) rqrcode (0.7.0) chunky_png @@ -1069,10 +1070,10 @@ GEM proc_to_ast rspec (>= 2.13, < 4) unparser - rspec-rails (4.0.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) + rspec-rails (5.0.1) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) rspec-core (~> 3.10) rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) @@ -1114,7 +1115,8 @@ GEM i18n ruby-fogbugz (0.2.1) crack (~> 0.4) - ruby-magic-static (0.3.4) + ruby-magic (0.4.0) + mini_portile2 (~> 2.5.0) ruby-prof (1.3.1) ruby-progressbar (1.11.0) ruby-saml (1.12.1) @@ -1226,6 +1228,8 @@ GEM terser (1.0.2) execjs (>= 0.3.0, < 3) test-prof (0.12.0) + test_file_finder (0.1.3) + faraday (~> 1.0.1) text (1.3.1) thin (1.8.0) daemons (~> 1.0, >= 1.0.9) @@ -1363,10 +1367,9 @@ DEPENDENCIES bcrypt_pbkdf (~> 1.0) benchmark-ips (~> 2.3.0) benchmark-memory (~> 0.1) - better_errors (~> 2.7.1) + better_errors (~> 2.9.0) bootsnap (~> 1.4.6) bootstrap_form (~> 4.2.0) - brakeman (~> 4.2) browser (~> 4.2) bullet (~> 6.1.3) bundler-audit (~> 0.7.0.1) @@ -1380,7 +1383,6 @@ DEPENDENCIES countries (~> 3.0) creole (~> 0.5.0) crystalball (~> 0.7.0) - danger-gitlab (~> 8.0) database_cleaner (~> 1.7.0) deckar01-task_list (= 2.3.1) default_value_for (~> 3.4.0) @@ -1388,7 +1390,7 @@ DEPENDENCIES derailed_benchmarks device_detector devise (~> 4.7.2) - devise-two-factor (~> 3.1.0) + devise-two-factor (~> 4.0.0) diff_match_patch (~> 0.1.0) diffy (~> 3.3) discordrb-webhooks (~> 3.4) @@ -1423,26 +1425,26 @@ DEPENDENCIES gettext (~> 3.3) gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails_js (~> 1.3) - gitaly (~> 13.9.0.pre.rc1) + gitaly (~> 13.11.0.pre.rc1) github-markup (~> 1.7.0) gitlab-chronic (~> 0.10.5) - gitlab-dangerfiles (~> 0.8.0) - gitlab-experiment (~> 0.5.0) + gitlab-dangerfiles (~> 1.1.1) + gitlab-experiment (~> 0.5.3) gitlab-fog-azure-rm (~> 1.0.1) gitlab-fog-google (~> 1.13) - gitlab-labkit (~> 0.16.1) - gitlab-license (~> 1.3) + gitlab-labkit (~> 0.16.2) + gitlab-license (~> 1.4) gitlab-mail_room (~> 0.0.9) gitlab-markup (~> 1.7.1) gitlab-net-dns (~> 0.9.1) gitlab-pry-byebug - gitlab-sidekiq-fetcher (= 0.5.5) - gitlab-styles (~> 6.1.0) + gitlab-sidekiq-fetcher (= 0.5.6) + gitlab-styles (~> 6.2.0) gitlab_chronic_duration (~> 0.10.6.2) gitlab_omniauth-ldap (~> 2.1.1) - gon (~> 6.2) + gon (~> 6.4.0) google-api-client (~> 0.33) - google-protobuf (~> 3.12) + google-protobuf (~> 3.14.0) gpgme (~> 2.0.19) grape (~> 1.5.2) grape-entity (~> 0.7.1) @@ -1456,7 +1458,7 @@ DEPENDENCIES gssapi guard-rspec haml_lint (~> 0.36.0) - hamlit (~> 2.14.4) + hamlit (~> 2.15.0) hangouts-chat (~> 0.0.5) hashie hashie-forbidden_attributes @@ -1474,22 +1476,22 @@ DEPENDENCIES json_schemer (~> 0.2.12) jwt (~> 2.1.0) kaminari (~> 1.0) - knapsack (~> 1.17) - kramdown (~> 2.3.0) + knapsack (~> 1.21.1) + kramdown (~> 2.3.1) kubeclient (~> 4.9.1) - lefthook (~> 0.7) - letter_opener_web (~> 1.3.4) + lefthook (~> 0.7.0) + letter_opener_web (~> 1.4.0) license_finder (~> 6.0) licensee (~> 9.14.1) - lockbox (~> 0.3.3) + lockbox (~> 0.6.2) lograge (~> 0.5) loofah (~> 2.2) lru_redux mail (= 2.7.1) + mail-smtp_pool (~> 0.1.0)! marginalia (~> 1.10.0) memory_profiler (~> 0.9) method_source (~> 1.0) - mimemagic (= 0.3.7)! mini_magick (~> 4.10.1) minitest (~> 5.11.0) multi_json (~> 1.14.1) @@ -1539,7 +1541,7 @@ DEPENDENCIES rack-oauth2 (~> 1.16.0) rack-proxy (~> 0.6.0) rack-timeout (~> 0.5.1) - rails (~> 6.0.3.1) + rails (~> 6.0.3.6) rails-controller-testing rails-i18n (~> 6.0) rainbow (~> 3.0) @@ -1559,12 +1561,12 @@ DEPENDENCIES rouge (~> 3.26.0) rqrcode-rails3 (~> 0.1.7) rspec-parameterized - rspec-rails (~> 4.0.2) + rspec-rails (~> 5.0.1) rspec-retry (~> 0.6.1) rspec_junit_formatter rspec_profiling (~> 0.0.6) ruby-fogbugz (~> 0.2.1) - ruby-magic-static (~> 0.3.4) + ruby-magic (~> 0.4) ruby-prof (~> 1.3.0) ruby-progressbar (~> 1.10) ruby-saml (~> 1.12.1) @@ -1594,6 +1596,7 @@ DEPENDENCIES sys-filesystem (~> 1.1.6) terser (= 1.0.2) test-prof (~> 0.12.0) + test_file_finder (~> 0.1.3) thin (~> 1.8.0) thrift (>= 0.14.0) timecop (~> 0.9.1) diff --git a/README.md b/README.md index e3712d3f9f..63c9570474 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ GitLab is a Ruby on Rails application that runs on the following software: - Ubuntu/Debian/CentOS/RHEL/OpenSUSE - Ruby (MRI) 2.7.2 -- Git 2.24+ +- Git 2.31+ - Redis 4.0+ - PostgreSQL 11+ diff --git a/Rakefile b/Rakefile index 445542e5c0..eb2f158972 100755 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,8 @@ # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. +Rake::TaskManager.record_task_metadata = true + require File.expand_path('config/application', __dir__) relative_url_conf = File.expand_path('config/initializers/relative_url', __dir__) diff --git a/VERSION b/VERSION index 402deed307..07ae670e11 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -13.10.4 \ No newline at end of file +13.11.2 \ No newline at end of file diff --git a/app/assets/images/learn_gitlab/issue_created.svg b/app/assets/images/learn_gitlab/issue_created.svg new file mode 100644 index 0000000000..01652b97fc --- /dev/null +++ b/app/assets/images/learn_gitlab/issue_created.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/images/learn_gitlab/section_deploy.svg b/app/assets/images/learn_gitlab/section_deploy.svg new file mode 100644 index 0000000000..187956a66d --- /dev/null +++ b/app/assets/images/learn_gitlab/section_deploy.svg @@ -0,0 +1,16 @@ + + + + Group + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/images/learn_gitlab/section_plan.svg b/app/assets/images/learn_gitlab/section_plan.svg new file mode 100644 index 0000000000..2348e837e5 --- /dev/null +++ b/app/assets/images/learn_gitlab/section_plan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/learn_gitlab/section_workspace.svg b/app/assets/images/learn_gitlab/section_workspace.svg new file mode 100644 index 0000000000..5cb7fd36dd --- /dev/null +++ b/app/assets/images/learn_gitlab/section_workspace.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/javascripts/access_tokens/index.js b/app/assets/javascripts/access_tokens/index.js index 43d56295f7..7f5f0403de 100644 --- a/app/assets/javascripts/access_tokens/index.js +++ b/app/assets/javascripts/access_tokens/index.js @@ -1,20 +1,10 @@ import Vue from 'vue'; import createFlash from '~/flash'; +import { parseRailsFormFields } from '~/lib/utils/forms'; import { __ } from '~/locale'; import ExpiresAtField from './components/expires_at_field.vue'; -const getInputAttrs = (el) => { - const input = el.querySelector('input'); - - return { - id: input.id, - name: input.name, - value: input.value, - placeholder: input.placeholder, - }; -}; - export const initExpiresAtField = () => { const el = document.querySelector('.js-access-tokens-expires-at'); @@ -22,7 +12,7 @@ export const initExpiresAtField = () => { return null; } - const inputAttrs = getInputAttrs(el); + const { expiresAt: inputAttrs } = parseRailsFormFields(el); return new Vue({ el, @@ -43,7 +33,7 @@ export const initProjectsField = () => { return null; } - const inputAttrs = getInputAttrs(el); + const { projects: inputAttrs } = parseRailsFormFields(el); if (window.gon.features.personalAccessTokensScopedToProjects) { return new Promise((resolve) => { diff --git a/app/assets/javascripts/activities.js b/app/assets/javascripts/activities.js index 5064d9ee2d..b671d038ce 100644 --- a/app/assets/javascripts/activities.js +++ b/app/assets/javascripts/activities.js @@ -2,14 +2,20 @@ import $ from 'jquery'; import Cookies from 'js-cookie'; +import createFlash from '~/flash'; +import { s__ } from '~/locale'; import { localTimeAgo } from './lib/utils/datetime_utility'; import Pager from './pager'; export default class Activities { - constructor(container = '') { - this.container = container; + constructor(containerSelector = '') { + this.containerSelector = containerSelector; + this.containerEl = this.containerSelector + ? document.querySelector(this.containerSelector) + : undefined; + this.$contentList = $('.content_list'); - Pager.init(20, true, false, (data) => data, this.updateTooltips, this.container); + this.loadActivities(); $('.event-filter-link').on('click', (e) => { e.preventDefault(); @@ -18,13 +24,30 @@ export default class Activities { }); } + loadActivities() { + Pager.init({ + limit: 20, + preload: true, + prepareData: (data) => data, + successCallback: () => this.updateTooltips(), + errorCallback: () => + createFlash({ + message: s__( + 'Activity|An error occured while retrieving activity. Reload the page to try again.', + ), + parent: this.containerEl, + }), + container: this.containerSelector, + }); + } + updateTooltips() { localTimeAgo($('.js-timeago', '.content_list')); } reloadActivities() { - $('.content_list').html(''); - Pager.init(20, true, false, (data) => data, this.updateTooltips, this.container); + this.$contentList.html(''); + this.loadActivities(); } toggleFilter(sender) { diff --git a/app/assets/javascripts/admin/statistics_panel/constants.js b/app/assets/javascripts/admin/statistics_panel/constants.js index 2dce19a389..de413b2e7f 100644 --- a/app/assets/javascripts/admin/statistics_panel/constants.js +++ b/app/assets/javascripts/admin/statistics_panel/constants.js @@ -3,7 +3,7 @@ import { s__ } from '~/locale'; const statisticsLabels = { forks: s__('AdminStatistics|Forks'), issues: s__('AdminStatistics|Issues'), - mergeRequests: s__('AdminStatistics|Merge Requests'), + mergeRequests: s__('AdminStatistics|Merge requests'), notes: s__('AdminStatistics|Notes'), snippets: s__('AdminStatistics|Snippets'), sshKeys: s__('AdminStatistics|SSH Keys'), diff --git a/app/assets/javascripts/admin/users/components/users_table.vue b/app/assets/javascripts/admin/users/components/users_table.vue index 8962068601..8b41a063ab 100644 --- a/app/assets/javascripts/admin/users/components/users_table.vue +++ b/app/assets/javascripts/admin/users/components/users_table.vue @@ -1,9 +1,9 @@ diff --git a/app/assets/javascripts/alerts_settings/constants.js b/app/assets/javascripts/alerts_settings/constants.js index ce6cf61b5d..4a180ed2bc 100644 --- a/app/assets/javascripts/alerts_settings/constants.js +++ b/app/assets/javascripts/alerts_settings/constants.js @@ -10,96 +10,118 @@ export const i18n = { selectType: { label: s__('AlertSettings|Select integration type'), enterprise: s__( - 'AlertSettings|In free versions of GitLab, only one integration for each type can be added. %{linkStart}Upgrade your subscription%{linkEnd} to add additional integrations.', + 'AlertSettings|Free versions of GitLab are limited to one integration per type. To add more, %{linkStart}upgrade your subscription%{linkEnd}.', ), }, nameIntegration: { label: s__('AlertSettings|Name integration'), placeholder: s__('AlertSettings|Enter integration name'), activeToggle: __('Active'), + error: __("Name can't be blank"), + }, + enableIntegration: { + label: s__('AlertSettings|Enable integration'), + help: s__( + 'AlertSettings|A webhook URL and authorization key is generated for the integration. After you save the integration, both are visible under the “View credentials” tab.', + ), }, setupCredentials: { help: s__( - "AlertSettings|Utilize the URL and authorization key below to authorize an external service to send alerts to GitLab. Review your external service's documentation to learn where to add these details, and the %{linkStart}GitLab documentation%{linkEnd} to learn more about configuring your endpoint.", + 'AlertSettings|Use the URL and authorization key below to configure how an external service sends alerts to GitLab. %{linkStart}How do I configure the endpoint?%{linkEnd}', ), prometheusHelp: s__( - 'AlertSettings|Utilize the URL and authorization key below to authorize Prometheus to send alerts to GitLab. Review the Prometheus documentation to learn where to add these details, and the %{linkStart}GitLab documentation%{linkEnd} to learn more about configuring your endpoint.', + 'AlertSettings|Use the URL and authorization key below to configure how Prometheus sends alerts to GitLab. Review the %{linkStart}GitLab documentation%{linkEnd} to learn how to configure your endpoint.', ), webhookUrl: s__('AlertSettings|Webhook URL'), authorizationKey: s__('AlertSettings|Authorization key'), reset: s__('AlertSettings|Reset Key'), }, - setSamplePayload: { - label: s__('AlertSettings|Sample alert payload (optional)'), - testPayloadHelpHttp: s__( - 'AlertSettings|Provide an example payload from the monitoring tool you intend to integrate with. This payload can be used to create a custom mapping (optional).', - ), - testPayloadHelp: s__( - 'AlertSettings|Provide an example payload from the monitoring tool you intend to integrate with. This will allow you to send an alert to an active GitLab alerting point.', + mapFields: { + label: s__('AlertSettings|Customize alert payload mapping (optional)'), + help: s__( + 'AlertSettings|To create a custom mapping, enter an example payload from your monitoring tool, in JSON format. Select the "Parse payload fields" button to continue.', ), placeholder: s__('AlertSettings|{ "events": [{ "application": "Name of application" }] }'), - resetHeader: s__('AlertSettings|Reset the mapping'), - resetBody: s__( - "AlertSettings|If you edit the payload, the stored mapping will be reset, and you'll need to re-map the fields.", - ), - resetOk: s__('AlertSettings|Proceed with editing'), editPayload: s__('AlertSettings|Edit payload'), - parsePayload: s__('AlertSettings|Parse payload for custom mapping'), + parsePayload: s__('AlertSettings|Parse payload fields'), payloadParsedSucessMsg: s__( 'AlertSettings|Sample payload has been parsed. You can now map the fields.', ), - }, - mapFields: { - label: s__('AlertSettings|Customize alert payload mapping (optional)'), - intro: s__( - 'AlertSettings|If you intend to create a custom mapping, provide an example payload from your monitoring tool and click "parse payload fields" button to continue. The sample payload is required for completing the custom mapping; if you want to skip the mapping step, progress straight to saving your integration.', + resetHeader: s__('AlertSettings|Reset the mapping'), + resetBody: s__('AlertSettings|If you edit the payload, you must re-map the fields again.'), + resetOk: s__('AlertSettings|Proceed with editing'), + mapIntro: s__( + 'AlertSettings|You can map default GitLab alert fields to your payload keys in the dropdowns below.', ), }, + testPayload: { + help: s__( + 'AlertSettings|Enter an example payload from your selected monitoring tool. This supports sending alerts to a GitLab endpoint.', + ), + placeholder: s__('AlertSettings|{ "events": [{ "application": "Name of application" }] }'), + modalTitle: s__('AlertSettings|The form has unsaved changes'), + modalBody: s__('AlertSettings|The form has unsaved changes. How would you like to proceed?'), + savedAndTest: s__('AlertSettings|Save integration & send'), + proceedWithoutSave: s__('AlertSettings|Send without saving'), + cancel: __('Cancel'), + }, prometheusFormUrl: { label: s__('AlertSettings|Prometheus API base URL'), - help: s__('AlertSettings|URL cannot be blank and must start with http or https'), + help: s__('AlertSettings|URL cannot be blank and must start with http: or https:.'), + blankUrlError: __('URL cannot be blank'), + invalidUrlError: __('URL is invalid'), }, restKeyInfo: { label: s__( - 'AlertSettings|Resetting the authorization key for this project will require updating the authorization key in every alert source it is enabled in.', + 'AlertSettings|If you reset the authorization key for this project, you must update the key in every enabled alert source.', ), }, }, saveIntegration: s__('AlertSettings|Save integration'), - changesSaved: s__('AlertSettings|Your integration was successfully updated.'), + saveAndTestIntegration: s__('AlertSettings|Save & create test alert'), cancelAndClose: __('Cancel and close'), - send: s__('AlertSettings|Send'), + send: __('Send'), copy: __('Copy'), + integrationCreated: { + title: s__('AlertSettings|Integration successfully saved'), + successMsg: s__( + 'AlertSettings|GitLab has created a URL and authorization key for your integration. You can use them to set up a webhook and authorize your endpoint to send alerts to GitLab.', + ), + btnCaption: s__('AlertSettings|View URL and authorization key'), + }, + changesSaved: s__('AlertsIntegrations|The integration is saved.'), + integrationRemoved: s__('AlertsIntegrations|The integration is deleted.'), + alertSent: s__('AlertsIntegrations|The test alert should now be visible in your alerts list.'), + addNewIntegration: s__('AlertSettings|Add new integration'), }; export const integrationSteps = { selectType: 'SELECT_TYPE', nameIntegration: 'NAME_INTEGRATION', - setPrometheusApiUrl: 'SET_PROMETHEUS_API_URL', - setSamplePayload: 'SET_SAMPLE_PAYLOAD', + enableHttpIntegration: 'ENABLE_HTTP_INTEGRATION', + enablePrometheusIntegration: 'ENABLE_PROMETHEUS_INTEGRATION', customizeMapping: 'CUSTOMIZE_MAPPING', }; export const createStepNumbers = { [integrationSteps.selectType]: 1, [integrationSteps.nameIntegration]: 2, - [integrationSteps.setPrometheusApiUrl]: 2, - [integrationSteps.setSamplePayload]: 3, + [integrationSteps.enableHttpIntegration]: 3, + [integrationSteps.enablePrometheusIntegration]: 2, [integrationSteps.customizeMapping]: 4, }; export const editStepNumbers = { - [integrationSteps.selectType]: 1, [integrationSteps.nameIntegration]: 1, - [integrationSteps.setPrometheusApiUrl]: null, - [integrationSteps.setSamplePayload]: 2, + [integrationSteps.enableHttpIntegration]: 2, + [integrationSteps.enablePrometheusIntegration]: null, [integrationSteps.customizeMapping]: 3, }; export const integrationTypes = { none: { value: '', text: s__('AlertSettings|Select integration type') }, http: { value: 'HTTP', text: s__('AlertSettings|HTTP Endpoint') }, - prometheus: { value: 'PROMETHEUS', text: s__('AlertSettings|External Prometheus') }, + prometheus: { value: 'PROMETHEUS', text: s__('AlertSettings|Prometheus') }, }; export const typeSet = { @@ -127,4 +149,10 @@ export const mappingFields = { fallback: 'fallback', }; -export const viewCredentialsTabIndex = 1; +export const tabIndices = { + configureDetails: 0, + viewCredentials: 1, + sendTestAlert: 2, +}; + +export const testAlertModalId = 'confirmSendTestAlert'; diff --git a/app/assets/javascripts/alerts_settings/index.js b/app/assets/javascripts/alerts_settings/index.js index 321af9fedb..953a867b2b 100644 --- a/app/assets/javascripts/alerts_settings/index.js +++ b/app/assets/javascripts/alerts_settings/index.js @@ -3,12 +3,15 @@ import Vue from 'vue'; import { parseBoolean } from '~/lib/utils/common_utils'; import AlertSettingsWrapper from './components/alerts_settings_wrapper.vue'; import apolloProvider from './graphql'; +import getCurrentIntegrationQuery from './graphql/queries/get_current_integration.query.graphql'; -apolloProvider.clients.defaultClient.cache.writeData({ +apolloProvider.clients.defaultClient.cache.writeQuery({ + query: getCurrentIntegrationQuery, data: { currentIntegration: null, }, }); + Vue.use(GlToast); export default (el) => { @@ -16,23 +19,7 @@ export default (el) => { return null; } - const { - prometheusActivated, - prometheusUrl, - prometheusAuthorizationKey, - prometheusFormPath, - prometheusResetKeyPath, - prometheusApiUrl, - activated: activatedStr, - alertsSetupUrl, - alertsUsageUrl, - formPath, - authorizationKey, - url, - projectPath, - multiIntegrations, - alertFields, - } = el.dataset; + const { alertsUsageUrl, projectPath, multiIntegrations, alertFields } = el.dataset; return new Vue({ el, @@ -40,22 +27,7 @@ export default (el) => { AlertSettingsWrapper, }, provide: { - prometheus: { - active: parseBoolean(prometheusActivated), - url: prometheusUrl, - token: prometheusAuthorizationKey, - prometheusFormPath, - prometheusResetKeyPath, - prometheusApiUrl, - }, - generic: { - alertsSetupUrl, - alertsUsageUrl, - active: parseBoolean(activatedStr), - formPath, - token: authorizationKey, - url, - }, + alertsUsageUrl, projectPath, multiIntegrations: parseBoolean(multiIntegrations), }, diff --git a/app/assets/javascripts/alerts_settings/utils/error_messages.js b/app/assets/javascripts/alerts_settings/utils/error_messages.js index e380257f98..9a0644b4e2 100644 --- a/app/assets/javascripts/alerts_settings/utils/error_messages.js +++ b/app/assets/javascripts/alerts_settings/utils/error_messages.js @@ -1,4 +1,4 @@ -import { s__ } from '~/locale'; +import { s__, __ } from '~/locale'; export const DELETE_INTEGRATION_ERROR = s__( 'AlertsIntegrations|The integration could not be deleted. Please try again.', @@ -19,3 +19,9 @@ export const RESET_INTEGRATION_TOKEN_ERROR = s__( export const INTEGRATION_PAYLOAD_TEST_ERROR = s__( 'AlertsIntegrations|Integration payload is invalid.', ); + +export const INTEGRATION_INACTIVE_PAYLOAD_TEST_ERROR = s__( + 'AlertsIntegrations|The integration is currently inactive. Enable the integration to send the test alert.', +); + +export const DEFAULT_ERROR = __('Something went wrong on our end.'); diff --git a/app/assets/javascripts/analytics/usage_trends/components/charts_config.js b/app/assets/javascripts/analytics/usage_trends/components/charts_config.js index 014f823cdc..ea11ecb0c5 100644 --- a/app/assets/javascripts/analytics/usage_trends/components/charts_config.js +++ b/app/assets/javascripts/analytics/usage_trends/components/charts_config.js @@ -83,7 +83,7 @@ export default [ 'UsageTrends|Could not load the issues and merge requests chart. Please refresh the page to try again.', ), noDataMessage, - chartTitle: s__('UsageTrends|Issues & Merge Requests'), + chartTitle: s__('UsageTrends|Issues & merge requests'), yAxisTitle: s__('UsageTrends|Items'), xAxisTitle: s__('UsageTrends|Month'), queries: [ diff --git a/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue b/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue index 0630cca93a..80ad36d051 100644 --- a/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue +++ b/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue @@ -45,7 +45,7 @@ export default { projects: s__('UsageTrends|Projects'), groups: s__('UsageTrends|Groups'), issues: s__('UsageTrends|Issues'), - mergeRequests: s__('UsageTrends|Merge Requests'), + mergeRequests: s__('UsageTrends|Merge requests'), pipelines: s__('UsageTrends|Pipelines'), }, loadCountsError: s__('Could not load usage counts. Please refresh the page to try again.'), diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index 48005787d8..516235657c 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -44,7 +44,7 @@ const Api = { projectMilestonesPath: '/api/:version/projects/:id/milestones', projectIssuePath: '/api/:version/projects/:id/issues/:issue_iid', mergeRequestsPath: '/api/:version/merge_requests', - groupLabelsPath: '/groups/:namespace_path/-/labels', + groupLabelsPath: '/api/:version/groups/:namespace_path/labels', issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key', issuableTemplatesPath: '/:namespace_path/:project_path/templates/:type', projectTemplatePath: '/api/:version/projects/:id/templates/:type/:key', @@ -79,6 +79,7 @@ const Api = { issuePath: '/api/:version/projects/:id/issues/:issue_iid', tagsPath: '/api/:version/projects/:id/repository/tags', freezePeriodsPath: '/api/:version/projects/:id/freeze_periods', + freezePeriodPath: '/api/:version/projects/:id/freeze_periods/:freeze_period_id', usageDataIncrementCounterPath: '/api/:version/usage_data/increment_counter', usageDataIncrementUniqueUsersPath: '/api/:version/usage_data/increment_unique_users', featureFlagUserLists: '/api/:version/projects/:id/feature_flags_user_lists', @@ -282,7 +283,7 @@ const Api = { }, /** - * Get all Merge Requests for a project, eventually filtering based on + * Get all merge requests for a project, eventually filtering based on * supplied parameters * @param projectPath * @param params @@ -306,7 +307,7 @@ const Api = { return axios.post(url, options); }, - // Return Merge Request for project + // Return merge request for project projectMergeRequest(projectPath, mergeRequestId, params = {}) { const url = Api.buildUrl(Api.projectMergeRequestPath) .replace(':id', encodeURIComponent(projectPath)) @@ -401,18 +402,29 @@ const Api = { newLabel(namespacePath, projectPath, data, callback) { let url; + let payload; if (projectPath) { url = Api.buildUrl(Api.projectLabelsPath) .replace(':namespace_path', namespacePath) .replace(':project_path', projectPath); + payload = { + label: data, + }; } else { url = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespacePath); + + // groupLabelsPath uses public API which accepts + // `name` and `color` props. + payload = { + name: data.title, + color: data.color, + }; } return axios .post(url, { - label: data, + ...payload, }) .then((res) => callback(res.data)) .catch((e) => callback(e.response.data)); @@ -784,7 +796,7 @@ const Api = { return axios.delete(url, { data }); }, - getRawFile(id, path, params = { ref: 'master' }) { + getRawFile(id, path, params = {}) { const url = Api.buildUrl(this.rawFilePath) .replace(':id', encodeURIComponent(id)) .replace(':path', encodeURIComponent(path)); @@ -832,6 +844,14 @@ const Api = { return axios.post(url, freezePeriod); }, + updateFreezePeriod(id, freezePeriod = {}) { + const url = Api.buildUrl(this.freezePeriodPath) + .replace(':id', encodeURIComponent(id)) + .replace(':freeze_period_id', encodeURIComponent(freezePeriod.id)); + + return axios.put(url, freezePeriod); + }, + trackRedisCounterEvent(event) { if (!gon.features?.usageDataApi) { return null; diff --git a/app/assets/javascripts/api/user_api.js b/app/assets/javascripts/api/user_api.js index 5efc7063ef..27901120c5 100644 --- a/app/assets/javascripts/api/user_api.js +++ b/app/assets/javascripts/api/user_api.js @@ -55,12 +55,13 @@ export function getUserProjects(userId, query, options, callback) { .catch(() => flash(__('Something went wrong while fetching projects'))); } -export function updateUserStatus({ emoji, message, availability }) { +export function updateUserStatus({ emoji, message, availability, clearStatusAfter }) { const url = buildApiUrl(USER_POST_STATUS_PATH); return axios.put(url, { emoji, message, availability, + clear_status_after: clearStatusAfter, }); } diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js index dbdc7e43d2..3a2f2078e4 100644 --- a/app/assets/javascripts/awards_handler.js +++ b/app/assets/javascripts/awards_handler.js @@ -446,7 +446,7 @@ export class AwardsHandler { createAwardButtonForVotesBlock(votesBlock, emojiName) { const buttonHtml = ` - diff --git a/app/assets/javascripts/badges/components/badge.vue b/app/assets/javascripts/badges/components/badge.vue index 9e5d70075f..309af368df 100644 --- a/app/assets/javascripts/badges/components/badge.vue +++ b/app/assets/javascripts/badges/components/badge.vue @@ -1,7 +1,11 @@ @@ -62,51 +88,64 @@ export default { class="board-inner gl-display-flex gl-flex-direction-column gl-relative gl-h-full gl-rounded-base gl-bg-white" >

{{ $options.i18n.newList }}

-
- -
-
- -

{{ formDescription }}

- -
- - -
{{ $options.i18n.noneSelected }}
-
+
+
+

+ {{ $options.i18n.scope }} +

+

{{ $options.i18n.scopeDescription }}

- - + + + + + + + + +
+ + + + + +
+ + +

{{ $options.i18n.noResults }}

+
+
- -
- - - - - -
- - -

{{ $options.i18n.noResults }}

-
diff --git a/app/assets/javascripts/boards/components/board_blocked_icon.vue b/app/assets/javascripts/boards/components/board_blocked_icon.vue new file mode 100644 index 0000000000..0f92e71475 --- /dev/null +++ b/app/assets/javascripts/boards/components/board_blocked_icon.vue @@ -0,0 +1,192 @@ + + diff --git a/app/assets/javascripts/boards/components/board_card_inner.vue b/app/assets/javascripts/boards/components/board_card_inner.vue index d4d6b17a58..9ff2cdd76d 100644 --- a/app/assets/javascripts/boards/components/board_card_inner.vue +++ b/app/assets/javascripts/boards/components/board_card_inner.vue @@ -10,6 +10,7 @@ import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue'; import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import { ListType } from '../constants'; import eventHub from '../eventhub'; +import BoardBlockedIcon from './board_blocked_icon.vue'; import IssueDueDate from './issue_due_date.vue'; import IssueTimeEstimate from './issue_time_estimate.vue'; @@ -22,6 +23,7 @@ export default { IssueDueDate, IssueTimeEstimate, IssueCardWeight: () => import('ee_component/boards/components/issue_card_weight.vue'), + BoardBlockedIcon, }, directives: { GlTooltip: GlTooltipDirective, @@ -52,7 +54,7 @@ export default { }; }, computed: { - ...mapState(['isShowingLabels']), + ...mapState(['isShowingLabels', 'issuableType']), ...mapGetters(['isEpicBoard']), cappedAssignees() { // e.g. maxRender is 4, @@ -114,7 +116,7 @@ export default { }, }, methods: { - ...mapActions(['performSearch']), + ...mapActions(['performSearch', 'setError']), isIndexLessThanlimit(index) { return index < this.limitBeforeCounter; }, @@ -164,14 +166,12 @@ export default {
diff --git a/app/assets/javascripts/boards/components/board_card_loading_skeleton.vue b/app/assets/javascripts/boards/components/board_card_loading_skeleton.vue new file mode 100644 index 0000000000..15bff1226a --- /dev/null +++ b/app/assets/javascripts/boards/components/board_card_loading_skeleton.vue @@ -0,0 +1,26 @@ + + + diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue index e9c4237d75..a4b1e6adac 100644 --- a/app/assets/javascripts/boards/components/board_content.vue +++ b/app/assets/javascripts/boards/components/board_content.vue @@ -17,21 +17,20 @@ export default { gon.features?.graphqlBoardLists || gon.features?.epicBoards ? BoardColumn : BoardColumnDeprecated, - BoardContentSidebar: () => import('ee_component/boards/components/board_content_sidebar.vue'), + BoardContentSidebar: () => import('~/boards/components/board_content_sidebar.vue'), + EpicBoardContentSidebar: () => + import('ee_component/boards/components/epic_board_content_sidebar.vue'), EpicsSwimlanes: () => import('ee_component/boards/components/epics_swimlanes.vue'), GlAlert, }, mixins: [glFeatureFlagMixin()], + inject: ['canAdminList'], props: { lists: { type: Array, required: false, default: () => [], }, - canAdminList: { - type: Boolean, - required: true, - }, disabled: { type: Boolean, required: true, @@ -69,7 +68,7 @@ export default { }, }, methods: { - ...mapActions(['moveList']), + ...mapActions(['moveList', 'unsetError']), afterFormEnters() { const el = this.canDragColumns ? this.$refs.list.$el : this.$refs.list; el.scrollTo({ left: el.scrollWidth, behavior: 'smooth' }); @@ -99,8 +98,8 @@ export default { diff --git a/app/assets/javascripts/boards/components/board_content_sidebar.vue b/app/assets/javascripts/boards/components/board_content_sidebar.vue new file mode 100644 index 0000000000..46359cc2bc --- /dev/null +++ b/app/assets/javascripts/boards/components/board_content_sidebar.vue @@ -0,0 +1,96 @@ + + + diff --git a/app/assets/javascripts/boards/components/board_extra_actions.vue b/app/assets/javascripts/boards/components/board_extra_actions.vue deleted file mode 100644 index b802ccc788..0000000000 --- a/app/assets/javascripts/boards/components/board_extra_actions.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - diff --git a/app/assets/javascripts/boards/components/board_form.vue b/app/assets/javascripts/boards/components/board_form.vue index d8504dcfb0..78da4137d6 100644 --- a/app/assets/javascripts/boards/components/board_form.vue +++ b/app/assets/javascripts/boards/components/board_form.vue @@ -107,7 +107,7 @@ export default { }; }, computed: { - ...mapGetters(['isEpicBoard', 'isGroupBoard', 'isProjectBoard']), + ...mapGetters(['isIssueBoard', 'isGroupBoard', 'isProjectBoard']), isNewForm() { return this.currentPage === formType.new; }, @@ -127,7 +127,7 @@ export default { if (this.isDeleteForm) { return 'danger'; } - return 'info'; + return 'confirm'; }, title() { if (this.readonly) { @@ -163,6 +163,9 @@ export default { currentMutation() { return this.board.id ? updateBoardMutation : createBoardMutation; }, + deleteMutation() { + return destroyBoardMutation; + }, baseMutationVariables() { const { board } = this; const variables = { @@ -182,7 +185,7 @@ export default { groupPath: this.isGroupBoard ? this.fullPath : undefined, }; }, - boardScopeMutationVariables() { + issueBoardScopeMutationVariables() { /* eslint-disable @gitlab/require-i18n-strings */ return { weight: this.board.weight, @@ -193,13 +196,18 @@ export default { this.board.milestone?.id || this.board.milestone?.id === 0 ? convertToGraphQLId('Milestone', this.board.milestone.id) : null, - labelIds: this.board.labels.map(fullLabelId), iterationId: this.board.iteration_id ? convertToGraphQLId('Iteration', this.board.iteration_id) : null, }; /* eslint-enable @gitlab/require-i18n-strings */ }, + boardScopeMutationVariables() { + return { + labelIds: this.board.labels.map(fullLabelId), + ...(this.isIssueBoard && this.issueBoardScopeMutationVariables), + }; + }, mutationVariables() { return { ...this.baseMutationVariables, @@ -239,17 +247,20 @@ export default { return this.boardUpdateResponse(response.data); }, + async deleteBoard() { + await this.$apollo.mutate({ + mutation: this.deleteMutation, + variables: { + id: fullBoardId(this.board.id), + }, + }); + }, async submit() { if (this.board.name.length === 0) return; this.isLoading = true; if (this.isDeleteForm) { try { - await this.$apollo.mutate({ - mutation: destroyBoardMutation, - variables: { - id: fullBoardId(this.board.id), - }, - }); + await this.deleteBoard(); visitUrl(this.rootPath); } catch { Flash(this.$options.i18n.deleteErrorMessage); @@ -324,7 +335,7 @@ export default { /> {{ __('Submit issue') }}{{ __('Create issue') }} -import { mapActions } from 'vuex'; -import { historyPushState } from '~/lib/utils/common_utils'; -import { setUrlParams } from '~/lib/utils/url_utility'; -import { __ } from '~/locale'; -import FilteredSearch from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; - -export default { - i18n: { - search: __('Search'), - }, - components: { FilteredSearch }, - props: { - search: { - type: String, - required: false, - default: '', - }, - }, - computed: { - initialSearch() { - return [{ type: 'filtered-search-term', value: { data: this.search } }]; - }, - }, - methods: { - ...mapActions(['performSearch']), - handleSearch(filters) { - let itemValue = ''; - const [item] = filters; - - if (filters.length === 0) { - itemValue = ''; - } else { - itemValue = item?.value?.data; - } - - historyPushState(setUrlParams({ search: itemValue }, window.location.href)); - - this.performSearch(); - }, - }, -}; - - - diff --git a/app/assets/javascripts/boards/components/modal/empty_state.vue b/app/assets/javascripts/boards/components/modal/empty_state.vue deleted file mode 100644 index 486b012e3d..0000000000 --- a/app/assets/javascripts/boards/components/modal/empty_state.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - diff --git a/app/assets/javascripts/boards/components/modal/filters.js b/app/assets/javascripts/boards/components/modal/filters.js deleted file mode 100644 index 2fb38a549f..0000000000 --- a/app/assets/javascripts/boards/components/modal/filters.js +++ /dev/null @@ -1,27 +0,0 @@ -import FilteredSearchContainer from '../../../filtered_search/container'; -import FilteredSearchBoards from '../../filtered_search_boards'; - -export default { - name: 'modal-filters', - props: { - store: { - type: Object, - required: true, - }, - }, - mounted() { - FilteredSearchContainer.container = this.$el; - - this.filteredSearch = new FilteredSearchBoards(this.store); - this.filteredSearch.setup(); - this.filteredSearch.removeTokens(); - this.filteredSearch.handleInputPlaceholder(); - this.filteredSearch.toggleClearSearchButton(); - }, - destroyed() { - this.filteredSearch.cleanup(); - FilteredSearchContainer.container = document; - this.store.path = ''; - }, - template: '#js-board-modal-filter', -}; diff --git a/app/assets/javascripts/boards/components/modal/footer.vue b/app/assets/javascripts/boards/components/modal/footer.vue deleted file mode 100644 index 05e1219bc7..0000000000 --- a/app/assets/javascripts/boards/components/modal/footer.vue +++ /dev/null @@ -1,80 +0,0 @@ - - diff --git a/app/assets/javascripts/boards/components/modal/header.vue b/app/assets/javascripts/boards/components/modal/header.vue deleted file mode 100644 index c3a71e7177..0000000000 --- a/app/assets/javascripts/boards/components/modal/header.vue +++ /dev/null @@ -1,80 +0,0 @@ - - diff --git a/app/assets/javascripts/boards/components/modal/index.vue b/app/assets/javascripts/boards/components/modal/index.vue deleted file mode 100644 index 5af90c1ee6..0000000000 --- a/app/assets/javascripts/boards/components/modal/index.vue +++ /dev/null @@ -1,151 +0,0 @@ - - diff --git a/app/assets/javascripts/boards/components/modal/list.vue b/app/assets/javascripts/boards/components/modal/list.vue deleted file mode 100644 index e66cae0ce1..0000000000 --- a/app/assets/javascripts/boards/components/modal/list.vue +++ /dev/null @@ -1,141 +0,0 @@ - - diff --git a/app/assets/javascripts/boards/components/modal/lists_dropdown.vue b/app/assets/javascripts/boards/components/modal/lists_dropdown.vue deleted file mode 100644 index 2065568d27..0000000000 --- a/app/assets/javascripts/boards/components/modal/lists_dropdown.vue +++ /dev/null @@ -1,49 +0,0 @@ - - diff --git a/app/assets/javascripts/boards/components/modal/tabs.vue b/app/assets/javascripts/boards/components/modal/tabs.vue deleted file mode 100644 index 0b717f516d..0000000000 --- a/app/assets/javascripts/boards/components/modal/tabs.vue +++ /dev/null @@ -1,42 +0,0 @@ - - diff --git a/app/assets/javascripts/boards/components/sidebar/board_editable_item.vue b/app/assets/javascripts/boards/components/sidebar/board_editable_item.vue index 61863bbe2a..352a25ef6d 100644 --- a/app/assets/javascripts/boards/components/sidebar/board_editable_item.vue +++ b/app/assets/javascripts/boards/components/sidebar/board_editable_item.vue @@ -98,14 +98,14 @@ export default { {{ __('Edit') }} -
+
{{ __('None') }}
diff --git a/app/assets/javascripts/boards/components/sidebar/board_sidebar_due_date.vue b/app/assets/javascripts/boards/components/sidebar/board_sidebar_due_date.vue index 6d92833739..13e1e23267 100644 --- a/app/assets/javascripts/boards/components/sidebar/board_sidebar_due_date.vue +++ b/app/assets/javascripts/boards/components/sidebar/board_sidebar_due_date.vue @@ -18,16 +18,16 @@ export default { }; }, computed: { - ...mapGetters(['activeIssue', 'projectPathForActiveIssue']), + ...mapGetters(['activeBoardItem', 'projectPathForActiveIssue']), hasDueDate() { - return this.activeIssue.dueDate != null; + return this.activeBoardItem.dueDate != null; }, parsedDueDate() { if (!this.hasDueDate) { return null; } - return parsePikadayDate(this.activeIssue.dueDate); + return parsePikadayDate(this.activeBoardItem.dueDate); }, formattedDueDate() { if (!this.hasDueDate) { @@ -69,6 +69,7 @@ export default { -import { GlAlert, GlButton, GlForm, GlFormGroup, GlFormInput } from '@gitlab/ui'; -import { mapGetters, mapActions } from 'vuex'; -import BoardEditableItem from '~/boards/components/sidebar/board_editable_item.vue'; -import createFlash from '~/flash'; -import { joinPaths } from '~/lib/utils/url_utility'; -import { __ } from '~/locale'; -import autofocusonshow from '~/vue_shared/directives/autofocusonshow'; - -export default { - components: { - GlForm, - GlAlert, - GlButton, - GlFormGroup, - GlFormInput, - BoardEditableItem, - }, - directives: { - autofocusonshow, - }, - data() { - return { - title: '', - loading: false, - showChangesAlert: false, - }; - }, - computed: { - ...mapGetters({ issue: 'activeIssue' }), - pendingChangesStorageKey() { - return this.getPendingChangesKey(this.issue); - }, - projectPath() { - const referencePath = this.issue.referencePath || ''; - return referencePath.slice(0, referencePath.indexOf('#')); - }, - validationState() { - return Boolean(this.title); - }, - }, - watch: { - issue: { - handler(updatedIssue, formerIssue) { - if (formerIssue?.title !== this.title) { - localStorage.setItem(this.getPendingChangesKey(formerIssue), this.title); - } - - this.title = updatedIssue.title; - this.setPendingState(); - }, - immediate: true, - }, - }, - methods: { - ...mapActions(['setActiveIssueTitle']), - getPendingChangesKey(issue) { - if (!issue) { - return ''; - } - - return joinPaths( - window.location.pathname.slice(1), - String(issue.id), - 'issue-title-pending-changes', - ); - }, - async setPendingState() { - const pendingChanges = localStorage.getItem(this.pendingChangesStorageKey); - - if (pendingChanges) { - this.title = pendingChanges; - this.showChangesAlert = true; - await this.$nextTick(); - this.$refs.sidebarItem.expand(); - } else { - this.showChangesAlert = false; - } - }, - cancel() { - this.title = this.issue.title; - this.$refs.sidebarItem.collapse(); - this.showChangesAlert = false; - localStorage.removeItem(this.pendingChangesStorageKey); - }, - async setTitle() { - this.$refs.sidebarItem.collapse(); - - if (!this.title || this.title === this.issue.title) { - return; - } - - try { - this.loading = true; - await this.setActiveIssueTitle({ title: this.title, projectPath: this.projectPath }); - localStorage.removeItem(this.pendingChangesStorageKey); - this.showChangesAlert = false; - } catch (e) { - this.title = this.issue.title; - createFlash({ message: this.$options.i18n.updateTitleError }); - } finally { - this.loading = false; - } - }, - handleOffClick() { - if (this.title !== this.issue.title) { - this.showChangesAlert = true; - localStorage.setItem(this.pendingChangesStorageKey, this.title); - } else { - this.$refs.sidebarItem.collapse(); - } - }, - }, - i18n: { - issueTitlePlaceholder: __('Issue title'), - submitButton: __('Save changes'), - cancelButton: __('Cancel'), - updateTitleError: __('An error occurred when updating the issue title'), - invalidFeedback: __('An issue title is required'), - reviewYourChanges: __('Changes to the title have not been saved'), - }, -}; - - - diff --git a/app/assets/javascripts/boards/components/sidebar/board_sidebar_labels_select.vue b/app/assets/javascripts/boards/components/sidebar/board_sidebar_labels_select.vue index 55b1596ee1..f78be83cd8 100644 --- a/app/assets/javascripts/boards/components/sidebar/board_sidebar_labels_select.vue +++ b/app/assets/javascripts/boards/components/sidebar/board_sidebar_labels_select.vue @@ -21,9 +21,9 @@ export default { }; }, computed: { - ...mapGetters(['activeIssue', 'projectPathForActiveIssue']), + ...mapGetters(['activeBoardItem', 'projectPathForActiveIssue']), selectedLabels() { - const { labels = [] } = this.activeIssue; + const { labels = [] } = this.activeBoardItem; return labels.map((label) => ({ ...label, @@ -31,7 +31,7 @@ export default { })); }, issueLabels() { - const { labels = [] } = this.activeIssue; + const { labels = [] } = this.activeBoardItem; return labels.map((label) => ({ ...label, @@ -40,7 +40,7 @@ export default { }, }, methods: { - ...mapActions(['setActiveIssueLabels']), + ...mapActions(['setActiveBoardItemLabels']), async setLabels(payload) { this.loading = true; this.$refs.sidebarItem.collapse(); @@ -52,7 +52,7 @@ export default { .map((label) => label.id); const input = { addLabelIds, removeLabelIds, projectPath: this.projectPathForActiveIssue }; - await this.setActiveIssueLabels(input); + await this.setActiveBoardItemLabels(input); } catch (e) { createFlash({ message: __('An error occurred while updating labels.') }); } finally { @@ -65,7 +65,7 @@ export default { try { const removeLabelIds = [getIdFromGraphQLId(id)]; const input = { removeLabelIds, projectPath: this.projectPathForActiveIssue }; - await this.setActiveIssueLabels(input); + await this.setActiveBoardItemLabels(input); } catch (e) { createFlash({ message: __('An error occurred when removing the label.') }); } finally { diff --git a/app/assets/javascripts/boards/components/sidebar/board_sidebar_milestone_select.vue b/app/assets/javascripts/boards/components/sidebar/board_sidebar_milestone_select.vue index 829f1c7280..ad225c7bf5 100644 --- a/app/assets/javascripts/boards/components/sidebar/board_sidebar_milestone_select.vue +++ b/app/assets/javascripts/boards/components/sidebar/board_sidebar_milestone_select.vue @@ -56,20 +56,20 @@ export default { }, }, computed: { - ...mapGetters(['activeIssue']), + ...mapGetters(['activeBoardItem']), hasMilestone() { - return this.activeIssue.milestone !== null; + return this.activeBoardItem.milestone !== null; }, groupFullPath() { - const { referencePath = '' } = this.activeIssue; + const { referencePath = '' } = this.activeBoardItem; return referencePath.slice(0, referencePath.indexOf('/')); }, projectPath() { - const { referencePath = '' } = this.activeIssue; + const { referencePath = '' } = this.activeBoardItem; return referencePath.slice(0, referencePath.indexOf('#')); }, dropdownText() { - return this.activeIssue.milestone?.title ?? this.$options.i18n.noMilestone; + return this.activeBoardItem.milestone?.title ?? this.$options.i18n.noMilestone; }, }, methods: { @@ -113,11 +113,12 @@ export default { ref="sidebarItem" :title="$options.i18n.milestone" :loading="loading" - @open="handleOpen()" + data-testid="sidebar-milestones" + @open="handleOpen" @close="handleClose" > {{ $options.i18n.noMilestone }} @@ -142,7 +143,7 @@ export default { v-for="milestone in milestones" :key="milestone.id" :is-check-item="true" - :is-checked="activeIssue.milestone && milestone.id === activeIssue.milestone.id" + :is-checked="activeBoardItem.milestone && milestone.id === activeBoardItem.milestone.id" data-testid="milestone-item" @click="setMilestone(milestone.id)" > diff --git a/app/assets/javascripts/boards/components/sidebar/board_sidebar_subscription.vue b/app/assets/javascripts/boards/components/sidebar/board_sidebar_subscription.vue index f01c8e8fa2..376985f7cb 100644 --- a/app/assets/javascripts/boards/components/sidebar/board_sidebar_subscription.vue +++ b/app/assets/javascripts/boards/components/sidebar/board_sidebar_subscription.vue @@ -21,27 +21,31 @@ export default { components: { GlToggle, }, + inject: ['emailsDisabled'], data() { return { loading: false, }; }, computed: { - ...mapGetters(['activeIssue', 'projectPathForActiveIssue']), + ...mapGetters(['activeBoardItem', 'projectPathForActiveIssue', 'isEpicBoard']), + isEmailsDisabled() { + return this.isEpicBoard ? this.emailsDisabled : this.activeBoardItem.emailsDisabled; + }, notificationText() { - return this.activeIssue.emailsDisabled + return this.isEmailsDisabled ? this.$options.i18n.header.subscribeDisabledDescription : this.$options.i18n.header.title; }, }, methods: { - ...mapActions(['setActiveIssueSubscribed']), + ...mapActions(['setActiveItemSubscribed']), async handleToggleSubscription() { this.loading = true; try { - await this.setActiveIssueSubscribed({ - subscribed: !this.activeIssue.subscribed, + await this.setActiveItemSubscribed({ + subscribed: !this.activeBoardItem.subscribed, projectPath: this.projectPathForActiveIssue, }); } catch (error) { @@ -61,8 +65,8 @@ export default { > {{ notificationText }} +import { mapGetters } from 'vuex'; +import IssuableTimeTracker from '~/sidebar/components/time_tracking/time_tracker.vue'; + +export default { + components: { + IssuableTimeTracker, + }, + inject: ['timeTrackingLimitToHours'], + computed: { + ...mapGetters(['activeBoardItem']), + }, +}; + + + diff --git a/app/assets/javascripts/boards/components/sidebar/board_sidebar_title.vue b/app/assets/javascripts/boards/components/sidebar/board_sidebar_title.vue new file mode 100644 index 0000000000..b8d3107c37 --- /dev/null +++ b/app/assets/javascripts/boards/components/sidebar/board_sidebar_title.vue @@ -0,0 +1,169 @@ + + + diff --git a/app/assets/javascripts/boards/components/toggle_focus.vue b/app/assets/javascripts/boards/components/toggle_focus.vue index 74805f8a68..49f5e7d20a 100644 --- a/app/assets/javascripts/boards/components/toggle_focus.vue +++ b/app/assets/javascripts/boards/components/toggle_focus.vue @@ -38,14 +38,16 @@ export default {