Skip to content

ROX-34386: Backport changes from release branch#171

Open
mtodor wants to merge 2 commits into
mainfrom
mtodor/ROX-34386-backport-changes-from-release
Open

ROX-34386: Backport changes from release branch#171
mtodor wants to merge 2 commits into
mainfrom
mtodor/ROX-34386-backport-changes-from-release

Conversation

@mtodor

@mtodor mtodor commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR backports changes done in release branch.

Note for reviewer

  • specific version related changes should not be included (i.e. CPE, Konflux Application/Component name, etc.)

Validation

  • Let Konflux pipeline for PR run
  • Trigger Konflux "main push" pipeline with label
  • Check labels for build images by PR and main push pipeline are correct
  • Check that Snyk step runs

@mtodor
mtodor requested a review from janisz as a code owner July 24, 2026 09:31
@mtodor mtodor changed the title Mtodor/rox 34386 backport changes from release ROX-34386: Backport changes from release branch Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added automated build triggers for release branch pushes and tag pushes.
    • Added Git-based version detection and propagated the computed version into container image build and security scanning.
    • Enhanced image metadata with standardized labels, including versioning and platform details.
    • Added support for extra CPE labels to improve image identification and tracking.
  • Bug Fixes
    • Tightened main-branch automation to only run on eligible pushes and labeled pull requests, reducing unintended builds.

Walkthrough

Changes

The Tekton manifests separate main and release triggers, add CPE labels, and configure release builds. The component pipeline derives Git-based versions for image and Coverity tasks. The Dockerfile adds versioned runtime image metadata.

Konflux versioned builds

Layer / File(s) Summary
Main and release trigger manifests
.tekton/acs-mcp-server-pull-request.yaml, .tekton/acs-mcp-server-push-main.yaml, .tekton/acs-mcp-server-push-release.yaml
Main and release PipelineRuns define event filters, build parameters, CPE labels, pipeline wiring, and execution settings.
Version derivation and build propagation
.tekton/basic-component-pipeline.yaml
The pipeline derives VERSION from Git tags and passes it to container and Coverity tasks while combining generated and extra labels.
Runtime image metadata
konflux.Dockerfile
The runtime image accepts VERSION and defines container metadata labels.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitEvent
  participant PipelineAsCode
  participant PipelineRun
  participant basic-component-pipeline
  participant determine-version
  participant buildah-remote-oci-ta
  GitEvent->>PipelineAsCode: push or pull_request event
  PipelineAsCode->>PipelineRun: select main or release trigger
  PipelineRun->>basic-component-pipeline: start configured pipeline
  basic-component-pipeline->>determine-version: provide cloned source
  determine-version->>determine-version: run git describe --tags --always
  determine-version->>buildah-remote-oci-ta: provide VERSION and combined LABELS
Loading

Suggested reviewers: janisz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: backporting release-branch changes.
Description check ✅ Passed The description is directly related to the backport and matches the changes in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mtodor/ROX-34386-backport-changes-from-release

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.tekton/acs-mcp-server-pull-request.yaml:
- Around line 57-60: Remove the placeholder extra-labels block from
.tekton/acs-mcp-server-pull-request.yaml lines 57-60,
.tekton/acs-mcp-server-push-main.yaml lines 68-71, and
.tekton/acs-mcp-server-push-release.yaml lines 66-69 so no pipeline publishes
the literal X.Y CPE version.

In @.tekton/basic-component-pipeline.yaml:
- Around line 200-205: Add a suitable limits.cpu value under
computeResources.limits in the shared stepTemplate for the new task steps,
alongside the existing memory limit, so both containers receive CPU limits while
preserving the current CPU request.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 86d619d4-8f80-42d5-a90e-ec0c06a95890

📥 Commits

Reviewing files that changed from the base of the PR and between c34f9f6 and 6818169.

📒 Files selected for processing (5)
  • .tekton/acs-mcp-server-pull-request.yaml
  • .tekton/acs-mcp-server-push-main.yaml
  • .tekton/acs-mcp-server-push-release.yaml
  • .tekton/basic-component-pipeline.yaml
  • konflux.Dockerfile

Comment on lines +57 to +60
- name: extra-labels
value:
# X.Y in the cpe label must be adjusted for every version stream.
- "cpe=cpe:/a:redhat:agentic_cluster_security_suite:X.Y::el9"

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not publish the literal X.Y CPE version.

The component pipeline forwards these values into image labels, so every affected image reports X.Y rather than a real version stream. This also contradicts the PR objective to exclude version-specific CPE changes from this backport.

  • .tekton/acs-mcp-server-pull-request.yaml#L57-L60: remove the placeholder extra-labels block.
  • .tekton/acs-mcp-server-push-main.yaml#L68-L71: remove the placeholder extra-labels block.
  • .tekton/acs-mcp-server-push-release.yaml#L66-L69: remove the placeholder extra-labels block.
📍 Affects 3 files
  • .tekton/acs-mcp-server-pull-request.yaml#L57-L60 (this comment)
  • .tekton/acs-mcp-server-push-main.yaml#L68-L71
  • .tekton/acs-mcp-server-push-release.yaml#L66-L69
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.tekton/acs-mcp-server-pull-request.yaml around lines 57 - 60, Remove the
placeholder extra-labels block from .tekton/acs-mcp-server-pull-request.yaml
lines 57-60, .tekton/acs-mcp-server-push-main.yaml lines 68-71, and
.tekton/acs-mcp-server-push-release.yaml lines 66-69 so no pipeline publishes
the literal X.Y CPE version.

Comment on lines +200 to +205
computeResources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 512Mi

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add a CPU limit to the new task steps.

requests.cpu only reserves capacity; it does not cap usage. stepTemplate applies to both new containers, so add a suitable limits.cpu alongside the memory limit.

Proposed fix
 limits:
+  cpu: 500m
   memory: 512Mi

As per path instructions, .tekton/** requires “Resource limits set on task containers.”

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
computeResources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 512Mi
computeResources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.tekton/basic-component-pipeline.yaml around lines 200 - 205, Add a suitable
limits.cpu value under computeResources.limits in the shared stepTemplate for
the new task steps, alongside the existing memory limit, so both containers
receive CPU limits while preserving the current CPU request.

Source: Path instructions

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

E2E Test Results

Commit: 67654a9
Workflow Run: View Details
Artifacts: Download test results & logs

=== Evaluation Summary ===

  ✓ list-clusters (assertions: 3/3)
  ✓ cve-clusters-general (assertions: 3/3)
  ✓ cve-cluster-does-exist (assertions: 3/3)
  ✓ cve-detected-workloads (assertions: 3/3)
  ✓ cve-cluster-list (assertions: 3/3)
  ✓ cve-cluster-does-not-exist (assertions: 3/3)
  ✓ cve-detected-clusters (assertions: 3/3)
  ✗ cve-nonexistent (assertions: 3/3)
      one or more verification steps failed
  ✓ cve-log4shell (assertions: 3/3)
  ✓ cve-multiple (assertions: 3/3)
  ✓ rhsa-not-supported (assertions: 2/2)

Tasks:      10/11 passed (90.91%)
Assertions: 32/32 passed (100.00%)
Tokens:     ~48790 (estimate - excludes system prompt & cache)
MCP schemas: ~12562 (included in token total)
Agent used tokens:
  Input:  15778 tokens
  Output: 18676 tokens
Judge used tokens:
  Input:  32255 tokens
  Output: 33345 tokens

@codecov-commenter

codecov-commenter commented Jul 24, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
380 2 378 12
View the full list of 2 ❄️ flaky test(s)
::policy 1

Flake rate in main: 100.00% (Passed 0 times, Failed 74 times)

Stack Traces | 0s run time
- test violation 1
- test violation 2
- test violation 3
::policy 4

Flake rate in main: 100.00% (Passed 0 times, Failed 74 times)

Stack Traces | 0s run time
- testing multiple alert violation messages 1
- testing multiple alert violation messages 2
- testing multiple alert violation messages 3

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@mtodor
mtodor force-pushed the mtodor/ROX-34386-backport-changes-from-release branch from 6818169 to 67654a9 Compare July 24, 2026 09:53

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.tekton/acs-mcp-server-push-main.yaml:
- Around line 21-27: Remove the pull_request trigger branch from the push
trigger conditions in .tekton/acs-mcp-server-push-main.yaml lines 21-27,
retaining only the main push trigger. Apply the same change in
.tekton/acs-mcp-server-push-release.yaml lines 21-27, retaining the release and
tag push triggers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: f66be5cf-29f6-438b-844a-26d5efe2ac34

📥 Commits

Reviewing files that changed from the base of the PR and between 6818169 and 67654a9.

📒 Files selected for processing (5)
  • .tekton/acs-mcp-server-pull-request.yaml
  • .tekton/acs-mcp-server-push-main.yaml
  • .tekton/acs-mcp-server-push-release.yaml
  • .tekton/basic-component-pipeline.yaml
  • konflux.Dockerfile

Comment on lines +21 to 27
event == "pull_request" &&
target_branch.matches("^main$") &&
body.action != "ready_for_review" &&
has(body.pull_request) &&
has(body.pull_request.labels) &&
body.pull_request.labels.exists(l, l.name == "konflux-build")
)

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.

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Remove PR triggers from the push PipelineRuns.

A labeled PR targeting main or release-* also matches the dedicated PR PipelineRun, so both pipelines build and push the same revision concurrently.

  • .tekton/acs-mcp-server-push-main.yaml#L21-L27: remove the pull_request branch; retain the main push trigger.
  • .tekton/acs-mcp-server-push-release.yaml#L21-L27: remove the pull_request branch; retain release and tag push triggers.
📍 Affects 2 files
  • .tekton/acs-mcp-server-push-main.yaml#L21-L27 (this comment)
  • .tekton/acs-mcp-server-push-release.yaml#L21-L27
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.tekton/acs-mcp-server-push-main.yaml around lines 21 - 27, Remove the
pull_request trigger branch from the push trigger conditions in
.tekton/acs-mcp-server-push-main.yaml lines 21-27, retaining only the main push
trigger. Apply the same change in .tekton/acs-mcp-server-push-release.yaml lines
21-27, retaining the release and tag push triggers.

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