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

Move from github.com/mattes/migrate => github.com/golang-migrate/migrate repo #257

Closed
wants to merge 2 commits into from

Conversation

djui
Copy link
Contributor

@djui djui commented Aug 2, 2018

Fixes #256.

Also fixes the filename download URL: migrate.linux-amd64.tar.gz not migrate-linux-amd64.tar.gz.

@danp
Copy link
Contributor

danp commented Aug 15, 2018

Thanks for this!

Looks like some test output checking needs to be updated.

Also, what should folks who still have github.com/mattes/migrate in heroku.additionalTools expect to happen?

@djui
Copy link
Contributor Author

djui commented Aug 15, 2018

Looks like some test output checking needs to be updated.

Was not aware of the test cases. Will take care of it.

Also, what should folks who still have github.com/mattes/migrate in heroku.additionalTools expect to happen?

That's a valid question. I am not sure. So far I would assume that no-one uses that feature as it actually does not work. So we might not have to worry about that case. But likely only you know the numbers for that.

@danp
Copy link
Contributor

danp commented Aug 15, 2018

We do use it internally. Re it not working based on filename, maybe there is confusion between the filename key here (which I think ensureFile eventually works from) and the released filename:

"migrate-v3.0.0-linux-amd64.tar.gz": {
"SHA": "13fbabe2db0ee3f79611c8171b0596939a3f384025f62925ed136267681e4fbf",
"URL": "https://github.com/mattes/migrate/releases/download/v3.0.0/migrate.linux-amd64.tar.gz"
},

Perhaps the buildpack should support either being in heroku.additionalTools, preferring github.com/golang-migrate/migrate, and printing a warning if only github.com/mattes/migrate is used?

@danp
Copy link
Contributor

danp commented Aug 15, 2018

Should add too there are tests that specifically verify having github.com/mattes/migrate in heroku.additionalTools works, such as:

testDepWithMattesMigrate() {
fixture "dep-mattes-migrate"
assertDetected
compile
assertCaptured "Installing go"
assertCaptured "Fetching dep"
assertCaptured "Fetching any unsaved dependencies (dep ensure)"
assertCaptured "Running: go install -v -tags heroku ."
assertCaptured "github.com/heroku/fixture"
assertCaptured "Installing github.com/mattes/migrate"
assertCaptured "Fetching migrate"
assertCapturedSuccess
assertCompiledBinaryExists
assertCompiledBinaryExists "migrate"
}

and:

testGovendorMattesMigrateCLI() {
fixture "govendor-mattes-migrate"
assertDetected
compile
assertCaptured "Checking vendor/vendor.json file."
assertCaptured "Installing go"
assertCaptured "Fetching govendor"
assertCaptured "Fetching any unsaved dependencies (govendor sync)"
assertCaptured "Running: go install -v -tags heroku ."
assertCaptured "Installing github.com/mattes/migrate"
assertCaptured "Fetching migrate"
assertCapturedSuccess
assertCompiledBinaryExists
assertCompiledBinaryOutputs "fixture" "hello"
assertCompiledBinaryExists "migrate"
}

@freeformz
Copy link
Contributor

This won't work as it breaks existing users who could push afterwards and not get mattes migrate as they expected.

@freeformz
Copy link
Contributor

See #264 for how I would like to do it so as to not break existing users and allow them some time to migrate.

@freeformz
Copy link
Contributor

I'm going to close this since I merged #264. @djui Thanks for bringing up this issue. I'm sorry we couldn't use your PR in the end.

@freeformz freeformz closed this Aug 24, 2018
@djui
Copy link
Contributor Author

djui commented Aug 24, 2018

@freeformz makes sense and thanks for taking over this issue! 🙇

@djui djui deleted the move-mattes-migrate-repo branch August 24, 2018 19:12
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.

Migrate mattes/migrate to new repo golang-migrate/migrate
3 participants