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`.
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.
- 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
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.
- 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
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.
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.
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.
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.