Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Updating fourchette to work with migrated Heroku pg:backups #57

Closed
wants to merge 3 commits into from

Conversation

tokafish
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.32%) to 92.31% when pulling d3d621a on carbonfive:master into 9ceaee2 on rainforestapp:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.39%) to 91.24% when pulling 5f530d0 on carbonfive:master into 9ceaee2 on rainforestapp:master.

@@ -30,6 +30,12 @@ def client
@heroku_client ||= PlatformAPI.connect(api_key)
end

def legacy_client
api_key = ENV['FOURCHETTE_HEROKU_API_KEY']
ENV['HEROKU_API_KEY'] = api_key # necessary for Heroku::Auth.password to work
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is that necessary? @non_platform_client is not even used anywhere in that PR...?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, nevermind, it's used... :P

but why is the ENV['HEROKU_API_KEY'] required is still a valid question.

Copy link
Author

Choose a reason for hiding this comment

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

I couldn't find support in their platform API for the migrated PG backups, so I was forced to use the ruby client. One of the problems with it is that its Heroku::Client::HerokuPostgresql implicitly uses Heroku::Auth, which tries to read credentials from stdin. Only means I could see of bypassing this behavior is setting this environment variable before it does so.

@jipiboily
Copy link
Contributor

Thanks for the PR!

The build is failing.

I added a couple of questions. I will need more time to test it. At first, it seems fine.

@scruti @thinkmorebetter: could you look at it and maybe try it on your apps? Would be awesome!

Thanks

@tokafish
Copy link
Author

No problem. It's still a work in progress, I was planning on fixing the tests, and using it a bit more with our app to iron out any issues (or example, our app needs 2X dynos, so I was hoping on getting that working).

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.15%) to 94.48% when pulling dbc3295 on carbonfive:master into 9ceaee2 on rainforestapp:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.15%) to 94.48% when pulling dbc3295 on carbonfive:master into 9ceaee2 on rainforestapp:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.15%) to 94.48% when pulling dbc3295 on carbonfive:master into 9ceaee2 on rainforestapp:master.

@tokafish
Copy link
Author

@jipiboily I've fixed the specs - what do you think about merging this?

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.05%) to 94.58% when pulling 44070a7 on carbonfive:master into 9ceaee2 on rainforestapp:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.05%) to 94.58% when pulling 44070a7 on carbonfive:master into 9ceaee2 on rainforestapp:master.

@teldio-operations
Copy link

@wless1 Gave this branch a shot and ended up with the following error

I, [2015-04-29T19:40:18.580547 #18]  INFO -- : Waiting for database #{to_name} to become available
RestClient::ResourceNotFound: 404 Resource Not Found: {"error":"not found"}

Not sure if I am doing something wrong, but the stack trace seems to suggest that it is a result wait_for_db in pgbackups.rb

@client.create_transfer(from_url, from_name, to_url, to_name)
end
raw_attachment = @heroku.legacy_client.get_attachments(to).body[0]
attachment = Heroku::Helpers::HerokuPostgresql::Attachment.new raw_attachment

Choose a reason for hiding this comment

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

@wless1 Getting the 0 indexed attachment does not work for me. We should probably analyze each attachment until we find the attachment with a name starting with HEROKU_POSTGRESQL

@jipiboily
Copy link
Contributor

@wless1 sorry it's been so long. What's the status of this? Is this working for you?

@jipiboily
Copy link
Contributor

FYI, we just decided to deprecate Fourchette. You can (and probably should) use the Heroku review apps instead which was inspired by Fourchette.

https://devcenter.heroku.com/articles/github-integration-review-apps

Thanks!

@jipiboily
Copy link
Contributor

Closing, feel free to re-open if you think it's worth pursuing.

@jipiboily jipiboily closed this Aug 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants