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

Refactor migrations to allow to easily add new test models #6244

Merged
merged 2 commits into from
Jun 8, 2020
Merged

Conversation

stefanobaghino-da
Copy link
Contributor

Closes #6236

changelog_begin
changelog_end

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

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

Awesome, thanks a lot for cleaning up the mess I created! Very happy to get feedback from someone that knows Scala on my Scala code 🙂

One thing that is still missing and is just as important is the logic for validating the result from the step in the Haskell binary. This is currently tied completely to the specific model. I have some ideas for making that more generic but I’d definitely be interested in hearing your thoughts! (Let’s leave it out of this PR)

@@ -115,3 +115,15 @@ migration_test(
tags = ["exclusive"],
versions = platform_versions,
) if not is_windows else None

migration_test(
name = "migration-test",
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to keep this can we give it a more descriptive name? Also why is this particular combination useful? Latest stable vs HEAD makes more sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove it for now and re-introduce it later. I was thinking that if you had a single test that covers all migrations in one go you can lower the chances of missing weird regressions when using this rule to quickly test while developing. Let me know what you think about it (and what name could make more sense: migration-meta-test, meta-migration-test, test-migration-test, migration-test-test? Something else?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just make it very explicit, migration-1.0.0-to-head? I don’t mind keeping it, I just find the name to be a bit too vague.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed by 8845557

@stefanobaghino-da
Copy link
Contributor Author

Awesome, thanks a lot for cleaning up the mess I created! Very happy to get feedback from someone that knows Scala on my Scala code

Not really a mess, I mostly broke pieces apart.

One thing that is still missing and is just as important is the logic for validating the result from the step in the Haskell binary. This is currently tied completely to the specific model. I have some ideas for making that more generic but I’d definitely be interested in hearing your thoughts! (Let’s leave it out of this PR)

I know, but I opened a separate ticket for that (#6237), I didn't want to do too much in a single PR.

@mergify mergify bot merged commit fd52fb2 into master Jun 8, 2020
@mergify mergify bot deleted the ste/6236 branch June 8, 2020 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor MigrationStep.scala to allow to easily add new test models
2 participants