diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2021-10-19 14:09:47 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2021-10-19 15:18:21 +0300 |
commit | 6fad82245ebf7741ddf1ab5b15dfc5135bbce565 (patch) | |
tree | afe2f59dacb8b89cd50dcb2f5100a9d9857734d6 | |
parent | b7be757020d5687d6e5632cc169cf925eac68634 (diff) |
Remove backwards_compatibility CI job
The backwards_compatibility CI job runs the tests with the latest
migrations against the test suite from the previous version. While
testing the backwards compatibility of the migrations is important,
the current approach has problems that make it unfeasible in practice.
1. The CI job figures out the previous version by reading the VERSION
file from Gitaly's repo. This version file appears to be unupdated
in Gitaly's master branch. As it is, it points to 14.3.0-rc2 when
in fact it should point to some release candidate of 14.4. This means
the tests are not against the latest release but the one before that.
2. Some assertions the tests make fail with newer migrations even if
everything would be fine with a real setup. Some tests haven't setup
their test state to fully match the production setup, and thus fail
when the newer migrations are applied. In the same fashion, some tests
fail with newer migrations even if they've setup their test state
correctly. They may however make assertions on how the state looks like
after running some code, yet the new migrations cause the state to look
different from the asserted state. As an example, Praefect's deletion
handling was changed in gitlab-org/gitaly!3906. The new code removes all
records of a repository when the repository is deleted. The old code
testing deletion fails as it still expects the records to be in place.
The new code is backwards compatible though and would process deletion
jobs scheduled by the old code.
While testing for backwards compatibility is important, this commit removes
the job as it's not clear how to solve the problems. This unblocks further
fixes from being merged.
-rw-r--r-- | .gitlab-ci.yml | 14 | ||||
-rwxr-xr-x | _support/get-previous-minor-release | 6 |
2 files changed, 0 insertions, 20 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be6245f36..f6a65672b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -297,20 +297,6 @@ pgbouncer_test: script: - make test-postgres -backwards_compatibility_test: - # The job verifies the old version of the service could run its database migration on the database where the - # migration of the newest service version was already applied. - <<: *test_definition - <<: *postgres_definition - rules: - - changes: - - "internal/praefect/datastore/migrations/*" - script: - - git fetch origin 'refs/tags/*:refs/tags/*' - - git checkout $(_support/get-previous-minor-release) - - git checkout --no-overlay $CI_COMMIT_SHA -- internal/praefect/datastore/migrations :!internal/praefect/datastore/migrations/migrations.go - - make test-postgres - lint: stage: test retry: 2 diff --git a/_support/get-previous-minor-release b/_support/get-previous-minor-release deleted file mode 100755 index eaea20d7e..000000000 --- a/_support/get-previous-minor-release +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby - -File.open("VERSION").read.scan(/(\d+)\.(\d+).\d+.*/) { |major_str, minor_str| - major, minor = major_str.to_i, minor_str.to_i - puts minor - 1 >= 0 ? "v#{major}.#{minor-1}.0" : "v#{major-1}.10.0" -} |