Skip to content

refactor(v0s): merge legacy vulnerability package - #680

Merged
rbjornstad merged 1 commit into
mainfrom
chore/merge-vulnerability-packages
Dec 3, 2026
Merged

rbjornstad merged 1 commit into
mainfrom
chore/merge-vulnerability-packages

Conversation

@rbjornstad

Copy link
Copy Markdown
Contributor

This pull request merges the legacy vulnerability package into the v0s package, streamlining the codebase and maintaining the GraphQL contract. Key changes include:

  • Moved historical models and activity logs from the vulnerability package to the v0s package.
  • Consolidated GraphQL schemas into a single v0s.graphqls file, preserving the contract with only minor changes in enum order.
  • Removed separate files for historical models and activity logs, integrating their content into models.go and activitylog.go respectively.
  • Updated tests and ensured code formatting and generation are stable, with tests passing without CGo.

This refactor aims to simplify the structure and improve maintainability while keeping the functionality intact.

Consolidate historical vulnerability models, activity log handlers and GraphQL schema under v0s while preserving the public contract and stored event payloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues remain for the consolidation of legacy vulnerability support into v0s.

No open issues 🎉

3 files not reviewed
  • internal/graph/gengql/activitylog.generated.go: Generated file
  • internal/graph/gengql/schema.generated.go: Generated file
  • internal/graph/gengql/v0s.generated.go: Generated file
What changed in this PR

Consolidates legacy vulnerability support into v0s, simplifying domain ownership while preserving the public GraphQL contract and historical activity data.

Changes:

  • Moves historical models and activity-log handling into v0s.
  • Consolidates schemas and updates generated GraphQL bindings.
  • Adds historical activity-log tests and updates migration documentation.
File Description
internal/​vulnerability/​models.go Removes relocated legacy models.
internal/​vulnerability/​activitylog.go Removes relocated activity-log handling.
internal/​v0s/​models.go Incorporates historical models and enums.
internal/​v0s/​image_vulnerability_activitylog_test.go Tests historical payloads, IDs, and errors.
internal/​v0s/​activitylog.go Incorporates historical event registration and transformation.
internal/​graph/​schema/​vulnerability.graphqls Removes the separate legacy schema.
internal/​graph/​schema/​v0s.graphqls Incorporates historical GraphQL types.
internal/​graph/​gengql/​vulnerability.generated.go Removes superseded generated bindings.
internal/​graph/​gengql/​v0s.generated.go Adds bindings for relocated types.
internal/​graph/​gengql/​schema.generated.go Updates Node dispatch to v0s types.
internal/​graph/​gengql/​root_.generated.go Updates embedded schema organization.
internal/​graph/​gengql/​activitylog.generated.go Updates activity-log dispatch to v0s.
internal/​activitylog/​webhook/​ignored_events_test.go Loads event registrations from v0s.
docs/​v0s_console_migration.md Documents consolidated ownership and compatibility.
.configs/​gqlgen.yaml Removes the legacy package autobinding.

Review effort: Balanced

@rbjornstad
rbjornstad merged commit 6205b2e into main Dec 3, 2026
13 checks passed
@rbjornstad
rbjornstad deleted the chore/merge-vulnerability-packages branch December 3, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants