Commit graph

1261 commits

Author SHA1 Message Date
Mayra Cabrera c88c1ea036 Merge branch '343978-verify-schema' into 'master'
Make sure CI job `db:check-schema` can catch corrupted `structure.sql`

See merge request gitlab-org/gitlab!73298
2021-11-08 21:33:59 +00:00
Rémy Coutable 4082b6c388 Automatically exclude flaky tests from RSpec jobs 2021-11-08 13:06:35 +00:00
Lin Jen-Shin 8209d6d433 Prefer -n over ! -z, suggested by shellcheck 2021-11-08 20:58:50 +08:00
Lin Jen-Shin ec7850832f Make sure db:check-schema can catch corrupted structure.sql
This is done by migrating to the previous major version in
`db:check-schema` and then run migrations, it'll only be basing on
`db/structure.sql` from last major version rather than blindly using the
currently committed `db/structure.sql`.
2021-11-08 20:58:49 +08:00
Mark Fletcher 87f9cb8c0e Make previous test detection work for other projects and hosts 2021-11-03 20:03:39 +00:00
Albert Salim 193559ce85 Merge branch 'jh-mr-160-add-jh-only-feature-flag' into 'master'
Add jh only feature flag

See merge request gitlab-org/gitlab!73424
2021-11-03 08:51:23 +00:00
Zhu Shuang 30fa7da1e8 Add jh only feature flag 2021-11-03 15:48:18 +08:00
Rémy Coutable 7f76703f07 ci: Move long static-analysis tasks to dedicated jobs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-11-01 05:21:53 +00:00
trakos fdc47800f5 Fix head of commit in danger_as_local for drafts and forks
Variable CI_MERGE_REQUEST_SOURCE_BRANCH_SHA is available only in
merged results pipelines. We should fallback to CI_COMMIT_SHA
in other use cases, as merged results pipeline is not used for drafts
and MRs run against forks.
2021-10-29 03:47:32 +02:00
Andy Soiron b9625fa92a Merge branch 'fix-typos-before-translation' into 'master'
Fix typo 'commited' in strings & code

See merge request gitlab-org/gitlab!71128
2021-10-28 14:30:37 +00:00
Katrin Leinweber 609bfba718 Fix typo 'commited' in strings & code
See https://crowdin.com/translate/gitlab-ee/10/en-de#10998
2021-10-28 14:30:37 +00:00
Stan Hu 92536b996b Revert "Merge branch 'toon-gitaly-bundler-fix' into 'master'"
This reverts merge request !72328
2021-10-27 22:38:06 +00:00
Lin Jen-Shin 9e5e010e5d Specify the head of commit for danger_as_local
Otherwise for merged result pipeline it'll compare with too many commits
from the target branch.
2021-10-27 23:55:38 +08:00
Lin Jen-Shin adf23bdf28 Merge branch 'toon-gitaly-bundler-fix' into 'master'
test: Set Gitaly's bundle path as absolute path

See merge request gitlab-org/gitlab!72328
2021-10-27 15:44:26 +00:00
Peter Leitzen e0dbb5925a Merge branch '343244_Fix_remaining_cop_offenses_for_Naming/FileName' into 'master'
Fixed remaining cop offenses for Naming/FileName

See merge request gitlab-org/gitlab!72638
2021-10-26 15:57:15 +00:00
yhgupta eb8e562cb8 Fixed remaining cop offenses for Naming/FileName 2021-10-26 15:57:14 +00:00
Mark Fletcher 9707547081 Do not fail when rerun test file limit exceeded 2021-10-26 13:42:12 +01:00
Mark Fletcher 3f9c610eb6 Setup and test stage jobs detect and run failures from previous pipeline
- This change aims to reduce the feedback time when resolving failed
  tests for a Merge Request
- The setup jobs will detect the previous test files associated with
  failed jobs in the test stage of the previous pipeline
- The test stage jobs will execute a rerun based on those detected
  test files
2021-10-25 12:18:54 +01:00
Albert Salim a7775f10a6 Revert "Merge branch 'jobs-to-rerun-failed-tests-from-results' into 'master'"
This reverts merge request !69053
2021-10-25 09:47:13 +00:00
Albert Salim c18a4e742d Merge branch 'jobs-to-rerun-failed-tests-from-results' into 'master'
Jobs to rerun failed tests from previous pipeline's results

