📖 Add API conventions and deprecation guidance to AGENTS.md#2763
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
c2d7e17 to
be71c58
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates AGENTS.md to document API conventions and field deprecation guidance so that developers and AI coding assistants follow OpenShift + Kubernetes norms when changing CRD-backed Go APIs.
Changes:
- Add links to OpenShift and Kubernetes API conventions for
api/v1/*_types.gochanges. - Document regeneration and API-lint workflows (
make manifests/make crd-ref-docs,make lint-api-diff). - Add a recommended deprecation comment pattern and related guidelines (optional fields, JSON tags, staticcheck suppression).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a section documenting OpenShift and Kubernetes API conventions that must be followed for API changes, including the deprecation pattern for CRD fields. Signed-off-by: Predrag Knezevic <pknezevi@redhat.com> Co-Authored-By: Claude <noreply@anthropic.com>
be71c58 to
99008a2
Compare
|
|
||
| API changes in `api/v1/*_types.go` must follow the [OpenShift API conventions](https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md) in addition to upstream [Kubernetes API conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md). | ||
|
|
||
| After modifying API types, run `make manifests crd-ref-docs` to regenerate CRDs, reference docs, and manifests. Run `make lint-api-diff` to validate changes against kube-api-linter. |
| // Deprecated: fieldName is no longer used and will be removed in a future release. | ||
| // Explanation of why and what replaces it. | ||
| // | ||
| // +optional | ||
| FieldName Type `json:"fieldName,omitzero"` |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2763 +/- ##
==========================================
- Coverage 66.97% 66.80% -0.17%
==========================================
Files 149 149
Lines 11382 11382
==========================================
- Hits 7623 7604 -19
- Misses 3206 3220 +14
- Partials 553 558 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Add API conventions section to AGENTS.md documenting:
make lint-api-diff)This helps AI coding assistants (and developers) follow the correct conventions
when making API changes, particularly around field deprecation.
Reviewer Checklist