vcf migration unit tests#78875
Conversation
WalkthroughSwitches CI from an image-stream Golang tag to a repository-sourced binary build (adds ChangesBuild and Test Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcpowermac 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 |
0eda6fa to
314278f
Compare
|
@jcpowermac, Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
314278f to
3233b05
Compare
3233b05 to
ed594e5
Compare
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/vcf-migration-operator/openshift-vcf-migration-operator-main.yaml`:
- Around line 1-3: The change sets build_root.from_repository: true which
requires a .ci-operator.yaml in the openshift/vcf-migration-operator repo
defining build_root_image; to fix, either add a .ci-operator.yaml to that
repository with a build_root_image entry before this PR lands, or revert the
pipeline config to use build_root: { image_stream_tag: <appropriate tag> }
instead of from_repository: true so the job doesn't depend on a repo file;
update the binary_build_commands only if the chosen build_root (repository image
vs image_stream_tag) requires different build steps.
🪄 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: 6753fc32-bfa6-4922-8cd2-6ca4aebf8e5a
⛔ Files ignored due to path filters (3)
ci-operator/jobs/openshift/vcf-migration-operator/OWNERSis excluded by!ci-operator/jobs/**ci-operator/jobs/openshift/vcf-migration-operator/openshift-vcf-migration-operator-main-postsubmits.yamlis excluded by!ci-operator/jobs/**ci-operator/jobs/openshift/vcf-migration-operator/openshift-vcf-migration-operator-main-presubmits.yamlis excluded by!ci-operator/jobs/**
📒 Files selected for processing (1)
ci-operator/config/openshift/vcf-migration-operator/openshift-vcf-migration-operator-main.yaml
| binary_build_commands: make build | ||
| build_root: | ||
| image_stream_tag: | ||
| name: release | ||
| namespace: openshift | ||
| tag: golang-1.25 | ||
| from_repository: true |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "1) Check whether source repo has required .ci-operator.yaml"
curl -sSI https://raw.githubusercontent.com/openshift/vcf-migration-operator/main/.ci-operator.yaml | head -n 1
echo
echo "2) If present, verify it defines build_root_image"
curl -fsSL https://raw.githubusercontent.com/openshift/vcf-migration-operator/main/.ci-operator.yaml \
| grep -nE 'build_root_image|namespace|name|tag' || true
echo
echo "3) Reference docs for from_repository semantics"
echo "https://docs.ci.openshift.org/architecture/ci-operator/#build-root-image"Repository: openshift/release
Length of output: 374
🏁 Script executed:
# Search the release repo for similar build_root.from_repository patterns
rg "from_repository:\s*true" ci-operator/config --type yaml | head -20Repository: openshift/release
Length of output: 2455
🏁 Script executed:
# Look for any .ci-operator.yaml files in the release repo to understand the pattern
fd ".ci-operator.yaml" ci-operator/config | head -10Repository: openshift/release
Length of output: 43
🏁 Script executed:
# Check if this specific operator config file references any dependencies or parallel work
rg "vcf-migration-operator" . --type yaml | grep -v "^Binary" | head -20Repository: openshift/release
Length of output: 2765
🌐 Web query:
ci-operator build_root from_repository true requirements documentation
💡 Result:
In OpenShift CI Operator configuration, the build_root field defines the ImageStreamTag providing clone-time and build-time dependencies (e.g., for compiling executables or running unit tests), but not for published images. It must include git in $PATH and write permissions in /go [1][2][3]. Setting build_root: from_repository: true configures the build_root from the repository under test instead of the ci-operator config. This allows atomic changes to both code and build_root image. Requirements: - Add build_root: from_repository: true to the ci-operator config (e.g., in-repo-config.yaml). - Create a .ci-operator.yaml file in the repository root containing the ImageStreamTag definition for the build_root, e.g.: build_root_image: image_stream_tag: name: release namespace: openshift tag: golang-1.13 [1][3]. This approach is useful for repositories needing custom or version-specific build environments tied to the code [1][4].
Citations:
- 1: https://docs.ci.openshift.org/architecture/ci-operator
- 2: https://github.com/openshift/ci-operator/blob/master/CONFIGURATION.md
- 3: https://docs.ci.openshift.org/docs/architecture/ci-operator/
- 4: Bug 1953563: Add .ci-operator.yaml with build_root_image cluster-openshift-apiserver-operator#452
build_root.from_repository: true requires .ci-operator.yaml in the source repository.
Switching build_root to from_repository: true mandates that openshift/vcf-migration-operator provide a .ci-operator.yaml file in its root directory defining build_root_image. The file is currently missing (404 on raw URL), which will cause build-root resolution to fail at job execution. This config change requires either the .ci-operator.yaml to land in the source repository first, or this setting to revert to image_stream_tag.
🤖 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/vcf-migration-operator/openshift-vcf-migration-operator-main.yaml`
around lines 1 - 3, The change sets build_root.from_repository: true which
requires a .ci-operator.yaml in the openshift/vcf-migration-operator repo
defining build_root_image; to fix, either add a .ci-operator.yaml to that
repository with a build_root_image entry before this PR lands, or revert the
pipeline config to use build_root: { image_stream_tag: <appropriate tag> }
instead of from_repository: true so the job doesn't depend on a repo file;
update the binary_build_commands only if the chosen build_root (repository image
vs image_stream_tag) requires different build steps.
|
@jcpowermac: 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. |
Summary by CodeRabbit