Custom Routes: use existing server's mux container instead of gorilla.Mux#115605
Custom Routes: use existing server's mux container instead of gorilla.Mux#115605
Conversation
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
Error building instance: Contact #proj-ephemeral-hg-instances if it is not a compile error. Logs Error messagehandling pull request comment event: running grafana-build deb: executing command: stdout= stderr=go: downloading go1.25.5 (linux/amd64) exit status 1 |
5bf5f62 to
eea7ec9
Compare
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
830ee38 to
a088cd0
Compare
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
9cbe7d3 to
2fe4166
Compare
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
Error building instance: Contact #proj-ephemeral-hg-instances if it is not a compile error. Logs Error messagehandling pull request comment event: calling gcom to upsert instance: updating instance: unexpected response status: status=429 responseBody={ |
|
|
Error building instance: Contact #proj-ephemeral-hg-instances if it is not a compile error. Logs Error messagehandling pull request comment event: running grafana-build deb: executing command: stdout= stderr=go: downloading go1.25.5 (linux/amd64) exit status 1 |
|
/deploy-to-hg --enterprise-ref charandas/registered-web-services |
|
|
|
🚀 Your submission is now being built and packaged.
|
What is this feature?
The gorilla.Mux implementation of custom routes was/has been a bandaid in the way I implemented custom routes in the beginning. It was used because the code in K8s apiserver was perhaps not well understood.
A side-effect of using the Mux in front of the delegate chain of the core server (and by chance, aggregator's as well) surfaced recently. For remote APIs with custom routes, their local API had to be disabled using
--runtime-configin the core entrypoint server. Simply aggregating the remote server wasn't enough - that's because gorilla.Mux took a look and determined if aroutewas useful even before the aggregator's chain took a look at it.This changeset fixes the issue by learning from prior art in grafana-app-sdk. It doesn't exactly do what grafana-app-sdk does as it does a lot more.
As a bonus, the PR does away with one such API (
features.grafana.appbeing required with a runtime-config offalsewhen aggregated) because that is no longer necessary with this changeset.Why do we need this feature?
This allows us to disentangle aggregator's chain from core server. Also, this means we won't be repeating authorization for remote APIs at the entrypoint, following the best practice in K8s aggregation layer docs.
Who is this feature for?
Grafana App Platform
Which issue(s) does this PR fix?:
Fixes https://github.com/grafana/grafana-org/issues/775
Special notes for your reviewer:
Please check that: