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

Issue restoring staging #72

Closed
eignerchris opened this issue Jan 19, 2016 · 8 comments
Closed

Issue restoring staging #72

eignerchris opened this issue Jan 19, 2016 · 8 comments

Comments

@eignerchris
Copy link

Anyone else having trouble running staging restore production? I always receive "App not found".

› heroku --version
heroku-toolbelt/3.42.22 (x86_64-darwin14) ruby/2.2.2
heroku-cli/4.27.13-9dddf39 (amd64-darwin) go1.5.3
=== Installed Plugins
heroku-apps@1.1.3
heroku-cli-addons@0.1.1
heroku-fork@4.0.0
heroku-git@2.4.4
heroku-local@4.1.5
heroku-run@2.9.2
heroku-spaces@2.0.9
heroku-status@1.2.4

I have origin, production, and staging remotes setup correctly.

@geoffharcourt
Copy link
Collaborator

@eignerchris does your application belong to another organization? I've seen this happen on apps that have transferred ownership or that belong to a Heroku org that I am not a part of.

@geoffharcourt
Copy link
Collaborator

I'm having the same issue with restoring staging. I can execute backup operations and most passthrough commands successfully, but restore doesn't work on apps that used to belong to another org and have been transferred.

@mjankowski
Copy link
Contributor

I have this same issue with a staging remote. But, check it!...

lemonzest:hub mjankowski$ staging restore production
 !    You do not have access to the app hub-staging.
lemonzest:hub mjankowski$ git remote -v | grep staging
staging git@heroku.com:thoughtbot-hub-staging.git (fetch)
staging git@heroku.com:thoughtbot-hub-staging.git (push)

It looks like whatever parity code attempts to convert the remote name to a heroku app name is not getting the correct value? In this case, it should be thoughtbot-hub-staging and not just hub-staging ...?

@eignerchris
Copy link
Author

@geoffharcourt yes the two applications I tested on are not owned by me. I am merely a collaborator.

@geoffharcourt
Copy link
Collaborator

@mjankowski it turns out the applications I was having a problem with happened to fit the pattern of having been transferred out of the thoughtbot org, so that was a false clue.

I think the issue is when the application's folder on the development machine doesn't have the same name as the Heroku app. I just renamed my app that was having trouble, and staging restore production started working.

We can try parsing the app name out of Heroku remotes, but for the time being the fix is to name sure your app is the none -staging/-production part of the Heroku app name.

I'll try to tackle this in code before we make a docs change.

geoffharcourt added a commit that referenced this issue Jan 22, 2016
Several reports have matched #72, which was affecting the `restore`
command for some users. The cause turned out to be local folder names
not matching the name of the Heroku app. Now that Heroku tracks Git
remotes, we can take advantage of the Git remote to correctly identify
the app name even the local folder name doesn't match.

While this requirement has existed for the entirety of Parity's
existence, it stopped being a problem for most commands once Heroku
introduced remotes. I inadvertently reintroduced this requirement in
ad2c21a when we started automatically
bypassing confirmation arguments for restores to non-production
environments.

Fix #72.
@geoffharcourt
Copy link
Collaborator

@eignerchris PR if you want to take a peek to fix the problem.

geoffharcourt added a commit that referenced this issue Jan 22, 2016
Several reports have matched #72, which was affecting the `restore`
command for some users. The cause turned out to be local folder names
not matching the name of the Heroku app. Now that Heroku tracks Git
remotes, we can take advantage of the Git remote to correctly identify
the app name even the local folder name doesn't match.

While this requirement has existed for the entirety of Parity's
existence, it stopped being a problem for most commands once Heroku
introduced remotes. I inadvertently reintroduced this requirement in
ad2c21a when we started automatically
bypassing confirmation arguments for restores to non-production
environments.

Fix #72.
geoffharcourt added a commit that referenced this issue Jan 22, 2016
Several reports have matched #72, which was affecting the `restore`
command for some users. The cause turned out to be local folder names
not matching the name of the Heroku app. Now that Heroku tracks Git
remotes, we can take advantage of the Git remote to correctly identify
the app name even the local folder name doesn't match.

While this requirement has existed for the entirety of Parity's
existence, it stopped being a problem for most commands once Heroku
introduced remotes. I inadvertently reintroduced this requirement in
ad2c21a when we started automatically
bypassing confirmation arguments for restores to non-production
environments.

Fix #72.
geoffharcourt added a commit that referenced this issue Jan 22, 2016
Several reports have matched #72, which was affecting the `restore`
command for some users. The cause turned out to be local folder names
not matching the name of the Heroku app. Now that Heroku tracks Git
remotes, we can take advantage of the Git remote to correctly identify
the app name even the local folder name doesn't match.

While this requirement has been present for the entirety of Parity's
existence, it stopped being a problem for most commands once Heroku
introduced remotes. I inadvertently reintroduced this requirement in
ad2c21a when we started automatically
bypassing confirmation arguments for restores to non-production
environments.

Fix #72.
geoffharcourt added a commit that referenced this issue Jan 25, 2016
Several reports have matched #72, which was affecting the `restore`
command for some users. The cause turned out to be local folder names
not matching the name of the Heroku app. Now that Heroku tracks Git
remotes, we can take advantage of the Git remote to correctly identify
the app name even the local folder name doesn't match.

While this requirement has been present for the entirety of Parity's
existence, it stopped being a problem for most commands once Heroku
introduced remotes. I inadvertently reintroduced this requirement in
ad2c21a when we started automatically
bypassing confirmation arguments for restores to non-production
environments.

Fix #72.
geoffharcourt added a commit that referenced this issue Jan 25, 2016
Several reports have matched #72, which was affecting the `restore`
command for some users. The cause turned out to be local folder names
not matching the name of the Heroku app. Now that Heroku tracks Git
remotes, we can take advantage of the Git remote to correctly identify
the app name even the local folder name doesn't match.

While this requirement has been present for the entirety of Parity's
existence, it stopped being a problem for most commands once Heroku
introduced remotes. I inadvertently reintroduced this requirement in
ad2c21a when we started automatically
bypassing confirmation arguments for restores to non-production
environments.

I've moved the `git` and `rake` dependencies to the gemspec, as they do
not appear to be installed by default if they are listed in the Gemfile.
Fix #72.
@cantonyselim
Copy link

I am still having this exact issue. When I run staging restore production, I get ! App not found. If I run staging restore-from production, I get

 !    restore-from` is not a heroku command.
 !    See `heroku help` for a list of available commands.

I am the owner of the heroku apps in question they do not belong to an org. Here are my remotes:

production      https://git.heroku.com/my-production-app.git (fetch)
production      https://git.heroku.com/my-production-app.git  (push)
staging https://git.heroku.com/my-staging-app.git (fetch)
staging https://git.heroku.com/my-staging-app.git  (push)

@geoffharcourt
Copy link
Collaborator

Hi @cantonyselim I haven't pushed v0.9.3 (where the fix is merged) out yet due to a dependency issue. I'm going to leave this ticket open until we do so.

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

No branches or pull requests

4 participants