Add: AGENTS.md/README.md, Migrate more OTE tests#1516
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jmencak 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 |
|
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-disruptive-longrunning |
WalkthroughThis PR restructures the Cluster Node Tuning Operator test extension by removing ChangesNTO Test Suite Restructuring and Documentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 9 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in :\n\tgithub.com/RHsyseng/operator-utils@v1.4.13: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/go-systemd@v0.0.0-20191104093116-d3cd4ed1dbcf: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/ignition@v0.35.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/ignition/v2@v2.26.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/docker/go-units@v0.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/go-logr/stdr@v1.2.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/google/go-cmp@v0.7.0 ... [truncated 19340 characters] ... is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/legacy-cloud-providers: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/metrics: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/mount-utils: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/pod-security-admission: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/sample-apiserver: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tgithub.com/onsi/ginkgo/v2: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n" Comment |
|
@jmencak: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/0e5325b0-4fae-11f1-8b60-ba5c504ebdf0-0 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/extended/utils/nto_util.go (1)
505-514: 💤 Low valueConsider more idiomatic string comparison.
The function uses
strings.Compare(product, "ROSA") == 0, which is correct but verbose. Direct string comparisonproduct == "ROSA"is more idiomatic and clearer in Go.♻️ Suggested simplification
func IsRosaCluster(oc *CLI) bool { product, _ := oc.WithoutNamespace().AsAdmin().Run("get").Args("clusterclaims/product.open-cluster-management.io", "-o=jsonpath={.spec.value}").Output() - return strings.Compare(product, "ROSA") == 0 + return product == "ROSA" }🤖 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 `@test/extended/utils/nto_util.go` around lines 505 - 514, The IsRosaCluster function uses strings.Compare(product, "ROSA") == 0 which is verbose; replace that expression with the idiomatic direct string equality check product == "ROSA" in the IsRosaCluster function to simplify the code and improve readability (keep the call that obtains product from oc unchanged).
🤖 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.
Nitpick comments:
In `@test/extended/utils/nto_util.go`:
- Around line 505-514: The IsRosaCluster function uses strings.Compare(product,
"ROSA") == 0 which is verbose; replace that expression with the idiomatic direct
string equality check product == "ROSA" in the IsRosaCluster function to
simplify the code and improve readability (keep the call that obtains product
from oc unchanged).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: cecf6633-5a5e-4a8a-a1d3-5b8d68fdad23
📒 Files selected for processing (6)
cmd/cluster-node-tuning-operator-test-ext/main.gotest/extended/AGENTS.mdtest/extended/CLAUDE.mdtest/extended/README.mdtest/extended/specs/nto.gotest/extended/utils/nto_util.go
Summary by CodeRabbit
Release Notes
Chores
Documentation