api icon indicating copy to clipboard operation
api copied to clipboard

OCPCLOUD-3254: Update api-review to do comprehensive test coverage analysis

Open mdbooth opened this issue 4 months ago • 6 comments

The most significant aspect of this change is the addition of AGENTS-validations.md, which codifies current guidance on writing validations for OpenShift APIs in a single document. This is as useful for meatbags as it is for robots, although it might be reformatted for human consumption.

The output from the command, at least when execute by claude, is unfortunately quite inconsistent. It is normally good, although consecutive runs might produce different sets of good output. You certainly cannot rely on the output to be complete.

It is also inconsistent as to whether it applies instructions. e.g. It sometimes heeds the instruction not to require test coverage for MaxLength validations, other times not.

This change also refactors the script in api-review.md to improve UX. Providing multiple scripts requires the user to authorise multiple script executions, as well as complicating the script itself.

mdbooth avatar Nov 10 '25 10:11 mdbooth

Pipeline controller notification This repository is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. Review these jobs and use /test <job> to manually trigger optional jobs most likely to be impacted by the proposed changes.

openshift-ci-robot avatar Nov 10 '25 10:11 openshift-ci-robot

Hello @mdbooth! Some important instructions when contributing to openshift/api: API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

openshift-ci[bot] avatar Nov 10 '25 10:11 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

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

openshift-ci[bot] avatar Nov 10 '25 10:11 openshift-ci[bot]

@mdbooth: all tests passed!

Full PR test history. Your PR dashboard.

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-ci[bot] avatar Nov 10 '25 11:11 openshift-ci[bot]

/retitle OCPCLOUD-3254: Update api-review to do comprehensive test coverage analysis

shellyyang1989 avatar Nov 12 '25 11:11 shellyyang1989

@mdbooth: This pull request references OCPCLOUD-3254 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 "4.21.0" version, but no target version was set.

In response to this:

The most significant aspect of this change is the addition of AGENTS-validations.md, which codifies current guidance on writing validations for OpenShift APIs in a single document. This is as useful for meatbags as it is for robots, although it might be reformatted for human consumption.

The output from the command, at least when execute by claude, is unfortunately quite inconsistent. It is normally good, although consecutive runs might produce different sets of good output. You certainly cannot rely on the output to be complete.

It is also inconsistent as to whether it applies instructions. e.g. It sometimes heeds the instruction not to require test coverage for MaxLength validations, other times not.

This change also refactors the script in api-review.md to improve UX. Providing multiple scripts requires the user to authorise multiple script executions, as well as complicating the script itself.

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-robot avatar Nov 12 '25 11:11 openshift-ci-robot