Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert DRY-ing up of datamigrations that introduced bug #849

Merged
merged 3 commits into from
Jul 11, 2019

Conversation

tylercloke
Copy link
Contributor

@tylercloke tylercloke commented Jul 10, 2019

🔩 Description

This change accidentally removed some Reset code that was special to datamigrations. This code resets the data_migrations table when reset to IAM v1 so that on the next upgrade to 2.x the datamigrations get reapplied. This is different than standard migrations since we never undo schema migrations.

Also added regression tests to the pipeline.

✅ Checklist

  • Necessary tests added/updated?
  • Necessary docs added/updated?
  • Code actually executed?
  • Vetting performed (unit tests, lint, etc.)?

This commit https://github.com/chef/automate/blob/c94572e5ab3cfbaec2230af0afdfde7e0bfff145/components/authz-service/storage/postgres/datamigration/datamigration.go
accidentally removed some Reset code that was special to datamigrations. This code resets the data_migrations table when reset to IAM v1 so that on the next upgrade to 2.x
the datamigrations get reapplied. This is different than standard migrations since we never undo schema migrations.

Signed-off-by: Tyler Cloke <tylercloke@gmail.com>
this test ensures that after resetting to v1 and then upgrading to
v2.1 again, authorization works as expected on v2.1

Signed-off-by: Brenna Hewer-Darroch <brenna@chef.io>
Signed-off-by: Tyler Cloke <tylercloke@gmail.com>
Signed-off-by: Blake Johnson <bstier@chef.io>
@tylercloke tylercloke requested a review from a team as a code owner July 10, 2019 21:50
Copy link
Contributor

@msorens msorens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the issue when run on my local box.

Signed-off-by: Tyler Cloke <tylercloke@gmail.com>
@msorens msorens merged commit 337398b into master Jul 11, 2019
@chef-ci chef-ci deleted the tc/fix-datamigrations-on-reset branch July 11, 2019 00:50
@susanev susanev added the auth-team anything that needs to be on the auth team board label Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-team anything that needs to be on the auth team board automate-auth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants