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

Support absolute Grafana dashboard URLs #1374

Merged
merged 3 commits into from
Sep 20, 2023
Merged

Conversation

AndiDog
Copy link
Contributor

@AndiDog AndiDog commented Sep 19, 2023

This is to support URLs such as dashboard: https://giantswarm.grafana.net/d/a2f4976Zk/certificates?orgId=1 which do not point to the installation's Grafana, but a Grafana Cloud dashboard. Right now, such URLs get joined to something wrong like https://installation-grafana/d/https://giantswarm.grafana.net/d/a2f4976Zk/certificates?orgId=1.

I didn't find a good way of testing this. Should we maybe update service/controller/resource/alerting/alertmanagerconfig/test/notification-template/case*.golden with the fixed {{ define "__dashboardurl" -}} and add a test in there?

Checklist

I have:

  • Described why this change is being introduced
  • Separated out refactoring/reformatting in a dedicated PR
  • Updated changelog in CHANGELOG.md

@AndiDog AndiDog requested a review from a team as a code owner September 19, 2023 15:14
@hervenicol
Copy link
Contributor

I like it 👍

@QuentinBisson
Copy link
Contributor

@AndiDog can you run go test ./... -update to update the golden files?

@QuentinBisson
Copy link
Contributor

I ran the tests

@QuentinBisson QuentinBisson enabled auto-merge (squash) September 20, 2023 14:27
@QuentinBisson QuentinBisson merged commit 0313bca into master Sep 20, 2023
2 checks passed
@QuentinBisson QuentinBisson deleted the dashboard-absolute-urls branch September 20, 2023 14:29
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 this pull request may close these issues.

3 participants