Skip to content

OLS-2941: add api-lint presubmit for lightspeed-agentic-operator#79869

Open
onmete wants to merge 1 commit into
openshift:mainfrom
onmete:ols-2941-agentic-operator-api-lint
Open

OLS-2941: add api-lint presubmit for lightspeed-agentic-operator#79869
onmete wants to merge 1 commit into
openshift:mainfrom
onmete:ols-2941-agentic-operator-api-lint

Conversation

@onmete
Copy link
Copy Markdown
Contributor

@onmete onmete commented May 29, 2026

Summary

  • Add api-lint presubmit for openshift/lightspeed-agentic-operator running make api-lint (kube-api-linter on CRD types)
  • Completes prow CI coverage for OLS-2941 alongside existing generate and unit jobs

Test plan

  • make update ran cleanly and regenerated presubmits
  • /test api-lint passes on a lightspeed-agentic-operator PR after this merges

Made with Cursor

Summary by CodeRabbit

This PR updates OpenShift CI configuration for the openshift/lightspeed-agentic-operator repository to add an API lint presubmit and standardize GOFLAGS for existing tests.

Practical details:

  • A new presubmit test "api-lint" was added in ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml. It runs GOFLAGS="-mod=mod" GOLANGCI_LINT_CACHE=/tmp/.cache make api-lint in the src container (invokes kube-api-linter against the repo's CRD types).
  • The existing "generate" and "unit" tests were adjusted to run with GOFLAGS="-mod=mod".
  • The new api-lint job is placed between "generate" and "unit" and uses the same skip_if_only_changed pattern as those jobs.
  • Test plan: author ran make update to regenerate presubmits; expects /test api-lint to succeed on lightspeed-agentic-operator PRs after this change is merged.
  • Metadata: references Jira OLS-2941; openshift-ci-robot confirmed the Jira reference but warned the Jira issue has no target version set for the target branch.

The change is a small CI configuration update that completes presubmit coverage for API linting alongside existing generate and unit jobs.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented May 29, 2026

@onmete: This pull request references OLS-2941 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add api-lint presubmit for openshift/lightspeed-agentic-operator running make api-lint (kube-api-linter on CRD types)
  • Completes prow CI coverage for OLS-2941 alongside existing generate and unit jobs

Test plan

  • make update ran cleanly and regenerated presubmits
  • /test api-lint passes on a lightspeed-agentic-operator PR after this merges

Made with Cursor

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.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 29, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Updates the OpenShift CI tests matrix: set GOFLAGS="-mod=mod" for existing generate and unit jobs and add a new api-lint job that runs with GOFLAGS and a golangci-lint cache in the src container using the existing skip-if-only-changed pattern.

Changes

CI Test Jobs Update

Layer / File(s) Summary
Update generate job
ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml
generate job command changed to run make manifests with GOFLAGS="-mod=mod"; container and skip-if-only-changed unchanged.
Add api-lint job
ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml
New api-lint job runs GOFLAGS="-mod=mod" GOLANGCI_LINT_CACHE=/tmp/.cache make api-lint in the src container with the same skip-if-only-changed rule.
Update unit job
ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml
unit job command updated to include GOFLAGS="-mod=mod" for make test; wiring unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels: rehearsals-ack

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding an api-lint presubmit job for lightspeed-agentic-operator, which matches the core purpose of the pull request.
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 modifies CI configuration files only, not Ginkgo test code. The custom check targets Ginkgo test names which are not present in this PR, making it inapplicable.
Test Structure And Quality ✅ Passed PR modifies OpenShift CI configuration only (YAML files defining test jobs), not Ginkgo test code. The check is inapplicable to CI config changes.
Microshift Test Compatibility ✅ Passed This PR only modifies CI configuration to add an api-lint job; it does not add any Ginkgo e2e tests, so MicroShift test compatibility check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR does not add any Ginkgo e2e tests; it only modifies CI configuration for linting and build jobs. SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CI operator configuration defining test jobs. Does not add/modify deployment manifests, operator code, or controllers. No scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed PR modifies only CI configuration (YAML), not Go source code. OTE Binary Stdout Contract check applies to Go code with process-level stdout writes; not applicable to CI config changes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR modifies only a CI configuration file (openshift-lightspeed-agentic-operator-main.yaml) to add an api-lint presubmit job. No new Ginkgo e2e tests are being added. The check is not applicable.
No-Weak-Crypto ✅ Passed PR modifies only a CI/CD configuration YAML file with no cryptographic implementations or weak crypto algorithms present.
Container-Privileges ✅ Passed The PR adds CI test configuration with no privileged containers, hostPID/hostNetwork/hostIPC, SYS_ADMIN capabilities, allowPrivilegeEscalation flags, or root privileges defined.
No-Sensitive-Data-In-Logs ✅ Passed The PR modifies only CI configuration, adding environment variables and test jobs with standard Go build flags and temporary cache paths; no logging statements or sensitive data exposure detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci Bot requested review from harche and joshuawilson May 29, 2026 11:31
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@onmete, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

couldn't prepare candidate: couldn't rebase candidate onto 604343800fb88e023877d0fcf451710018449db5 due to conflicts
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.

@onmete onmete force-pushed the ols-2941-agentic-operator-api-lint branch from f44ef55 to 306a98b Compare May 29, 2026 11:40
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 29, 2026
@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented May 29, 2026

/pj-rehearse

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@onmete: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented May 29, 2026

/pj-rehearse

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@onmete: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented May 29, 2026

/retest

@onmete onmete force-pushed the ols-2941-agentic-operator-api-lint branch 2 times, most recently from 1b7b1e2 to 1b622f3 Compare May 29, 2026 13:19
@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented May 29, 2026

/pj-rehearse auto-ack

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@onmete: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@onmete onmete force-pushed the ols-2941-agentic-operator-api-lint branch 2 times, most recently from 7d4f5b0 to a77cec7 Compare May 29, 2026 13:48
@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented May 29, 2026

/pj-rehearse auto-ack

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@onmete: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@onmete onmete force-pushed the ols-2941-agentic-operator-api-lint branch from a77cec7 to ae281e2 Compare May 29, 2026 17:37
Add kube-api-linter CI coverage via make api-lint to complete prow
presubmit setup for the agentic operator.

Co-authored-by: Cursor <cursoragent@cursor.com>
@onmete onmete force-pushed the ols-2941-agentic-operator-api-lint branch from ae281e2 to 5be1706 Compare May 29, 2026 17:59
@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented May 29, 2026

/pj-rehearse auto-ack

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@onmete: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@onmete: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-lightspeed-agentic-operator-main-api-lint openshift/lightspeed-agentic-operator presubmit Presubmit changed
pull-ci-openshift-lightspeed-agentic-operator-main-generate openshift/lightspeed-agentic-operator presubmit Ci-operator config changed
pull-ci-openshift-lightspeed-agentic-operator-main-unit openshift/lightspeed-agentic-operator presubmit Ci-operator config changed
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.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

@onmete: 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.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label May 29, 2026
@onmete
Copy link
Copy Markdown
Contributor Author

onmete commented May 29, 2026

/lgtm
/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

@onmete: you cannot LGTM your own PR.

Details

In response to this:

/lgtm
/approve

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.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: onmete
Once this PR has been reviewed and has the lgtm label, please assign joshuawilson 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

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants