Skip to content

Conversation

joelanford
Copy link
Member

  1. Adds new generic File struct that contains raw data AND the typed value it represents. Useful for preserving original user-provided data while also giving programmatic access to the struct value.
  2. Generally improved structure and API that ensures that a registry+v1 Bundle instance can only be initialized by a Loader (new interface) that can validate it before handing back to a user.

1. Validate that all CRD versions in the manifests are listed as owned
   in the CSV spec
2. Validate that there are no duplicate manifests (based on group, kind,
   and name)
@joelanford joelanford requested a review from Copilot August 20, 2025 17:37
Copy link

@Copilot Copilot AI left a comment

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 refactors the registry+v1 bundle definition package to improve API design and structure. The refactoring introduces a new generic File struct that preserves both raw data and typed values, and ensures bundle instances can only be created through validated loaders.

  • Adds a new generic File struct for preserving both raw data and typed values
  • Restructures the API to use interfaces (Loader pattern) for validated bundle creation
  • Reorganizes code by moving shared functionality to internal packages

Reviewed Changes

Copilot reviewed 17 out of 216 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/pkg/spec/registryv1.go Updates bundle loading to use new BundleFSLoader interface
internal/pkg/bundle/registry/v1/oci.go Removes OCI marshaling code (moved to bundle.go)
internal/pkg/bundle/registry/v1/oci_test.go Removes OCI marshaling tests (moved to bundle_test.go)
internal/pkg/bundle/registry/v1/metadata.go Refactors metadata handling with new File struct and loader pattern
internal/pkg/bundle/registry/v1/metadata_test.go Updates tests for new metadata structure and validation
internal/pkg/bundle/registry/v1/manifests.go Refactors manifest handling with improved validation and File struct
internal/pkg/bundle/registry/v1/manifests_test.go Updates manifest tests for new structure
internal/pkg/bundle/registry/v1/file.go Adds new generic File struct for data and value preservation
internal/pkg/bundle/registry/v1/bundle.go Restructures bundle creation with loader pattern and adds OCI marshaling
internal/pkg/bundle/registry/v1/bundle_test.go Updates bundle tests for new loader-based API
internal/pkg/bundle/registry/internal/supported_kinds.go Moves supported kinds definitions to internal package
internal/pkg/bundle/registry/internal/do.go Adds utility function for error collection
go.mod Updates Go version and various dependencies
demos/bundles/registryv1/argocd-operator/Makefile Adds new demo Makefile
demos/bundles/registryv1/Makefile Updates demo Makefile to use subdirectory pattern
demos/bundles/Makefile Adds new demo Makefile for bundle builds
demos/Makefile Updates to limit directory depth search
Comments suppressed due to low confidence (6)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@joelanford joelanford merged commit a746de7 into main Aug 20, 2025
1 check passed
@joelanford joelanford deleted the loader branch August 20, 2025 18:44
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.

1 participant