Skip to content

Remove ingress metrics from GraphQL API#482

Open
rbjornstad wants to merge 3 commits into
mainfrom
remove-ingress-metrics
Open

Remove ingress metrics from GraphQL API#482
rbjornstad wants to merge 3 commits into
mainfrom
remove-ingress-metrics

Conversation

@rbjornstad

Copy link
Copy Markdown
Contributor

Summary

Removes ingress metrics types and their implementation from the GraphQL API.

Changes

  • Remove IngressMetrics, IngressMetricsInput, IngressMetricSample, and IngressMetricsType from the GraphQL schema (applications.graphqls)
  • Delete internal/workload/application/prometheus.go
  • Remove related model types (IngressMetricSample, IngressMetricsInput, IngressMetricsType) from application/models.go
  • Remove ingress metrics resolver from applications.resolvers.go
  • Regenerate GraphQL code
  • Update dataloader and HTTP setup accordingly

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.metrics and the related IngressMetrics* 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

Comment thread internal/graph/schema/applications.graphqls
Comment thread internal/workload/application/models.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • internal/graph/gengql/applications.generated.go: Generated file

@rbjornstad rbjornstad marked this pull request as ready for review June 30, 2026 11:09
@rbjornstad rbjornstad requested a review from a team as a code owner June 30, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants