Skip to content

CMP-4599: Fix workloadNeedsUpdate to detect celContentFile changes - #1345

Merged
Vincent056 merged 1 commit into
ComplianceAsCode:masterfrom
taimurhafeez:fix/workload-needs-update-cel-content-file
Aug 17, 2026
Merged

CMP-4599: Fix workloadNeedsUpdate to detect celContentFile changes#1345
Vincent056 merged 1 commit into
ComplianceAsCode:masterfrom
taimurhafeez:fix/workload-needs-update-cel-content-file

Conversation

@taimurhafeez

@taimurhafeez taimurhafeez commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

workloadNeedsUpdate only compared container images when deciding whether to re-deploy the profileparser workload. This meant that adding or changing spec.celContentFile on an already-VALID ProfileBundle was silently ignored — the controller logged "Skip reconcile: Workload already up-to-date" because the content image hadn't changed, even though the init container commands needed to include the new --cel-path flag and the additional cp command for the CEL content file.

Without a re-deploy, the old parser pod kept running with the old commands (no --cel-path), so CEL profiles like cis-vm-extension were never created. The ProfileBundle status stayed VALID from the initial XCCDF-only parse, and any downstream consumer waiting for CEL profiles would fail with "profile not found".

Compare the content-container shell command and profileparser command arguments against what contentCopyCommand and profileparserCommand would produce for the current ProfileBundle spec. When celContentFile is added or changed, the commands differ, workloadNeedsUpdate returns true, and the existing re-deploy logic sets status to PENDING, updates the deployment, and the parser re-runs with the CEL content included.

Co-authored by Claude.
Related PR.

@openshift-ci
openshift-ci Bot requested a review from vickeybrown August 17, 2026 08:59
@openshift-ci

openshift-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: taimurhafeez

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown

🤖 To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:1345-ed8e6dee9bd1002aa6b77081aa7a3bb86790c656

@abushkin-redhat

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Aug 17, 2026
@taimurhafeez taimurhafeez changed the title Fix workloadNeedsUpdate to detect celContentFile changes CMP-4599: Fix workloadNeedsUpdate to detect celContentFile changes Aug 17, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Collaborator

@taimurhafeez: This pull request references CMP-4599 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.1.0" version, but no target version was set.

Details

In response to this:

workloadNeedsUpdate only compared container images when deciding whether to re-deploy the profileparser workload. This meant that adding or changing spec.celContentFile on an already-VALID ProfileBundle was silently ignored — the controller logged "Skip reconcile: Workload already up-to-date" because the content image hadn't changed, even though the init container commands needed to include the new --cel-path flag and the additional cp command for the CEL content file.

Without a re-deploy, the old parser pod kept running with the old commands (no --cel-path), so CEL profiles like cis-vm-extension were never created. The ProfileBundle status stayed VALID from the initial XCCDF-only parse, and any downstream consumer waiting for CEL profiles would fail with "profile not found".

Compare the content-container shell command and profileparser command arguments against what contentCopyCommand and profileparserCommand would produce for the current ProfileBundle spec. When celContentFile is added or changed, the commands differ, workloadNeedsUpdate returns true, and the existing re-deploy logic sets status to PENDING, updates the deployment, and the parser re-runs with the CEL content included.

Related PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Vincent056 Vincent056 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@Vincent056 Vincent056 modified the milestone: 1.10.0 Aug 17, 2026
@Vincent056

Copy link
Copy Markdown

/retest

@Vincent056
Vincent056 merged commit 96d853d into ComplianceAsCode:master Aug 17, 2026
13 of 26 checks passed
Vincent056 added a commit that referenced this pull request Aug 17, 2026
The concurrent merges of #1311 and #1345 each passed the unit coverage gate
individually but combine to 24.1% on master, 0.1 below the recorded baseline -
failing the unit job for every PR. Record the actual value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Vincent056 added a commit that referenced this pull request Aug 18, 2026
The concurrent merges of #1311 and #1345 each passed the unit coverage gate
individually but combine to 24.1% on master, 0.1 below the recorded baseline -
failing the unit job for every PR. Record the actual value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants