ROX-34386: Add image labels#162
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughTekton now derives a git-based version and passes it to build and SAST tasks. The runtime image uses that version in OCI labels, while pull-request and push PipelineRuns add a CPE ChangesRelease metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant clone-repository
participant determine-version
participant build-container
participant sast-coverity-check
clone-repository->>determine-version: provide SOURCE_ARTIFACT
determine-version->>determine-version: derive git version
determine-version->>build-container: pass VERSION and labels
determine-version->>sast-coverity-check: pass VERSION
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 `@konflux.Dockerfile`:
- Line 73: Redeclare the VERSION build argument in the final Dockerfile stage
immediately before the label that uses it. Ensure the existing version label
receives the supplied VERSION value instead of relying on the out-of-scope ARG
declared before the first FROM.
🪄 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: dc783983-b071-4a82-977b-45506eb5c8fa
📒 Files selected for processing (1)
konflux.Dockerfile
❌ 2 Tests Failed:
View the full list of 2 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
E2E Test ResultsCommit: d078e6d |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/basic-component-pipeline.yaml:
- Around line 178-190: Define explicit CPU and memory requests and limits for
the new use-trusted-artifact and determine-version steps by adding
computeResources to their stepTemplate or individual step definitions. Keep the
resource values consistent with the pipeline’s existing resource conventions.
- Line 195: Update the VERSION assignment in the pipeline to use only git
describe --tags --always, removing the || echo "dev" fallback so repository or
setup failures are not masked and bogus build versions are not propagated.
- Around line 183-189: Parameterize the images used by the inline taskSpec steps
use-trusted-artifact and determine-version instead of embedding them directly.
Add task parameters for these image references and update each step’s image
field to consume the corresponding parameter, preserving the existing pinned
image values as defaults and complying with the .tekton image policy.
- Around line 249-252: Update the BUILD_ARGS list in the pipeline so
$(params.build-args[*]) appears before
VERSION=$(tasks.determine-version.results.VERSION). Ensure the generated VERSION
remains the final argument, preserving its precedence over any caller-supplied
VERSION value in both BUILD_ARGS lists.
🪄 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: 95e6005e-ba96-421b-841c-e6f8599b583b
📒 Files selected for processing (2)
.tekton/basic-component-pipeline.yamlkonflux.Dockerfile
There was a problem hiding this comment.
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/basic-component-pipeline.yaml:
- Around line 188-193: Add a limits.cpu value alongside the existing memory
limit in the computeResources configuration for the inline task steps, using the
pipeline’s established standard CPU-limit value. Preserve the current CPU
request and memory settings.
🪄 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: d87056a7-e4c8-4661-86c7-b7c6329195ce
📒 Files selected for processing (2)
.tekton/basic-component-pipeline.yamlkonflux.Dockerfile
| computeResources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 256Mi | ||
| limits: | ||
| memory: 512Mi |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win
Set a CPU limit for the inline task steps.
Line 188-193 defines a CPU request and memory limit, but no limits.cpu; both steps can still consume unbounded CPU on shared CI workers. Add a CPU limit using the pipeline’s standard value.
🤖 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 188 - 193, Add a
limits.cpu value alongside the existing memory limit in the computeResources
configuration for the inline task steps, using the pipeline’s established
standard CPU-limit value. Preserve the current CPU request and memory settings.
Source: Path instructions
|
Check labels and they look good. Version is: |
Description
Since we didn't define labels in Dockerfile build - we get default labels from UBI Micro
Validation