WINC-1456: adds windows-exporter jobs for 4.22#79273
Conversation
|
@wgahnagl: This pull request references WINC-1456 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 task to target either version "5.0." or "openshift-5.0.", but it targets "WMCO 10.19.0" instead. DetailsIn response to this:
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. |
WalkthroughA CI configuration file is added for the Windows exporter on the release-4.22 branch, specifying the base image, resource constraints, and a build job that compiles the exporter for Windows using ChangesWindows Exporter Release-4.22 CI Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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
`@ci-operator/config/openshift/prometheus-community-windows_exporter/openshift-prometheus-community-windows_exporter-release-4.22.yaml`:
- Around line 28-32: The job currently clones openshift/promu using "git clone
--branch master" which is non-reproducible; change the git clone command to pin
a specific immutable revision (a tag or commit SHA) instead of master (replace
the "git clone --branch master https://github.com/openshift/promu.git
openshift-promu" line), then continue to install and run promu as before (the
subsequent commands
GOBIN=/go/src/github.com/openshift/prometheus-community-windows_exporter go
install . and GOOS=windows ./promu build -v remain unchanged) so the build uses
a known stable promu version.
🪄 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)
Review profile: CHILL
Plan: Enterprise
Run ID: cd3c9a38-7563-4f44-89d6-5bd9b886d001
📒 Files selected for processing (1)
ci-operator/config/openshift/prometheus-community-windows_exporter/openshift-prometheus-community-windows_exporter-release-4.22.yaml
| git clone --branch master --single-branch https://github.com/openshift/promu.git openshift-promu | ||
| cd openshift-promu/ | ||
| GOBIN=/go/src/github.com/openshift/prometheus-community-windows_exporter go install . | ||
| cd /go/src/github.com/openshift/prometheus-community-windows_exporter | ||
| GOOS=windows ./promu build -v |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Default branch ref:"
git ls-remote --symref https://github.com/openshift/promu.git HEAD
echo
echo "Existing branch refs (master/main):"
git ls-remote --heads https://github.com/openshift/promu.git master main || true
echo
echo "Recent tags to choose a pinned version from:"
git ls-remote --tags https://github.com/openshift/promu.git | tail -n 20Repository: openshift/release
Length of output: 1069
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Check if the file exists
FILE="ci-operator/config/openshift/prometheus-community-windows_exporter/openshift-prometheus-community-windows_exporter-release-4.22.yaml"
if [ -f "$FILE" ]; then
echo "File exists. Extracting lines 25-35 for context:"
sed -n '25,35p' "$FILE" | cat -n
echo
echo "Full file for complete context:"
cat -n "$FILE"
else
echo "File does not exist at: $FILE"
echo "Listing available CI configs in the directory:"
find ci-operator/config/openshift -name "*prometheus*windows*" -o -name "*windows_exporter*" 2>/dev/null | head -20
fiRepository: openshift/release
Length of output: 1941
Pin openshift/promu to an immutable revision.
Line 28 clones master, which makes this job non-reproducible and can break when upstream changes. Pin to a tag or commit SHA (stable versions v0.1.0 through v0.6.1 are available).
Suggested change
- git clone --branch master --single-branch https://github.com/openshift/promu.git openshift-promu
- cd openshift-promu/
- GOBIN=/go/src/github.com/openshift/prometheus-community-windows_exporter go install .
- cd /go/src/github.com/openshift/prometheus-community-windows_exporter
+ GOBIN=/go/src/github.com/openshift/prometheus-community-windows_exporter \
+ go install github.com/openshift/promu@<tag-or-commit-sha>
+ cd /go/src/github.com/openshift/prometheus-community-windows_exporter
GOOS=windows ./promu build -v🤖 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
`@ci-operator/config/openshift/prometheus-community-windows_exporter/openshift-prometheus-community-windows_exporter-release-4.22.yaml`
around lines 28 - 32, The job currently clones openshift/promu using "git clone
--branch master" which is non-reproducible; change the git clone command to pin
a specific immutable revision (a tag or commit SHA) instead of master (replace
the "git clone --branch master https://github.com/openshift/promu.git
openshift-promu" line), then continue to install and run promu as before (the
subsequent commands
GOBIN=/go/src/github.com/openshift/prometheus-community-windows_exporter go
install . and GOOS=windows ./promu build -v remain unchanged) so the build uses
a known stable promu version.
|
[REHEARSALNOTIFIER] Note: If this PR includes changes to step registry files ( Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@wgahnagl: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jrvaldes, wgahnagl The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This is needed so this
openshift/prometheus-community-windows_exporter#131
PR can merge
Summary
Adds OpenShift CI configuration for building the prometheus-community-windows_exporter for the release-4.22 branch. The configuration defines build parameters and a test job that:
rhel-9-golang-1.25-openshift-4.22builder image (updated from golang 1.24 to 1.25)GOOS=windows ./promu build -v)This CI configuration is required to enable the related prometheus-community-windows_exporter repository PR to merge.