NO-JIRA: docs(agents): add CRD API machinery fundamentals and envtest docs#8236
NO-JIRA: docs(agents): add CRD API machinery fundamentals and envtest docs#8236enxebre wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@enxebre: This pull request explicitly references no jira issue. DetailsIn response to this:
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. |
📝 WalkthroughWalkthroughThe pull request updates two documentation files. Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (9 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@AGENTS.md`:
- Around line 91-101: Update the Kubernetes version range in the "Envtest (API
Validation Tests)" section of AGENTS.md so it matches test/envtest/README.md:
change "1.30–1.35" to "1.31–1.35" in the Envtest (API Validation Tests)
paragraph and verify both documents consistently state "1.31–1.35" to avoid
future mismatch.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 568fa85f-9ae0-4305-8266-5a947006f573
📒 Files selected for processing (2)
AGENTS.mdtest/envtest/README.md
| ### Envtest (API Validation Tests) | ||
| - Located in `test/envtest/` with build tag `envtest` | ||
| - Tests CRD validation rules (CEL, OpenAPI schema) against real kube-apiserver + etcd | ||
| - Test cases are YAML-driven following the openshift/api convention | ||
| - Each YAML file defines `onCreate` and `onUpdate` test cases with expected errors | ||
| - Run with `make test-envtest-ocp` (OpenShift k8s versions) or `make test-envtest-kube` (vanilla k8s versions), or `make test-envtest-api-all` for both | ||
| - Tests run across multiple Kubernetes versions (1.30–1.35) to verify validation ratcheting and compatibility | ||
| - Feature gate filtering: test suites can target stable, tech-preview, or feature-gated CRD variants | ||
|
|
||
| See test/envtest/README.md for details | ||
|
|
There was a problem hiding this comment.
Fix Kubernetes version range mismatch across docs.
Line 97 says envtest runs across Kubernetes 1.30–1.35, but test/envtest/README.md documents 1.31–1.35. Please align these to avoid contributor confusion.
📝 Suggested doc fix
-- Tests run across multiple Kubernetes versions (1.30–1.35) to verify validation ratcheting and compatibility
+- Tests run across multiple Kubernetes versions (1.31–1.35) to verify validation ratcheting and compatibility📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### Envtest (API Validation Tests) | |
| - Located in `test/envtest/` with build tag `envtest` | |
| - Tests CRD validation rules (CEL, OpenAPI schema) against real kube-apiserver + etcd | |
| - Test cases are YAML-driven following the openshift/api convention | |
| - Each YAML file defines `onCreate` and `onUpdate` test cases with expected errors | |
| - Run with `make test-envtest-ocp` (OpenShift k8s versions) or `make test-envtest-kube` (vanilla k8s versions), or `make test-envtest-api-all` for both | |
| - Tests run across multiple Kubernetes versions (1.30–1.35) to verify validation ratcheting and compatibility | |
| - Feature gate filtering: test suites can target stable, tech-preview, or feature-gated CRD variants | |
| See test/envtest/README.md for details | |
| ### Envtest (API Validation Tests) | |
| - Located in `test/envtest/` with build tag `envtest` | |
| - Tests CRD validation rules (CEL, OpenAPI schema) against real kube-apiserver + etcd | |
| - Test cases are YAML-driven following the openshift/api convention | |
| - Each YAML file defines `onCreate` and `onUpdate` test cases with expected errors | |
| - Run with `make test-envtest-ocp` (OpenShift k8s versions) or `make test-envtest-kube` (vanilla k8s versions), or `make test-envtest-api-all` for both | |
| - Tests run across multiple Kubernetes versions (1.31–1.35) to verify validation ratcheting and compatibility | |
| - Feature gate filtering: test suites can target stable, tech-preview, or feature-gated CRD variants | |
| See test/envtest/README.md for details |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 91 - 101, Update the Kubernetes version range in the
"Envtest (API Validation Tests)" section of AGENTS.md so it matches
test/envtest/README.md: change "1.30–1.35" to "1.31–1.35" in the Envtest (API
Validation Tests) paragraph and verify both documents consistently state
"1.31–1.35" to avoid future mismatch.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8236 +/- ##
=======================================
Coverage 34.63% 34.63%
=======================================
Files 767 767
Lines 93186 93200 +14
=======================================
+ Hits 32277 32282 +5
- Misses 58236 58243 +7
- Partials 2673 2675 +2 🚀 New features to boost your workflow:
|
|
|
||
| For conventions read https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md | ||
|
|
||
| `make api-lint` will enforce most conventions and best practices. |
There was a problem hiding this comment.
should it use api-lint-fix to actually enforce conventions?
NO-JIRA Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
97bd276 to
961f460
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/envtest/README.md`:
- Around line 11-25: The fenced code block in test/envtest/README.md is missing
a language identifier (MD040); update the opening fence from ``` to include a
tag such as ```text (or ```console/```yaml as appropriate) so the block starts
with a language identifier and the markdownlint warning is resolved—modify the
fenced block that lists "cmd/install/assets/crds/hypershift-operator/"
accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 7eb72cdd-a24e-44c3-bcdd-208f528865f0
📒 Files selected for processing (2)
AGENTS.mdtest/envtest/README.md
✅ Files skipped from review due to trivial changes (1)
- AGENTS.md
| ``` | ||
| cmd/install/assets/crds/hypershift-operator/ | ||
| ├── zz_generated.crd-manifests/ # Generated CRDs (by make api) | ||
| │ ├── 0000_10_hostedclusters-Default.crd.yaml | ||
| │ ├── 0000_10_hostedclusters-TechPreviewNoUpgrade.crd.yaml | ||
| │ └── ... | ||
| ├── tests/ # Test suite YAMLs | ||
| │ ├── hostedclusters.hypershift.openshift.io/ | ||
| │ │ ├── stable.hostedclusters.validation.testsuite.yaml | ||
| │ │ └── ... | ||
| │ └── nodepools.hypershift.openshift.io/ | ||
| │ └── ... | ||
| └── payload-manifests/ # Feature gate definitions | ||
| └── featuregates/ | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the fenced block (MD040).
Line 11 opens a fenced block without a language identifier, which triggers markdownlint MD040.
✏️ Proposed fix
-```
+```text
cmd/install/assets/crds/hypershift-operator/
├── zz_generated.crd-manifests/ # Generated CRDs (by make api)
│ ├── 0000_10_hostedclusters-Default.crd.yaml
│ ├── 0000_10_hostedclusters-TechPreviewNoUpgrade.crd.yaml
│ └── ...
├── tests/ # Test suite YAMLs
│ ├── hostedclusters.hypershift.openshift.io/
│ │ ├── stable.hostedclusters.validation.testsuite.yaml
│ │ └── ...
│ └── nodepools.hypershift.openshift.io/
│ └── ...
└── payload-manifests/ # Feature gate definitions
└── featuregates/</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 11-11: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@test/envtest/README.md` around lines 11 - 25, The fenced code block in
test/envtest/README.md is missing a language identifier (MD040); update the
opening fence from ``` to include a tag such as ```text (or ```console/```yaml
as appropriate) so the block starts with a language identifier and the
markdownlint warning is resolved—modify the fenced block that lists
"cmd/install/assets/crds/hypershift-operator/" accordingly.
|
/lgtm |
|
Scheduling tests matching the |
Test Resultse2e-aws
e2e-aks
|
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
|
@enxebre: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
Now I have all the evidence I need. Let me verify the key details: 427 tests ran, 400 passed, 25 skipped, only 2 failures — both Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryThe Root CauseImage resolution race condition in OLM catalog deployments. The catalog deployments (
This failure is NOT caused by PR #8236. The PR only modifies documentation files ( Recommendations
Evidence
|
Summary
Test plan
make test-envtest-api-allto confirm documented commands work🤖 Generated with Claude Code
Summary by CodeRabbit