Skip to content

v2-Migration: Resource controller #776

@frewilhelm

Description

@frewilhelm

Description

We need to migrate the library functions used within the resource controller from the old OCM implementation to the new OCM library. This will ensure compatibility with the latest features, improved maintainability, and better support for future updates.

The purpose of the resource controller was to validate to verify the resource and provide the access in its status.

Current actions of the resource controller:

  1. Get Repository Spec
  2. Verify Component Version get Descriptors
  3. Get Resource Access from Component Version based on Resource Reference
    • Resolve resource reference and get resource
    • Verify resource by comparing digests (from cv vs. remote (probably downloads the resource to get the digest))
  4. Get actual component descriptor of referenced resource (could be nested)
  5. Set actual component version and repository spec in resource status

After the migration the resource controller won't download the resource anymore but do:

  1. Get component descriptor from cache (should already be verified)
  2. Display warning if component descriptor does not contain a digest spec, but proceed for now
  3. Resolve resource from resource reference
    1.1 Requires implementation of resolving the resource reference for nested CVs
  4. Check if resolved resource access has a DigestProcessor (see OCI digest processor for reference)
    1.1 If access type has no DigestProcessor display warning and proceed (we won't download the resource for now)
  5. Expose resource access (the updated resource access if the DigestProcessor returned one)

Done Criteria

  • Identify all usages of old OCM functions in the resource controller.
  • Replace them with their equivalents from the new OCM library.
  • Update imports and resolve any breaking changes.
  • Refactor code as needed to accommodate API changes.
  • Code has been reviewed by other team members
  • Analysis of existing tests (Unit and Integration)
  • Unit Tests created for new code or existing Unit Tests updated
  • Integration Test Suite updated (includes deletion of existing unnecessary Integration Test and/or creation of new ones if required)
  • Enduser Documentation updated (if applicable)
  • Internal technical Documentation created/updated (if applicable)
  • Successful demonstration in Review

Metadata

Metadata

Labels

area/ipceiImportant Project of Common European Interestkind/tasksmall task, normally part of feature or epic

Type

No fields configured for Task.

Projects

Status
🔍 Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions