Skip to content

Build dashboards-validation image with go-jsonnet - #83128

Open
petr-muller wants to merge 1 commit into
openshift:mainfrom
petr-muller:dashboards-validation-go-jsonnet
Open

Build dashboards-validation image with go-jsonnet#83128
petr-muller wants to merge 1 commit into
openshift:mainfrom
petr-muller:dashboards-validation-go-jsonnet

Conversation

@petr-muller

@petr-muller petr-muller commented Aug 7, 2026

Copy link
Copy Markdown
Member

The image compiles the C++ jsonnet from an unpinned clone of google/jsonnet HEAD, which is slow enough that a mixin with any non-trivial computed logic can stall both make mixins and the generated-dashboards presubmit that shares this image — as happened in #83118. go-jsonnet runs the whole tree in seconds and is pinned to a release, as are jb and gojsontoyaml now.

The builder and base move to the newest available (Go 1.26, CentOS Stream 10) in the same change because the old ones cannot build this: go-jsonnet v0.22.0 requires Go >= 1.24.5 and these images ship GOTOOLCHAIN=local, and Stream 8 is EOL with its repositories gone.

Verified by building this Dockerfile and running make -C .../mixins install all through it: all 19 dashboards plus the Prometheus and alertmanager outputs regenerate in ~5s, byte-identical to what is committed today.

Summary by CodeRabbit

  • Updates the dashboards-validation image used by make mixins and generated-dashboard presubmit jobs.
  • Uses pinned go-jsonnet v0.22.0 with Go 1.26.5 instead of compiling an unpinned C++ Jsonnet implementation.
  • Moves the runtime image from CentOS Stream 8 to Stream 10.
  • Removes the C++ build stage, dependencies, and duplicate c-builder stage name.
  • The author verified byte-identical output for all 19 dashboards, Prometheus rules, and Alertmanager outputs in 4 seconds.

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: petr-muller
Once this PR has been reviewed and has the lgtm label, please assign smg247 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@openshift-ci
openshift-ci Bot requested review from danilo-gemoli and smg247 August 7, 2026 19:25
@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The dashboard validation image uses a Go 1.26 builder for pinned Jsonnet tools and uses CentOS Stream 10 at runtime. It removes the CentOS Stream 8 source build.

Changes

Dashboard validation image

Layer / File(s) Summary
Update validation image toolchain and runtime
clusters/app.ci/supplemental-ci-images/validation-images/dashboards/dashboards-validation.yaml
The Dockerfile installs Jsonnet v0.22.0, jb, and gojsontoyaml with Go 1.26. It removes the CentOS Stream 8 C++ Jsonnet build, switches the runtime image to CentOS Stream 10, and copies Jsonnet from the Go builder.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: smg247, danilo-gemoli


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Container-Privileges ❌ Error The inline Dockerfile has no USER directive, so the final CentOS Stream 10 image defaults to root; the PR provides no runtime root justification. Add a non-root USER or an explicit non-root runtime security context. If root is required, document the requirement and its scope.
✅ Passed checks (14 passed)
Check name Status Explanation
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.
Stable And Deterministic Test Names ✅ Passed The PR changes only a BuildConfig YAML file. It adds no Ginkgo tests or test titles, and the static namespace: ci metadata is not a test name.
Test Structure And Quality ✅ Passed The pull request changes only a Dockerfile embedded in YAML; it adds or modifies no Ginkgo test code, so these test-structure requirements are not applicable.
Microshift Test Compatibility ✅ Passed The PR changes only one dashboard BuildConfig YAML file; it adds no Ginkgo e2e tests or test references to MicroShift-unavailable APIs or features.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only a dashboard validation BuildConfig YAML. It adds no Ginkgo e2e tests or other test code requiring SNO compatibility review.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only a BuildConfig Dockerfile; it adds no deployment, operator, controller, replica, affinity, topology spread, node selector, toleration, or PDB scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only one YAML BuildConfig; it adds no Go/OTE binary code, suite setup, or process-level stdout writes to assess.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The commit changes only one Dockerfile-in-YAML manifest; it adds no Ginkgo e2e tests, IPv4 assumptions, or test connectivity requirements.
No-Weak-Crypto ✅ Passed The PR only changes the dashboards image build to pinned Go tools and a Stream 10 base; the diff contains no MD5, SHA1, DES, RC4, Blowfish, ECB, or custom crypto usage.
No-Sensitive-Data-In-Logs ✅ Passed The patch adds only pinned go install, dnf install, and COPY commands; it adds no logging or commands that print passwords, tokens, API keys, PII, session IDs, or customer data.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: building the dashboards-validation image with go-jsonnet.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@petr-muller

Copy link
Copy Markdown
Member Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 7, 2026
@petr-muller
petr-muller force-pushed the dashboards-validation-go-jsonnet branch from 460e130 to 07a644e Compare August 7, 2026 19:33

@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
`@clusters/app.ci/supplemental-ci-images/validation-images/dashboards/dashboards-validation.yaml`:
- Around line 22-24: Update the final runtime image stage beginning with FROM
quay.io/centos/centos:stream9 to create and select an explicit non-root user,
ensuring that jb cache locations and the CI workspace are writable by that user.
Also update the associated Kubernetes/OpenShift configuration to set
securityContext.runAsNonRoot and securityContext.allowPrivilegeEscalation to
false.
- Around line 19-20: Update the tool installation commands for jb and
gojsontoyaml to replace `@latest` with reviewed, exact version tags, matching the
repository’s pinned-version convention such as jsonnet v0.21.0. Leave the
existing package paths and GOFLAGS settings unchanged.
🪄 Autofix

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)

Review profile: CHILL

Plan: Enterprise

Run ID: 824c6489-8988-42bc-aa2f-4c3da284ee65

📥 Commits

Reviewing files that changed from the base of the PR and between f031e0a and 460e130.

📒 Files selected for processing (1)
  • clusters/app.ci/supplemental-ci-images/validation-images/dashboards/dashboards-validation.yaml

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@petr-muller
petr-muller force-pushed the dashboards-validation-go-jsonnet branch from 07a644e to 206cbf8 Compare August 7, 2026 19:46
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

The image compiles the C++ jsonnet from an unpinned clone of google/jsonnet
HEAD, which is slow enough that a dashboard mixin with any non-trivial
computed logic can stall both `make mixins` and the generated-dashboards
presubmit that shares this image. go-jsonnet runs the whole tree in seconds
and is pinned to a release, as are jb and gojsontoyaml now.

The builder and base move to the newest available (Go 1.26, CentOS Stream
10) in the same change: go-jsonnet v0.22.0 requires Go >= 1.24.5, and
Stream 8 is EOL with its repositories gone, so the old bases could not
build this at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@petr-muller
petr-muller force-pushed the dashboards-validation-go-jsonnet branch from 206cbf8 to e324552 Compare August 7, 2026 19:52
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@petr-muller: no rehearsable tests are affected by this change

Note: If this PR includes changes to step registry files (ci-operator/step-registry/) and you expected jobs to be found, try rebasing your PR onto the base branch. This helps pj-rehearse accurately detect changes when the base branch has moved forward.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@petr-muller

Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 7, 2026
@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@petr-muller: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@hector-vido

Copy link
Copy Markdown
Contributor

/gtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants