Skip to content

OTA-2024: Add unit test CI job for openshift/agentic-skills#81732

Open
jhadvig wants to merge 1 commit into
openshift:mainfrom
jhadvig:jhadvig/agentic-skills-unit-tests
Open

OTA-2024: Add unit test CI job for openshift/agentic-skills#81732
jhadvig wants to merge 1 commit into
openshift:mainfrom
jhadvig:jhadvig/agentic-skills-unit-tests

Conversation

@jhadvig

@jhadvig jhadvig commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Add a unit presubmit job for openshift/agentic-skills that runs Python unit tests for the plc_lookup.py CLI tool (added in openshift/agentic-skills#35).

Changes

  • ci-operator config: new unit test entry running python3 -m unittest discover against cluster-update/product-lifecycle/scripts/tests/
  • presubmits: auto-generated by make ci-operator-prowgen

The job reuses the existing skill-scanner image (Python 3.11 + repo source) and skips on docs-only and evals-only changes.

Context

Part of OTA-2024 — evaluation work for AI-guided cluster updates. The unit tests cover the Product Life Cycle API CLI tool: status passthrough, phase extraction, package-to-product lookup with duplicate handling, fallback search, and API error handling (33 tests, 0.02s).

Test plan

  • Unit tests pass locally: python3 -m unittest discover -s cluster-update/product-lifecycle/scripts/tests -v (33 pass)
  • make ci-operator-config ran successfully
  • make ci-operator-prowgen ran successfully

🤖 Generated with Claude Code

Summary by CodeRabbit

Adds a new OpenShift CI presubmit unit job for openshift/agentic-skills (configured in ci-operator/config/openshift/agentic-skills/openshift-agentic-skills-main.yaml) to run the plc_lookup.py tool’s Python unit tests via python3 -m unittest discover using the existing skill-scanner image. The job is wired to skip when changes are docs-only or evals-only, while leaving the existing eval job behavior unchanged (config generated with make ci-operator-prowgen; 33 unit tests reportedly pass locally).

CI robot feedback also notes that OTA-2024 is a valid Jira issue, but its target version is currently misaligned with the branch expectations (openshift-5.1 vs 5.0.* / openshift-5.0.*).

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 10, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@jhadvig: This pull request references OTA-2024 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 "openshift-5.1" instead.

Details

In response to this:

Summary

Add a unit presubmit job for openshift/agentic-skills that runs Python unit tests for the plc_lookup.py CLI tool (added in openshift/agentic-skills#35).

Changes

  • ci-operator config: new unit test entry running python3 -m unittest discover against cluster-update/product-lifecycle/scripts/tests/
  • presubmits: auto-generated by make ci-operator-prowgen

The job reuses the existing skill-scanner image (Python 3.11 + repo source) and skips on docs-only and evals-only changes.

Context

Part of OTA-2024 — evaluation work for AI-guided cluster updates. The unit tests cover the Product Life Cycle API CLI tool: status passthrough, phase extraction, package-to-product lookup with duplicate handling, fallback search, and API error handling (33 tests, 0.02s).

Test plan

  • Unit tests pass locally: python3 -m unittest discover -s cluster-update/product-lifecycle/scripts/tests -v (33 pass)
  • make ci-operator-config ran successfully
  • make ci-operator-prowgen ran successfully

🤖 Generated with Claude Code

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.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The OpenShift agentic-skills build configuration adds a unit test job that runs Python unittest discovery with the skill-scanner image and skips execution for configured non-impacting file changes.

Changes

Agentic skills test configuration

Layer / File(s) Summary
Add unit test job
ci-operator/config/openshift/agentic-skills/openshift-agentic-skills-main.yaml
Adds unittest discovery execution, uses the skill-scanner image, and includes evals/ in the skipped-change paths.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
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 No Ginkgo test titles were changed; the PR only adds static CI job names/commands in YAML, with no dynamic or overly-specific test names.
Test Structure And Quality ✅ Passed PR only changes ci-operator YAML; no Ginkgo test code or cluster-wait logic is touched, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed PR only adds ci-operator presubmit config; no new Ginkgo e2e tests or MicroShift-unsafe APIs/features were introduced.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo/e2e tests were added; the PR only adds a Python unit presubmit and generated job config, so there are no SNO assumptions to review.
Topology-Aware Scheduling Compatibility ✅ Passed PASS: The PR only adds a ci-operator/prow unit test job; no deployment manifests, controllers, replicas, affinity, node selectors, or PDBs were introduced.
Ote Binary Stdout Contract ✅ Passed PR only changes ci-operator YAML; no OTE binary code, suite setup, or stdout-writing process code was added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR only adds ci-operator presubmit config for a unit job; no new Ginkgo/e2e tests or network/IP logic were introduced.
No-Weak-Crypto ✅ Passed The PR only adds CI YAML for a unit job; neither changed file contains MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The added unit presubmit and generated job config contain no privileged:true, hostPID/Network/IPC, allowPrivilegeEscalation, or securityContext fields.
No-Sensitive-Data-In-Logs ✅ Passed PR only adds a ci-operator unittest job; diff contains no new logging or secret/PII output paths.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a unit test CI job for openshift/agentic-skills.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

Add a `unit` presubmit job that runs plc_lookup.py unit tests
on PRs touching skill scripts. Uses the existing skill-scanner
image which already has Python 3.11 and the repo source.

Skips on docs-only and evals-only changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jhadvig jhadvig force-pushed the jhadvig/agentic-skills-unit-tests branch from 8d21dd3 to 22a2131 Compare July 10, 2026 13:45
@jhadvig

jhadvig commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse auto-ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@jhadvig: 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]
@jhadvig: 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-agentic-skills-main-unit openshift/agentic-skills presubmit Presubmit 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

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@jhadvig: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/openshift/agentic-skills/main/unit 22a2131 link unknown /pj-rehearse pull-ci-openshift-agentic-skills-main-unit

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants