grafana/oncall

[OSS] SLACK_INSTALL_RETURN_REDIRECT_HOST does not respect port info

FecoDoo opened this issue · 1 comments

What went wrong?

What happened:

The final value of SLACK_INSTALL_RETURN_REDIRECT_HOST does not inherit port number which is defined with its associated environment variable, which eventually leads to a 404 not found error due to mis-redirecting when trying to activate the Slack IRM integration in Grafana OnCall plugin:

https://<domain>/api/internal/v1/complete/slack-install-free/?slack_login_token=<dedacted>&code=<dedacted>&state=

What did you expect to happen:

Respect the full string of SLACK_INSTALL_RETURN_REDIRECT_HOST environment variable under https:///a/grafana-oncall-app/settings?tab=EnvVariables.

How do we reproduce it?

  1. Setup Grafana OSS and Grafana OnCall OSS
  2. Define env variable SLACK_INSTALL_RETURN_REDIRECT_HOST as https://fqdn:8080
  3. Open Grafana OnCall plugin and install Slack IRM integration
  4. Wait for redirecting back to https://fqdn/api/internal/v1/complete/slack-install-free/?slack_login_token=&code=&state= with a 404 error

Grafana OnCall Version

v1.13.6

Product Area

Chatops

Grafana OnCall Platform?

Other

User's Browser?

MS Edge

Anything else to add?

No response

Never mind, turns out to be a cache issue, re-deploying oncall engine and DB migration fixed the issue.