Merged
Conversation
388cc0e to
e50a263
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “instance group” introspection to the GraphQL API so clients can inspect ReplicaSet-backed rollout revisions, including env vars, mounted files, instances (pods), and recent K8s events.
Changes:
- Introduces
instancegroupworkload package (models, queries, event translation, dataloader + ReplicaSet watcher). - Extends GraphQL schema and resolvers to expose
Application.instanceGroupsandInstanceGroupdetails. - Adjusts Pod transformer to retain
metadata.ownerReferencesso pods can be matched to ReplicaSets.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/workload/instancegroup/queries.go | Core listing + introspection logic for env vars, mounts, and instance (pod) membership |
| internal/workload/instancegroup/events.go | Fetches and translates K8s events for ReplicaSets/pods into user-friendly messages |
| internal/workload/instancegroup/models.go | Defines InstanceGroup and related GraphQL-facing models/enums |
| internal/workload/instancegroup/dataloader.go | Adds loaders + ReplicaSet transformer + environment->dynamic client lookup |
| internal/workload/instancegroup/node.go | Registers InstanceGroup as a Node ident type |
| internal/workload/dataloader.go | Keeps Pod ownerReferences in cached pods to enable ReplicaSet ownership matching |
| internal/kubernetes/watchers/watchers.go | Wires a new ReplicaSet watcher into the global watcher set |
| internal/graph/schema/instancegroup.graphqls | Adds GraphQL types/fields for instance groups and related types |
| internal/graph/instancegroup.resolvers.go | Implements resolvers for instanceGroups, env vars, mounts, instances, events |
| internal/cmd/api/http.go | Injects instancegroup loader context into Graph request pipeline |
| .configs/gqlgen.yaml | Adds instancegroup package to gqlgen autobind |
| internal/graph/gengql/applications.generated.go | gqlgen output wiring Application.instanceGroups |
| internal/graph/gengql/instancegroup.generated.go | gqlgen output for InstanceGroup types/resolvers |
| internal/graph/gengql/schema.generated.go | gqlgen output: Node type switch + schema inclusion |
| internal/graph/gengql/root_.generated.go | gqlgen output: resolver root + complexity hooks |
| internal/graph/gengql/teams.generated.go | gqlgen output: Application field context updates |
| internal/graph/gengql/issues.generated.go | gqlgen output: Application field context updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… value resolution
Lua integration tests covering: - Application with instance groups (ReplicaSet filtering) - Instance group with instances (Pod listing) - Instance group with environment variables (env, configMapKeyRef, secretKeyRef, envFrom) - Instance group with mounted files (ConfigMap/Secret volume mounts) Also includes dataloader transformer idempotency unit test.
Include image name, container name, pod name, and rescale size in translated event messages instead of dropping them. Also remove nais.yaml tips from scheduling failure messages.
8519e42 to
a4382d4
Compare
…ss, and last termination info Extend ApplicationInstanceStatus with ready, lastExitReason, and lastExitCode fields to give users actionable insight into instance health. Replace raw Kubernetes reason strings with human-readable messages. Add TERMINATED state for containers that exited successfully. Fix State() to use classifyWaiting so benign startup states no longer incorrectly report Application as NOT_RUNNING.
…atterns
- Replace benignWaiting map[string]struct{} with slices.Contains
- Separate benign and problem message maps, remove redundant switch
- Replace sort.Slice with slices.SortFunc using time.Compare
- Replace sort.Strings with slices.Sorted(maps.Keys(...))
- Replace IsValid() switch statements with slices.Contains
thokra-nav
reviewed
Apr 15, 2026
thokra-nav
reviewed
Apr 15, 2026
thokra-nav
approved these changes
Apr 15, 2026
…onsistency with secret/config packages
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.
No description provided.