See merge request gitlab-org/gitlab!69053
2021-10-25 09:40:25 +00:00
Toon Claes e94f41c973 test: Inject bundler config in environment
Setting up and spawning Gitaly in tests needs to have some Bundler
settings configured. Until now this was done by writing to the local
config file in the ruby directory inside the gitaly dir used in test.

This method didn't seem to be robust for all our user and
use-cases (i.e. CI), because this configuration _could_ be done from
different places.

To make the situation more predictable, this change injects all Bundler
configuration through environment variables instead. It sets
BUNDLE_IGNORE_CONFIG to make sure any existing configuration written to
file is ignored, this includes the .bundle/config inside the project and
possibly in the user's $HOME directory.
2021-10-22 16:24:01 +02:00
Mark Fletcher c7742bdc85 Setup and test stage jobs detect and run failures from previous pipeline
- This change aims to reduce the feedback time when resolving failed
  tests for a Merge Request
- The setup jobs will detect the previous test files associated with
  failed jobs in the test stage of the previous pipeline
- The test stage jobs will execute a rerun based on those detected
  test files
2021-10-22 09:04:41 +01:00
Peter Leitzen ef96a3a208 Fix scripts/security-harness to support older git versions
Prior this commit `scripts/security-harness` would not remove lefthook
if the git < 2.31 because the option `--path-format=absolute` wasn't
available yet and just been echoed which resulted in a multiline result:

  $ git rev-parse  --path-format=absolute --git-path hooks/pre-push
  --path-format=absolute
  .git/hooks/pre-push

The hook path "--path-format=absolute\n.git/hooks/pre-push" which does
not exist. Moreover, the first run creates a directory
"--path-format=absolute\n.git/" which is cumbersome to remove.

In this commit we only care about the last line which is most likely the
path to the hook.
2021-10-22 07:20:25 +00:00
Lin Jen-Shin 886d9e0425 Merge branch 'clarify-review-app-deploy-status-log' into 'master'
Clarify printed message

See merge request gitlab-org/gitlab!72487
2021-10-20 12:42:30 +00:00
Anastasia McDonald 0e8ab9b63d Merge branch 'ml-run-package-and-qa-on-feature-flag-config-changes' into 'master'
Run package-and-qa on feature flag config changes

See merge request gitlab-org/gitlab!68814
2021-10-19 00:00:37 +00:00
Mark Lapierre cb15131628 Run package-and-qa on feature flag config changes 2021-10-19 00:00:37 +00:00
dfrazao-gitlab 1fe55e57cc Squash old migrations
- Squash migrations of the year 2019

Changelog: performance

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/331248
2021-10-18 09:18:40 +00:00
Albert Salim 2787d27c22 Clarify printed message 2021-10-18 16:31:36 +08:00
Lin Jen-Shin 535e4adb51 Merge branch '339248-allow-to-test-a-canonical-mr-as-if-jihu-in-the-jihu-context-2' into 'master'
Introduce new frontend 'as-if-jh' jobs

See merge request gitlab-org/gitlab!70000
2021-10-13 18:10:08 +00:00
Lin Jen-Shin ba16372e16 Merge branch 'alberts-assign-local-vars-static-analysis' into 'master'
Assign values to variables

See merge request gitlab-org/gitlab!72082
2021-10-13 01:42:17 +00:00
Rémy Coutable f05496c2b9 ci: Save setup_db task duration as a metric in memory-on-boot
Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-10-12 20:15:36 +00:00
Rémy Coutable 31994428c3
ci: Introduce new frontend 'as-if-jh' jobs
- Introduce a new `.if-merge-request-labels-as-if-jh` rule
- Introduce a new `add-jh-folder` job

Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-10-11 10:38:46 +02:00
Albert Salim d2aed8d9ac Assign values to variables 2021-10-11 10:54:59 +08:00
Peter Leitzen 50dde19a75
Don't try to run database helpers as specs
Running

  $ bin/rspec -Ispec -rspec_helper --color --format documentation \
      spec/support/helpers/database
    Finished in 14.61 seconds (files took 55.56 seconds to load)
    0 examples, 0 failures

has no effect.
2021-10-07 16:41:08 +02:00
Dmitry Gruzd 30e6846e2b Add Rails update guidelines 2021-10-06 18:53:25 +00:00
Rémy Coutable ae30612c23 Merge branch 'alberts-fix-automated-cleanup' into 'master'
Fix typo in variable name

See merge request gitlab-org/gitlab!71525
2021-10-06 08:56:09 +00:00
Rémy Coutable ff8bb931f7
ci: Deduplicate frontend_fixture jobs for EE/FOSS
Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-10-04 14:03:07 +02:00
Albert Salim 51e0ce2633 Fix variable name 2021-10-01 13:28:17 +08:00
Brandon Labuschagne a27331cd47 Merge branch 'setup-mirajejs-storybook' into 'master'
Set up MirajeJS in Storybook

See merge request gitlab-org/gitlab!70055
2021-09-30 17:16:05 +00:00
Nikola Milojevic d03b4c855e Merge branch 'add-rate-limiting-redis-instance' into 'master'
Add Gitlab::Redis::RateLimiting Redis instance

See merge request gitlab-org/gitlab!70414
2021-09-30 15:16:40 +00:00
Igor Drozdov 26a7650bae Merge branch '30678-the-docs-review-app-environments-are-not-being-cleaned-up' into 'master'
ci: Delete stopped environments not updated since specific threshold

See merge request gitlab-org/gitlab!70817
2021-09-30 12:13:54 +00:00
Rémy Coutable daa23387a8 ci: Delete stopped environments not updated since specific threshold 2021-09-30 12:13:53 +00:00
Sean McGivern b3c5c99600
Simplify adding new Redis instance
The main sticking point was `config/README.md`, which went into a lot of
detail about each instance. It was quite easy to make a copy and paste
error, as some instances had default URLs and others didn't, some had
fallback instances and others didn't, etc.

This changes a number of things:

1. `config/README.md` now has a table for the Redis instances with a
   single list of instructions that apply to all instances.
2. There are now specs to ensure that each Redis instance has a default
   URL set when no Redis config at all is present.
3. Instances that use a fallback instance for config will automatically
   use the default URL of their fallback instance. They should not
   define their own default URL.
4. The `.gitignore` file does not need to be updated for each new Redis
   instance.
5. The example config files are now gone as `request.yml.example` should
   be sufficient.
2021-09-30 10:01:58 +00:00
Rémy Coutable 992409c3eb Revert "Merge branch 'allow-test-level-to-take-several-prefixes' into 'master'"
This reverts merge request !71308
2021-09-30 08:58:56 +00:00
Rémy Coutable 95e770c843
ci: Deduplicate frontend_fixture jobs for EE/FOSS
Signed-off-by: Rémy Coutable <remy@rymai.me>
2021-09-29 18:03:07 +02:00
Enrique Alcantara 9800a90aea Set up MirajeJS in Storybook
Allow using MirajeJS to mock API requests
in Storybook. Improves the yarn storybook:start
command to prompt the user about generating
the fixtures needed by MirajeJS.
2021-09-29 15:27:51 +00:00
Marcel Amirault c2eada2641 Remove last readmes from docs 2021-09-29 12:17:31 +00:00
Sean McGivern 2f89dcdb69
Add Gitlab::Redis::RateLimiting Redis instance
This instance is not used yet, but will soon be used for rate limiting
via Rack::Attack and Gitlab::ApplicationRateLimiter. Having this
configuration option in place will allow us to build on that, and also
create merge requests to support this option in Omnibus and our Helm
charts.
2021-09-28 11:05:21 +00:00
Rémy Coutable b90a8bd156 Merge branch '341245-fix-startup-css-changed-check-with-foss-only' into 'master'
Fix startup_css_changed to not check `ee` if FOSS_ONLY

See merge request gitlab-org/gitlab!70720
2021-09-21 06:36:32 +00:00
Paul Slaughter a92c0171e4
Fix startup_css_changed to not check ee if FOSS_ONLY
- This was causing issues when we moved the `as-if-foss`
  check to use the rules that actually `rm -rf ee/`
- See https://gitlab.com/gitlab-org/gitlab/-/issues/341245
2021-09-20 11:17:02 -05:00