Closed baburdick closed 6 years ago
Thanks for reporting this. I haven't been able to reproduce this by just using the hipchat client, so I'm wondering if this is related to the type of hipchat token that Capistrano is using.
Are you using a token from https://atlassian.hipchat.com/account/api, or from https://atlassian.hipchat.com/admin/api?
I believe I know what's going on. On 1.6.0, we changed the default API version from v1 to v2 (https://github.com/hipchat/hipchat-rb/commit/2a8b6e0ced6ff12fdc86f2a130ec8f3cd033ee96). This is causing the Capistrano task to call the v2 APIs instead of the V1, which causes authentication issues.
Setting the api_version to v1 on your task should fix the authentication issue for you:
set :hipchat_options, { :api_version => "v1" }
Could you let me know if this solves the issue for you? I'll update the release notes to make this more obvious.
This works for me. 👍
But how should we implement the v2 now? We are using the Capistrano Integration from the Hipchat Marketplace, but it only generates a v1 token. I can only generate personal v2 token. But this would result in a Hipchat message from the token owner saying "Z is deploying". Am I missing something?
I was able to generate v2 Room tokens to solve our issues. It was a simple change that took a while to research. I did not try the workaround: set :hipchat_options, { :api_version => "v1" }
. In the meantime, we just didn't upgrade.
This issue can be closed.
This is by design. On 1.6.0 we switched the default api_version from v1 to v2. If you need to use a v1 token, then you should update your code to set the api_version, as described above.
Downgrading works around this issue: