Repository navigation
Eksponer pakketype-facets for image-sårbarheter - #622
Conversation
|
Kan vi gjøre dette på samme måte som andre steder ved hjelp av facets? |
There was a problem hiding this comment.
🔵 Needs a closer look
OpenTelemetry logging compatibility remains unresolved without full API build/startup validation, and rollout of the still-open nais/v13s#544 must be confirmed before deploying API metadata to avoid silently empty packageTypes.
No open issues 🎉
2 files not reviewed
internal/graph/gengql/vulnerability.generated.go: Generated fileinternal/graph/gengql/workloads.generated.go: Generated file
What changed in this PR
Exposes registered package types per image through Nais API’s GraphQL interface so Console can offer dynamic filter choices. Existing pagination, sorting, package-type filtering, and vulnerability summaries are preserved.
Changes:
- Add
packageTypestoImageVulnerabilityConnectionand pass through v13s metadata. - Extend the fake client and tests to preserve package choices across filtering and pagination.
- Regenerate GraphQL bindings and update the v13s dependency and related modules.
| File | Description |
|---|---|
internal/vulnerability/queries.go |
Return package types alongside the paginated findings. |
internal/vulnerability/queries_test.go |
Verify upstream package types reach the connection. |
internal/vulnerability/models.go |
Extend the connection model with package types. |
internal/vulnerability/fake/v13s.go |
Collect sorted, distinct types before filtering and pagination. |
internal/vulnerability/fake/v13s_test.go |
Verify package choices remain complete across filtered pages. |
internal/graph/vulnerability.resolvers.go |
Return the extended domain connection type. |
internal/graph/schema/vulnerability.graphqls |
Define and document the non-null packageTypes list. |
internal/graph/gengql/workloads.generated.go |
Update generated resolver signatures and connection binding. |
internal/graph/gengql/vulnerability.generated.go |
Generate serialization for the extended connection. |
internal/graph/gengql/root_.generated.go |
Register the field in schema, dispatch, and complexity handling. |
go.sum |
Refresh checksums for updated dependencies. |
go.mod |
Select the v13s revision exposing package types and update related dependencies. |
Review effort: Balanced
Riktig, det visste jeg ikke, sjekker det opp :) |
4f6a75f to
9a5099a
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new public ImageVulnerabilityFacets type lacks a GraphQL description explaining that its counts cover all matching findings independently of pagination; add that documentation and regenerate the bindings.
1 open issue
2 files not reviewed
internal/graph/gengql/vulnerability.generated.go: Generated fileinternal/graph/gengql/workloads.generated.go: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Human confirmation of the backend rollout for the still-open, blocked nais/v13s#544 is needed before this auto-deploying API merges, because fake-backed tests cannot verify production compatibility or deployment ordering.
No open issues 🎉
1 resolved since last review
2 files not reviewed
internal/graph/gengql/vulnerability.generated.go: Generated fileinternal/graph/gengql/workloads.generated.go: Generated file
Review effort: Balanced
|
@thokra-nav nå er vulnz facets kompatibel 👍🏾 |
9c21f8b to
99babf4
Compare
99babf4 to
5ea629f
Compare

Eksponerer vulnerabilities.facets.packageTypes med StringFacetItem (value og count), i tråd med eksisterende facet-mønster. Facets dekker alle sider og respekterer gjeldende filtre. Samme image-connection brukes av apper og Jobs; paginering og sortering er uendret. Ingen summary-endringer.