-
Notifications
You must be signed in to change notification settings - Fork 113
RHAIENG-394: Add notebooks release version on the Dockefile Label section #2329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,9 @@ spec: | |
value: base-images/rocm/6.2/c9s-python-3.12/Dockerfile.rocm | ||
- name: path-context | ||
value: . | ||
- name: image-labels | ||
value: | ||
- release=2025b | ||
Comment on lines
+43
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainConfirm pipeline param exists and is wired to labeling step; update the generator instead of hand-editing autogen files. This file is autogenerated; edit scripts/generate_pull_request_pipelineruns.py (and any related generators) so the change persists. Also verify that multiarch-pull-request-pipeline declares a param named image-labels (type: array) and passes it to the image build/task that applies labels; otherwise this addition will be ignored at runtime. Run: 🏁 Script executed: #!/bin/bash
# 1) Confirm the pipeline defines the param
rg -nC3 -g '!**/vendor/**' -P '(?s)\bkind:\s*Pipeline\b.*?\bmetadata:\s*\n.*?\bname:\s*multiarch-pull-request-pipeline\b.*?\bspec:\s*\n.*?\bparams:\s*\n.*?(?:-.*\n)*?\bname:\s*image-labels\b' .tekton
# 2) Check any task/step uses it (e.g., $(params.image-labels))
rg -n --pcre2 '\$\(\s*params\.image-labels\s*\)' .tekton
# 3) Ensure all autogenerated PR PipelineRuns gained the param
rg -n 'on-pull-request' .tekton | wc -l
rg -n 'name:\s*image-labels' .tekton | wc -l Length of output: 353 Add 🤖 Prompt for AI Agents
|
||
pipelineRef: | ||
name: multiarch-pull-request-pipeline | ||
taskRunTemplate: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,9 @@ spec: | |
value: | ||
- '{{target_branch}}-{{revision}}' | ||
- v6.2 | ||
- name: image-labels | ||
value: | ||
- release=2025b | ||
Comment on lines
+34
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEnsure Push runs will fail early if the Pipeline lacks the param, even if other params are valid. Re-run the repo-wide script from the first file to confirm param declaration and usage. 🏁 Script executed: #!/bin/bash
set -e
# Locate the singlearch-push-pipeline definition file
PIPELINE_FILE=$(rg -lP --max-count=1 'name:\s*singlearch-push-pipeline\b' -g '*.yaml' .tekton)
echo "Pipeline file: $PIPELINE_FILE"
# Print its params block
echo -e "\n=== params in $PIPELINE_FILE ==="
sed -n '/params:/,/^[[:space:]]*[^- ]/p' "$PIPELINE_FILE"
# Look for any references to image-labels in the pipeline
echo -e "\n=== Occurrences of image-labels in $PIPELINE_FILE ==="
grep -R -n 'image-labels' "$PIPELINE_FILE" Length of output: 10470 🏁 Script executed: #!/bin/bash
set -e
FILE=".tekton/singlearch-push-pipeline.yaml"
echo "=== Showing first 200 lines of $FILE ==="
head -n 200 "$FILE"
echo
echo "=== Listing all params declared in $FILE ==="
grep -n '^\s*-\s*name:' "$FILE"
echo
echo "=== Searching for 'image-labels' in $FILE ==="
grep -n 'image-labels' "$FILE" || echo "No occurrences of 'image-labels' found." Length of output: 12361 Add and wire - name: image-labels
type: array
description: Array of image labels to apply to the built image
default: [] Then, in the - name: IMAGE_LABELS
value: $(params.image-labels) This ensures PipelineRuns supplying 🤖 Prompt for AI Agents
|
||
pipelineRef: | ||
name: singlearch-push-pipeline | ||
taskRunTemplate: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,9 @@ spec: | |
value: | ||
- '{{target_branch}}-{{revision}}' | ||
- v6.2 | ||
- name: image-labels | ||
value: | ||
- release=2025b | ||
Comment on lines
+35
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainValidate singlearch-push-pipeline supports image-labels and that the label lands in the built image. Ensure the pipeline defines image-labels (array) and forwards it to the build step. Consider a post-build verify step (crane or skopeo) to assert the image contains label release=2025b to prevent silent drift. Run: 🏁 Script executed: #!/bin/bash
# Pipeline param presence
rg -nC3 -P '(?s)\bkind:\s*Pipeline\b.*?\bmetadata:\s*\n.*?\bname:\s*singlearch-push-pipeline\b.*?\bparams:\s*\n.*?(?:-.*\n)*?\bname:\s*image-labels\b' .tekton
# Wiring to tasks
rg -n --pcre2 '\$\(\s*params\.image-labels\s*\)' .tekton Length of output: 219 🏁 Script executed: #!/bin/bash
# Locate pipeline definition files referencing 'singlearch-push-pipeline'
echo "Searching for pipeline files containing 'singlearch-push-pipeline' or 'single-arch-push-pipeline':"
grep -R -n --include='*.yaml' -E 'singlearch-push-pipeline|single-arch-push-pipeline' .tekton || true
# Inspect found file(s) for params and wiring
for file in $(grep -R -l --include='*.yaml' -E 'singlearch-push-pipeline|single-arch-push-pipeline' .tekton); do
echo -e "\n--- Inspecting $file ---"
# Show params section
rg -nC2 --pcre2 '\bparams:\b' "$file" || echo "No 'params:' section found"
# Search for image-labels in param definitions
rg -n --pcre2 '\bname:\s*image-labels\b' "$file" || echo "No 'image-labels' param declared"
# Search for any occurrence of image-labels usage
rg -n --pcre2 '\$\(\s*params\.(image-labels|imageLabels)\s*\)' "$file" || echo "No wiring of image-labels in tasks"
done Length of output: 22161 Add and wire
|
||
pipelineRef: | ||
name: singlearch-push-pipeline | ||
taskRunTemplate: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,9 @@ spec: | |
value: . | ||
- name: build-args-file | ||
value: jupyter/minimal/ubi9-python-3.12/build-args/rocm.conf | ||
- name: image-labels | ||
value: | ||
- release=2025b | ||
Comment on lines
+45
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEnsure the target Pipeline declares and uses param image-labels (array). This PipelineRun passes an array param. Verify that the referenced Pipeline (multiarch-pull-request-pipeline) defines ParamSpec image-labels with type array and that the build task actually applies these labels (e.g., buildah --label). Otherwise, the run will fail with “param not declared” or silently ignore labels. Run this repo-scoped check: 🏁 Script executed: #!/bin/bash
set -euo pipefail
# 1) Confirm the pipeline exists and declares the param
rg -nC3 -g ".tekton/**" -e $'^kind:\\s*Pipeline$' -e $'^metadata:\\n\\s*name:\\s*multiarch-pull-request-pipeline$' || true
rg -nC2 -g ".tekton/**" --pretty $'- name:\\s*image-labels\\b' || true
rg -nC2 -g ".tekton/**" --pretty $'type:\\s*array' || true
# 2) Confirm it’s consumed by tasks
rg -nC2 -g ".tekton/**" --pretty '\$\(\s*params\.image-labels' || true
# 3) Ensure all PR/push PipelineRuns have image-labels
echo "Missing image-labels in Tekton PipelineRuns:"
fd -a -e yaml .tekton | xargs -I{} bash -c 'grep -q "kind: PipelineRun" "{}" && (grep -q "name: image-labels" "{}" || echo "{}")' Length of output: 1464 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
# 1) List all Tekton YAML files to locate pipeline definitions
echo "All Tekton YAML files:"
find .tekton -type f -name '*.yaml'
# 2) Find the multiarch-pull-request-pipeline file(s)
echo
echo "Files containing 'multiarch-pull-request-pipeline':"
grep -R -n "multiarch-pull-request-pipeline" .tekton
# 3) Confirm the pipeline declares the image-labels param with type array
PIPELINE_FILES=$(grep -R -l "multiarch-pull-request-pipeline" .tekton)
for file in $PIPELINE_FILES; do
echo
echo "Inspecting $file for params.image-labels:"
grep -R -n -C2 "params:" "$file"
grep -R -n "name:\s*image-labels" "$file" || echo " ⚠️ name: image-labels not found"
grep -R -n "type:\s*array" "$file" || echo " ⚠️ type: array not found for image-labels"
done
# 4) Check that tasks within the pipeline reference params.image-labels
for file in $PIPELINE_FILES; do
echo
echo "Checking consumption of params.image-labels in $file:"
grep -R -n "\$\{\s*params.image-labels" "$file" || echo " ⚠️ params.image-labels not referenced"
done
# 5) Ensure every PipelineRun under .tekton includes the image-labels param
echo
echo "PipelineRun YAMLs missing the image-labels param:"
for pr in $(grep -R -l "kind:\s*PipelineRun" -n .tekton); do
if ! grep -q -E "name:\s*image-labels" "$pr"; then
echo " - $pr"
fi
done Length of output: 58837 Add - name: image-labels
type: array Then inject 🤖 Prompt for AI Agents
|
||
pipelineRef: | ||
name: multiarch-pull-request-pipeline | ||
taskRunTemplate: | ||
|
Uh oh!
There was an error while loading. Please reload this page.