Remove ingress metrics from GraphQL API#482
Open
rbjornstad wants to merge 3 commits into
Open
Conversation
Removes the IngressMetrics, IngressMetricSample, and IngressMetricsType types and their associated resolvers, models, and Prometheus client code. - Remove IngressMetrics, IngressMetricsInput, IngressMetricSample, and IngressMetricsType from the GraphQL schema - Delete internal/workload/application/prometheus.go - Remove related model types from application/models.go - Remove ingress metrics resolver from applications.resolvers.go - Regenerate GraphQL code - Update dataloader and HTTP setup accordingly
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the ingress metrics surface area from the Nais API GraphQL schema and strips out the associated Go implementation and wiring (resolvers + loader context), followed by regenerated gqlgen output.
Changes:
- Removed
Ingress.metricsand the relatedIngressMetrics*types/inputs/enums from the GraphQL schema. - Removed the Prometheus-backed ingress metrics implementation and resolver plumbing.
- Updated loader context setup and regenerated gqlgen code to reflect the schema changes.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/workload/application/prometheus.go | Deleted Prometheus ingress-metrics implementation. |
| internal/workload/application/models.go | Removed ingress-metrics GraphQL model types (input/sample/enum); IngressMetrics wrapper type remains. |
| internal/workload/application/dataloader.go | Removed Prometheus client from application loader context. |
| internal/thirdparty/promclient/fake/fake_test.go | Updated integration-test loader setup to match new NewLoaderContext signature. |
| internal/graph/schema/applications.graphqls | Removed Ingress.metrics field and ingress metrics schema types. |
| internal/graph/gengql/root_.generated.go | Regenerated: removed IngressMetrics resolver + complexity/unmarshal wiring. |
| internal/graph/gengql/applications.generated.go | Regenerated: removed IngressMetrics resolver interfaces and execution paths. |
| internal/graph/applications.resolvers.go | Removed ingress metrics resolvers and root registration. |
| internal/cmd/api/http.go | Updated GraphQL context setup to stop passing Prometheus client into application loaders. |
Files not reviewed (1)
- internal/graph/gengql/applications.generated.go: Generated file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes ingress metrics types and their implementation from the GraphQL API.
Changes
IngressMetrics,IngressMetricsInput,IngressMetricSample, andIngressMetricsTypefrom the GraphQL schema (applications.graphqls)internal/workload/application/prometheus.goIngressMetricSample,IngressMetricsInput,IngressMetricsType) fromapplication/models.goapplications.resolvers.go