[WINC-1971] [ote] Fix OCP-68320 test missing SpecContext parameter - #4566
Conversation
Test OCP-68320 uses g.SpecTimeout() decorator but function signature was missing the required context parameter, causing Ginkgo to fail during test discovery with: Invalid NodeTimeout SpecTimeout, or GracePeriod [It] was passed NodeTimeout, SpecTimeout, or GracePeriod but does not have a callback that accepts a SpecContext or context.Context This prevented both aws-e2e-ote and vsphere-proxy-e2e-ote jobs from discovering any proxy tests, failing with 'no tests to run'.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Windows custom CA certificate import test now declares its closure with a Merge Risk: ⚪ Minimal · up to The Windows custom CA import test can now be discovered and run with its configured timeout. No remaining merge-readiness risk is identified. 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. Full details: Go Best Practices & Build TagsExplanation PASS. The pull request changes only the OTE Ginkgo callback signature from Full details: Security: Secrets, Ssh & CsrExplanation PASS: The pull request changes only the OCP-68320 Ginkgo callback signature from Full details: Kubernetes Controller PatternsExplanation PASS: The pull request changes only the Ginkgo callback signature in Full details: Windows Service ManagementExplanation PASS: The pull request changes only the callback signature in Full details: Platform-Specific RequirementsExplanation The pull request changes only the Ginkgo callback signature in Full details: Stable And Deterministic Test NamesExplanation PASS — The pull request changes only the callback signature in Full details: Test Structure And QualityExplanation The signature change makes the Resolution Add meaningful messages to both file-read assertions. For example: Full details: Microshift Test CompatibilityExplanation PASS: The pull request changes only the existing callback signature from Full details: Single Node Openshift (Sno) Test CompatibilityExplanation PASS: The pull request does not add a Ginkgo test or change test behavior. The exact diff changes only the existing OCP-68320 callback from Full details: Topology-Aware Scheduling CompatibilityExplanation PASS: The pull request changes only the Ginkgo callback signature in
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jrvaldes, rrasouli 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 |
|
@coderabbitai how did you miss this critical bug in PR #4459 ? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="openshift/windows-machine-config-operator"
echo "== PR metadata =="
gh pr view 4459 --repo "$repo" --json number,title,state,mergedAt,baseRefName,headRefName,author,body,files,comments,reviews \
--jq '{number,title,state,mergedAt,baseRefName,headRefName,author:.author.login,body,files:[.files[]|{path,additions,deletions}],comments:[.comments[]|{author:.author.login,body,createdAt,url}],reviews:[.reviews[]|{author:.author.login,state,body,submittedAt}]}'
echo
echo "== PR diff: proxy test context/timeout declarations =="
gh pr diff 4459 --repo "$repo" -- ote/test/e2e/proxy.go || true
echo
echo "== Current corrected hunk =="
ast-grep outline ote/test/e2e/proxy.go --items all --type function
rg -n -C 8 'SpecTimeout|Import custom CA certificates|func\(ctx g\.SpecContext\)' ote/test/e2e/proxy.goLength of output: 80043 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="openshift/windows-machine-config-operator"
gh api "repos/${repo}/pulls/4459/files?per_page=100" \
--jq '.[] | select(.filename == "ote/test/e2e/proxy.go") | .patch' \
> /tmp/pr-4459-proxy.patch
echo "== OCP-68320 hunk from PR `#4459` =="
rg -n -C 10 '68320|SpecTimeout|SpecContext|func\(\)' /tmp/pr-4459-proxy.patch
echo
echo "== CodeRabbit review findings that mention Ginkgo timeout/context/signature =="
gh pr view 4459 --repo "$repo" --json reviews --jq '
.reviews[]
| select(.author.login == "coderabbitai")
| .body
' \
| rg -in -C 2 'SpecTimeout|SpecContext|callback|Ginkgo.*signature|signature.*Ginkgo' || trueLength of output: 10117
In g.SpecTimeout(45*time.Minute),
func() {
func(ctx g.SpecContext) {The
You are interacting with an AI system. |
4880749
into
openshift:master
Problem
Test OCP-68320 uses
g.SpecTimeout(45*time.Minute)decorator but the function signature was missing the required context parameter.This causes Ginkgo to fail during test discovery with:
This prevents both
aws-e2e-oteandvsphere-proxy-e2e-otejobs from discovering any proxy tests, causing them to fail with "no tests to run".Solution
Changed function signature from:
func() {to:
Testing
CI will verify that
openshift-tests run windows-machine-config-operator/proxysuccessfully discovers and runs proxy tests.Related
Summary by CodeRabbit