Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Skip check for the past dbversion's migration existing if it is squashed#6128

Merged
rawlinp merged 6 commits intoapache:masterfrom
zrhoffman:skip-version-exists
Aug 23, 2021
Merged

Skip check for the past dbversion's migration existing if it is squashed#6128
rawlinp merged 6 commits intoapache:masterfrom
zrhoffman:skip-version-exists

Conversation

@zrhoffman
Copy link
Copy Markdown
Member

This PR


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

  1. Delete the 2021080408053529_fix_indices migrations (unnecessary once Rolling back 2021080408053529_fix_indices in TO DB tests: pys_location_last_updated_idx" already exists #6127 is fixed)
  2. Migrate the Traffic Ops database at ATC 5.1.2
  3. Dump the database, move the dump to traffic_ops_db/test/docker/initdb.d, and rebuild the db service
  4. Build a Traffic Ops RPM, move it to traffic_ops_db/test/docker/traffic_ops.rpm and rebuild the trafficops-db-admin service
  5. Run the Traffic Ops DB tests

If this is a bugfix, which Traffic Control versions contained the bug?

  • 6.0.x release branch

PR submission checklist

@zrhoffman zrhoffman added Traffic Ops related to Traffic Ops regression bug a bug in existing functionality introduced by a new version tests related to tests and/or testing infrastructure database relating to setup/installation/structure of the Traffic Ops database labels Aug 20, 2021
@zrhoffman zrhoffman added this to the 6.0.0 milestone Aug 20, 2021
@zrhoffman zrhoffman force-pushed the skip-version-exists branch from cb5e99a to d0e91a4 Compare August 23, 2021 22:17
@zrhoffman
Copy link
Copy Markdown
Member Author

Rebased to get the fix for #6127. Removing the 2021080408053529_fix_indices migration is no longer necessary to test this PR.

Comment thread traffic_ops_db/test/docker/Dockerfile-db-admin
@rawlinp
Copy link
Copy Markdown
Contributor

rawlinp commented Aug 23, 2021

Uh oh, looks like the DB tests will fail perpetually until they're fixed to ignore the migration that was edited.

…ation was changed in the PR or commit the TO DB tests GHA is running on
@zrhoffman
Copy link
Copy Markdown
Member Author

Uh oh, looks like the DB tests will fail perpetually until they're fixed to ignore the migration that was edited.

cf59b77: No longer failing if that migration is not changed in the PR

@rawlinp rawlinp merged commit 9fa6c29 into apache:master Aug 23, 2021
@zrhoffman zrhoffman deleted the skip-version-exists branch August 23, 2021 22:54
zrhoffman added a commit that referenced this pull request Aug 30, 2021
…hed (#6128)

* Make ConnectionString a global

* Get the migration version after migrating from Goose

* Skip check for the past dbversion's migration existing if it is squashed

* Install TO dependencies before installing TO in db-admin dockerfile

* TO DB tests bugfix: Specify the database name with `dropdb`

* Only fail on a non-latest migration being modified/added if that migration was changed in the PR or commit the TO DB tests GHA is running on

(cherry picked from commit 9fa6c29)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

database relating to setup/installation/structure of the Traffic Ops database regression bug a bug in existing functionality introduced by a new version tests related to tests and/or testing infrastructure Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants