Skip to content

Conversation

n3rdc4ptn
Copy link
Member

@n3rdc4ptn n3rdc4ptn commented Aug 7, 2025

What this PR does / why we need it:
This pull request introduces improved filtering and error handling in the GetOCMComponentsWithVersions function in internal/ocm/ocm.go. The changes ensure that component versions with specific labels are ignored, and that versions without resources are logged and skipped, making the component selection process more robust.

Filtering and error handling improvements:

  • Skips component versions with the label openmcp.cloud/ignore set to "true", preventing them from being included in the results.
  • Logs an error and skips component versions that do not have any resources, ensuring only valid versions are processed.

Release note:

Releasechannel component can now have the `openmcp.cloud/ignore` label to be ignored by the control-plane-operator

@n3rdc4ptn n3rdc4ptn self-assigned this Aug 7, 2025
@n3rdc4ptn n3rdc4ptn enabled auto-merge (squash) August 7, 2025 08:05
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 pull request adds improved filtering logic to the GetOCMComponentsWithVersions function to skip component versions based on labels and resource validation. The changes make the component selection process more robust by filtering out unwanted versions and handling edge cases.

  • Adds filtering to skip component versions with the openmcp.cloud/ignore label set to "true"
  • Implements validation to skip and log component versions that have no resources
  • Introduces logging functionality with the log package import

@n3rdc4ptn n3rdc4ptn changed the title feat: add releasechannel ignore label feat(releasechannel): add releasechannel ignore label Aug 7, 2025
maximiliantech
maximiliantech previously approved these changes Aug 7, 2025
@maximiliantech maximiliantech disabled auto-merge August 7, 2025 14:21
@maximiliantech maximiliantech merged commit d5ec2ec into main Aug 7, 2025
7 checks passed
@maximiliantech maximiliantech deleted the add-releasechannel-ignore-label branch August 7, 2025 14:21
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.

2 participants