diff --git a/.eslintrc.yml b/.eslintrc.yml index 0cd1e7c5ec9..f8bc2a3ae94 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -32,7 +32,6 @@ rules: no-else-return: - error - allowElseIf: true - import/no-useless-path-segments: off lines-between-class-members: off # Disabled for now, to make the plugin-vue 4.5 -> 5.0 update smoother vue/no-confusing-v-for-v-if: error diff --git a/.gitlab/ci/dev-fixtures.gitlab-ci.yml b/.gitlab/ci/dev-fixtures.gitlab-ci.yml index 47acf8facc8..fc3678a7d17 100644 --- a/.gitlab/ci/dev-fixtures.gitlab-ci.yml +++ b/.gitlab/ci/dev-fixtures.gitlab-ci.yml @@ -1,7 +1,7 @@ .run-dev-fixtures: extends: - .default-retry - - .default-cache + - .rails-cache - .default-before_script - .use-pg11 stage: test @@ -19,8 +19,9 @@ run-dev-fixtures: - .run-dev-fixtures - .dev-fixtures:rules:ee-and-foss script: - - scripts/gitaly-test-spawn - - RAILS_ENV=test bundle exec rake db:seed_fu + - run_timed_command "scripts/gitaly-test-build" + - run_timed_command "scripts/gitaly-test-spawn" + - run_timed_command "RAILS_ENV=test bundle exec rake db:seed_fu" run-dev-fixtures-ee: extends: @@ -28,6 +29,7 @@ run-dev-fixtures-ee: - .dev-fixtures:rules:ee-only - .use-pg11-ee script: - - scripts/gitaly-test-spawn + - run_timed_command "scripts/gitaly-test-build" + - run_timed_command "scripts/gitaly-test-spawn" - cp ee/db/fixtures/development/* $FIXTURE_PATH - - RAILS_ENV=test bundle exec rake db:seed_fu + - run_timed_command "RAILS_ENV=test bundle exec rake db:seed_fu" diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 1538352a881..6e9119f295a 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -136,16 +136,15 @@ compile-assets pull-cache as-if-foss: .frontend-fixtures-base: extends: - .default-retry - - .default-cache + - .rails-cache - .default-before_script - .use-pg11 stage: fixtures needs: ["setup-test-env", "compile-assets pull-cache"] script: - - date - - scripts/gitaly-test-spawn - - date - - bundle exec rake frontend:fixtures + - run_timed_command "scripts/gitaly-test-build" + - run_timed_command "scripts/gitaly-test-spawn" + - run_timed_command "bundle exec rake frontend:fixtures" artifacts: name: frontend-fixtures expire_in: 31d diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index 74193b87e27..e6619ff2b6d 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -29,6 +29,19 @@ - vendor/gitaly-ruby policy: pull +.rails-cache: + cache: + key: + files: + - Gemfile.lock + - GITALY_SERVER_VERSION + prefix: "ruby-go-cache-v1" + paths: + - vendor/ruby + - vendor/gitaly-ruby + - .go/pkg/mod + policy: pull + .yarn-cache: cache: key: diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 0bf90e18bbd..e8087aebcef 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -1,15 +1,6 @@ .rails:needs:setup-and-assets: needs: ["setup-test-env", "compile-assets pull-cache"] -.rails-cache: - cache: - key: "ruby-go-cache-v1" - paths: - - vendor/ruby - - vendor/gitaly-ruby - - .go/pkg/mod - policy: pull - .rails-job-base: extends: - .default-retry @@ -18,15 +9,18 @@ ####################################################### # EE/FOSS: default refs (MRs, master, schedules) jobs # -.base-setup-test-env: +setup-test-env: extends: - .rails-job-base + - .rails:rules:default-refs-code-backstage-qa + - .use-pg11 stage: prepare variables: GITLAB_TEST_EAGER_LOAD: "0" script: - run_timed_command "bundle exec ruby -I. -e 'require \"config/environment\"; TestEnv.init'" - run_timed_command "scripts/gitaly-test-build" # Do not use 'bundle exec' here + - rm tmp/tests/gitaly/.ruby-bundle # This file prevents gems from being installed even if vendor/gitaly-ruby is missing artifacts: expire_in: 7d paths: @@ -44,12 +38,6 @@ cache: policy: pull-push -setup-test-env: - extends: - - .base-setup-test-env - - .rails:rules:default-refs-code-backstage-qa - - .use-pg11 - static-analysis: extends: - .rails-job-base @@ -84,6 +72,8 @@ downtime_check: stage: test needs: ["setup-test-env", "retrieve-tests-metadata", "compile-assets pull-cache"] script: + - run_timed_command "scripts/gitaly-test-build" + - run_timed_command "scripts/gitaly-test-spawn" - source scripts/rspec_helpers.sh - rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag ~level:migration" artifacts: @@ -108,6 +98,8 @@ downtime_check: .rspec-base-migration: script: + - run_timed_command "scripts/gitaly-test-build" + - run_timed_command "scripts/gitaly-test-spawn" - source scripts/rspec_helpers.sh - rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag level:migration" @@ -193,6 +185,7 @@ gitlab:setup: # db/fixtures/development/04_project.rb thanks to SIZE=1 below - git clone https://gitlab.com/gitlab-org/gitlab-test.git /home/git/repositories/gitlab-org/gitlab-test.git + - run_timed_command "scripts/gitaly-test-build" - run_timed_command "scripts/gitaly-test-spawn" - force=yes SIZE=1 FIXTURE_PATH="db/fixtures/development" bundle exec rake gitlab:setup artifacts: @@ -300,6 +293,8 @@ rspec-ee system pg11: .rspec-ee-base-geo: extends: .rspec-base-ee script: + - run_timed_command "scripts/gitaly-test-build" + - run_timed_command "scripts/gitaly-test-spawn" - source scripts/rspec_helpers.sh - scripts/prepare_postgres_fdw.sh - rspec_paralellized_job "--tag ~quarantine --tag geo" diff --git a/.rubocop.yml b/.rubocop.yml index 6687ada610a..439a22d00d3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -466,8 +466,12 @@ Rails/TimeZone: Enabled: true EnforcedStyle: 'flexible' Include: + - 'app/controllers/**/*' - 'app/services/**/*' + - 'spec/controllers/**/*' - 'spec/services/**/*' + - 'ee/app/controllers/**/*' - 'ee/app/services/**/*' + - 'ee/spec/controllers/**/*' - 'ee/spec/services/**/*' diff --git a/app/assets/javascripts/alert_management/components/alert_details.vue b/app/assets/javascripts/alert_management/components/alert_details.vue index d042336c361..272caa11e03 100644 --- a/app/assets/javascripts/alert_management/components/alert_details.vue +++ b/app/assets/javascripts/alert_management/components/alert_details.vue @@ -12,7 +12,6 @@ import { GlButton, } from '@gitlab/ui'; import createFlash from '~/flash'; -import { capitalizeFirstCharacter } from '~/lib/utils/text_utility'; import { s__ } from '~/locale'; import query from '../graphql/queries/details.query.graphql'; import { fetchPolicies } from '~/lib/graphql'; @@ -23,9 +22,9 @@ import updateAlertStatus from '../graphql/mutations/update_alert_status.graphql' export default { statuses: { - triggered: s__('AlertManagement|Triggered'), - acknowledged: s__('AlertManagement|Acknowledged'), - resolved: s__('AlertManagement|Resolved'), + TRIGGERED: s__('AlertManagement|Triggered'), + ACKNOWLEDGED: s__('AlertManagement|Acknowledged'), + RESOLVED: s__('AlertManagement|Resolved'), }, i18n: { errorMsg: s__( @@ -100,7 +99,6 @@ export default { }, }, methods: { - capitalizeFirstCharacter, dismissError() { this.isErrorDismissed = true; }, @@ -177,11 +175,7 @@ export default { >

{{ alert.title }}

- + import { GlLoadingIcon } from '@gitlab/ui'; import TablePagination from '~/vue_shared/components/pagination/table_pagination.vue'; -import EnvironmentTable from '../components/environments_table.vue'; +import EnvironmentTable from './environments_table.vue'; export default { components: { diff --git a/app/assets/javascripts/environments/components/delete_environment_modal.vue b/app/assets/javascripts/environments/components/delete_environment_modal.vue index f731dc49a5b..29aab268fd3 100644 --- a/app/assets/javascripts/environments/components/delete_environment_modal.vue +++ b/app/assets/javascripts/environments/components/delete_environment_modal.vue @@ -52,7 +52,7 @@ export default { footer-primary-button-variant="danger" @submit="onSubmit" > -