Skip to content

📖 Add API conventions and deprecation guidance to AGENTS.md#2763

Open
pedjak wants to merge 1 commit into
operator-framework:mainfrom
pedjak:update-agents-md-api-conventions
Open

📖 Add API conventions and deprecation guidance to AGENTS.md#2763
pedjak wants to merge 1 commit into
operator-framework:mainfrom
pedjak:update-agents-md-api-conventions

Conversation

@pedjak

@pedjak pedjak commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Add API conventions section to AGENTS.md documenting:

  • Links to OpenShift and Kubernetes API conventions that must be followed
  • API linting workflow (make lint-api-diff)
  • CRD field deprecation pattern following Go and OpenShift conventions
  • Regeneration commands after API type changes

This helps AI coding assistants (and developers) follow the correct conventions
when making API changes, particularly around field deprecation.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate) — docs-only change
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Copilot AI review requested due to automatic review settings June 12, 2026 11:38
@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 99008a2
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6a2bf3fb8becb1000890b29f
😎 Deploy Preview https://deploy-preview-2763--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci openshift-ci Bot requested review from joelanford and perdasilva June 12, 2026 11:38
@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

[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 pedjak 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

@pedjak pedjak force-pushed the update-agents-md-api-conventions branch from c2d7e17 to be71c58 Compare June 12, 2026 11:39
@pedjak pedjak changed the title 📖 Add API conventions and deprecation guidance to AGENTS.md docs: add API conventions and deprecation guidance to AGENTS.md Jun 12, 2026
@pedjak pedjak changed the title docs: add API conventions and deprecation guidance to AGENTS.md 📖 Add API conventions and deprecation guidance to AGENTS.md Jun 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.go changes.
  • 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.

Comment thread AGENTS.md Outdated
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>
@pedjak pedjak force-pushed the update-agents-md-api-conventions branch from be71c58 to 99008a2 Compare June 12, 2026 11:56
Copilot AI review requested due to automatic review settings June 12, 2026 11:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread AGENTS.md

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.
Comment thread AGENTS.md
Comment on lines +219 to +223
// 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

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.80%. Comparing base (9c49467) to head (99008a2).
⚠️ Report is 5 commits behind head on main.

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     
Flag Coverage Δ
e2e 35.11% <ø> (+0.04%) ⬆️
experimental-e2e 52.51% <ø> (-0.18%) ⬇️
unit 52.12% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants