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

Capistrano 3 integration should use fetch(:stage) #94

Closed
lucidstack opened this issue Feb 11, 2016 · 3 comments · Fixed by #96
Closed

Capistrano 3 integration should use fetch(:stage) #94

lucidstack opened this issue Feb 11, 2016 · 3 comments · Fixed by #96

Comments

@lucidstack
Copy link

Hi there,

I'm trying out the appsignal gem, and while it works quite smoothly, I'm having an issue with capistrano deployments: appsignal always thinks I'm deploying to production, while I'm actually deploying to staging.

I think the culprit of this is at lib/appsignal/integrations/capistrano/appsignal.cap:3 :

  1 namespace :appsignal do
  2   task :deploy do
  3     env = fetch(:rails_env, fetch(:rack_env, 'production')) #### <=
  4     user = ENV['USER'] || ENV['USERNAME']
  5     revision = fetch(:appsignal_revision, fetch(:current_revision))

Appsignal is using :rails_env or :rack_env, while it's pretty much standard to use fetch(:stage). This will make appsignal use the right environment. Right now, if I capistrano staging deploy, a deploy appears in the production environment. By using fetch(:stage), staging is used for deployment tracking, as I think it should be. :)

Thanks a lot in advance!

@lucidstack
Copy link
Author

Could I have some feedback on this, guys?

@thijsc
Copy link
Member

thijsc commented Feb 15, 2016

This makes a lot of sense, we'll make this change. I expect we can do this for the next 1.2 release.

@lucidstack
Copy link
Author

Thanks a lot, @thijsc! 👍

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 a pull request may close this issue.

2 participants