chore: update generated code marker to class_generator path#2750
Conversation
|
Important Review skippedToo many files! This PR contains 158 files, which is 8 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (158)
You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe top-of-file "Generated using …" comment in 120+ ChangesGenerator attribution comment bulk update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Cherry-pick Operations
Branch Management
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
PR Summary by QodoAlign generated-code marker with class_generator path for CodeRabbit skipping Description
Diagram
High-Level Assessment
Files changed (132)
|
|
/verified |
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Actionable comments posted: 13
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ocp_resources/authorino.py`:
- Line 1: The generated-resource marker in the authorino file has changed, so
downstream consumers still checking the old marker will stop recognizing
generated resources. Update the marker handling in validate_resources.py and
class_generator/utils.py to match the new “Generated using
https://github.com/RedHatQE/openshift-python-wrapper/blob/main/class_generator/README.md”
string, or centralize the marker into a shared constant/config used by both
places. Focus on the marker-matching logic in the resource validation and class
generation paths so they stay consistent.
In `@ocp_resources/cluster_user_defined_network.py`:
- Line 1: The generated-marker URL is still inconsistent across the toolchain,
so update the hardcoded reference used by the generator and validation flow to
the new class_generator README location. Adjust the logic in
class_generator/core/generator.py, class_generator/utils.py, and
tests/scripts/validate_resources.py so they all point to
class_generator/README.md, keeping the marker check and regeneration path
aligned.
In `@ocp_resources/deployment.py`:
- Line 1: Update the generated-file marker consistently across the generator and
validator: the header emitted by class_generator/core/generator.py’s generation
path and the skip/match check in tests/scripts/validate_resources.py must be
changed together, since ocp_resources/deployment.py alone is only one generated
output and will no longer be recognized if the strings diverge. Make the
validator’s generated-file detection match the new header exactly, and ensure
the generator emits the same updated header for all regenerated resources.
In `@ocp_resources/frr_configuration.py`:
- Line 1: The generated-file marker was changed, but the discovery logic still
looks for the old marker string, so generated resources with the new header are
missed. Update the marker consumer in class_generator/utils.py to match the new
class_generator/README.md header used by generated files, and verify the
resource discovery path still recognizes classes like the one in
frr_configuration.py.
In `@ocp_resources/group.py`:
- Line 1: The header check in validate_resources.py still hard-codes the old
generated-file marker, so the new class_generator README header is not being
recognized. Update the string matched by the validator to the new
class_generator/README.md header so generated resource files like the one in
group.py are skipped before AST validation.
In `@ocp_resources/lm_eval_job.py`:
- Line 1: The generated resource header is still using the old README path, so
update the header template in class_generator/core/generator.py so it emits the
new class_generator/README.md reference instead of the legacy
scripts/resource/README.md. Make the change in the generator logic that produces
the top-of-file comment for generated resources, then regenerate or update
affected outputs such as lm_eval_job.py so the header stays consistent across
future generated files.
- Line 1: The generated-file header string is out of sync between the resource
file and the generator/validator. Update the header emitted by
class_generator/core/generator.py to match the new class_generator/README.md
value, and change tests/scripts/validate_resources.py to recognize the same
header so regenerated resources pass validation. Keep the header constant
consistent across these symbols: generator.py, validate_resources.py, and the
generated lm_eval_job.py files.
In `@ocp_resources/mig_analytic.py`:
- Line 1: The generated resource marker still points to the old README path, so
update both the generator and validator to use class_generator/README.md
consistently. Change the path emitted by generator.py and the skipped marker
checked by validate_resources.py so generated files remain in sync and
validation recognizes the new location. Use the existing generator/validator
logic and the resource marker string to locate the updates.
In `@ocp_resources/network_config_openshift_io.py`:
- Line 1: The generated header in NetworkConfigOpenShiftIo now points to the
class_generator README, but tests/scripts/validate_resources.py still only skips
the old scripts/resource/README.md path. Update the skip logic in
validate_resources.py to exclude the new .../class_generator/README.md header so
the generated resources are not validated. Refer to the resource validation skip
list and any header-matching logic that checks generated files.
In `@ocp_resources/node_config_openshift_io.py`:
- Line 1: The generated-file marker logic in class_generator/utils.py still
looks for the old scripts/resource/README.md path, so update
_analyze_resource_file() to recognize the new class_generator/README.md marker
used by generated resource files. Adjust the match/check so files like
node_config_openshift_io.py are still detected as generated and included in
regeneration.
In `@ocp_resources/pod.py`:
- Line 1: The generated-file marker is inconsistent across the resource
generator and its consumers, so update the marker handling in
`class_generator/utils.py`, `class_generator/core/generator.py`, and
`tests/scripts/validate_resources.py` to match the new
`class_generator/README.md` reference used by `ocp_resources/pod.py`. Make the
generator emit the same marker string everywhere, and adjust the
validation/discovery logic so generated resources are still recognized
consistently after regeneration.
In `@ocp_resources/user_defined_network.py`:
- Line 1: The generated resource header and validation logic are still using the
old README URL, so update the hardcoded header reference in generator.py’s
generator flow and the header check in validate_resources.py to the new
class_generator README URL. Make sure the generation path that emits the comment
in user_defined_network.py and the validator both use the same source string so
future regenerations and checks stay in sync.
In `@ocp_resources/virtual_machine_instance_replica_set.py`:
- Line 1: The generated-file marker used by the scanner is still tied to the old
README reference, so new ocp_resources files with the class_generator header are
not being recognized. Update the marker logic in class_generator/utils.py around
the generated-file detection so it matches the new “Generated using
…/class_generator/README.md” header, and ensure the scanner continues to skip
generated files like virtual_machine_instance_replica_set.py.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9d114a40-08ec-4055-9b1a-19f3c278dfa3
📒 Files selected for processing (132)
ocp_resources/aaq.pyocp_resources/api_server.pyocp_resources/authentication_config_openshift_io.pyocp_resources/authentication_operator_openshift_io.pyocp_resources/authorino.pyocp_resources/bgp_session_state.pyocp_resources/cdi.pyocp_resources/cdi_config.pyocp_resources/cluster_resource_quota.pyocp_resources/cluster_user_defined_network.pyocp_resources/config_imageregistry_operator_openshift_io.pyocp_resources/config_map.pyocp_resources/config_operator_openshift_io.pyocp_resources/config_samples_operator_openshift_io.pyocp_resources/console_config_openshift_io.pyocp_resources/console_operator_openshift_io.pyocp_resources/conversion.pyocp_resources/csi_driver.pyocp_resources/data_import_cron.pyocp_resources/data_protection_application.pyocp_resources/data_science_cluster.pyocp_resources/data_science_pipelines_application.pyocp_resources/deployment.pyocp_resources/direct_volume_migration.pyocp_resources/direct_volume_migration_progress.pyocp_resources/dns_config_openshift_io.pyocp_resources/dns_operator_openshift_io.pyocp_resources/dsc_initialization.pyocp_resources/evalhub.pyocp_resources/frr_configuration.pyocp_resources/gateway_class.pyocp_resources/gateway_config.pyocp_resources/gateway_gateway_networking_k8s_io.pyocp_resources/gateway_networking_istio_io.pyocp_resources/group.pyocp_resources/guardrails_orchestrator.pyocp_resources/image_caching_internal_knative_dev.pyocp_resources/image_config_openshift_io.pyocp_resources/image_content_source_policy.pyocp_resources/image_image_openshift_io.pyocp_resources/inference_graph.pyocp_resources/ingress_config_openshift_io.pyocp_resources/ingress_networking_k8s_io.pyocp_resources/jaeger.pyocp_resources/kube_descheduler.pyocp_resources/kubelet_config.pyocp_resources/kubevirt.pyocp_resources/llama_stack_distribution.pyocp_resources/llm_inference_service.pyocp_resources/lm_eval_job.pyocp_resources/maa_s_auth_policy.pyocp_resources/maa_s_model.pyocp_resources/maa_s_subscription.pyocp_resources/maas_auth_policy.pyocp_resources/maas_model_ref.pyocp_resources/maas_subscription.pyocp_resources/machine.pyocp_resources/maria_db.pyocp_resources/mariadb_operator.pyocp_resources/mig_analytic.pyocp_resources/mig_cluster.pyocp_resources/mig_controller.pyocp_resources/mig_migration.pyocp_resources/mig_plan.pyocp_resources/mlflow.pyocp_resources/mlflow_config.pyocp_resources/model_registry.pyocp_resources/model_registry_components_platform_opendatahub_io.pyocp_resources/model_registry_modelregistry_opendatahub_io.pyocp_resources/mtq.pyocp_resources/multi_namespace_virtual_machine_storage_migration.pyocp_resources/multi_namespace_virtual_machine_storage_migration_plan.pyocp_resources/namespace.pyocp_resources/nemo_guardrails.pyocp_resources/network_config_openshift_io.pyocp_resources/network_operator_openshift_io.pyocp_resources/network_policy.pyocp_resources/nm_state.pyocp_resources/node.pyocp_resources/node_config_openshift_io.pyocp_resources/node_network_configuration_policy_latest.pyocp_resources/notebook.pyocp_resources/oauth.pyocp_resources/open_telemetry_collector.pyocp_resources/operator.pyocp_resources/pipeline.pyocp_resources/pipeline_run.pyocp_resources/pod.pyocp_resources/pod_metrics.pyocp_resources/project_config_openshift_io.pyocp_resources/project_project_openshift_io.pyocp_resources/project_request.pyocp_resources/prometheus.pyocp_resources/rate_limit_policy.pyocp_resources/replica_set.pyocp_resources/route_advertisements.pyocp_resources/scaled_object.pyocp_resources/scheduler.pyocp_resources/securesign.pyocp_resources/security_context_constraints.pyocp_resources/self_subject_review.pyocp_resources/service.pyocp_resources/service_mesh_member.pyocp_resources/service_serving_knative_dev.pyocp_resources/serving_runtime.pyocp_resources/snapshot.pyocp_resources/ssp.pyocp_resources/storage_cluster.pyocp_resources/task.pyocp_resources/task_run.pyocp_resources/tempo_stack.pyocp_resources/token_rate_limit_policy.pyocp_resources/user.pyocp_resources/user_defined_network.pyocp_resources/validating_admission_policy.pyocp_resources/validating_admission_policy_binding.pyocp_resources/virtual_machine_cluster_instancetype.pyocp_resources/virtual_machine_cluster_preference.pyocp_resources/virtual_machine_export.pyocp_resources/virtual_machine_instance.pyocp_resources/virtual_machine_instance_migration.pyocp_resources/virtual_machine_instance_preset.pyocp_resources/virtual_machine_instance_replica_set.pyocp_resources/virtual_machine_instancetype.pyocp_resources/virtual_machine_preference.pyocp_resources/virtual_machine_storage_migration.pyocp_resources/virtual_machine_storage_migration_plan.pyocp_resources/virtual_machine_template.pyocp_resources/virtual_machine_template_request.pyocp_resources/volume_snapshot.pyocp_resources/volume_snapshot_class.pyocp_resources/vtep.py
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
Thanks — that matches the current PR state.
No further action needed from my side. |
Update the generated code comment marker in all 132 ocp_resources files from scripts/resource/README.md to class_generator/README.md to align with the current class-generator tool location and .coderabbit.yaml skip instructions.
Update scripts/resource/README.md → class_generator/README.md in all remaining places: generator output, resource scanner, validator, test fixtures, and test manifests. This ensures the marker is consistent across the entire codebase and the class-generator toolchain.
21942b1 to
c1ced2f
Compare
|
Clean rebase detected — no code changes compared to previous head ( |
|
/verified |
|
/approve |
…path Update generated code marker from scripts/resource/README.md to class_generator/README.md to align with PR RedHatQE#2750. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
What this PR does
Updates the generated code comment marker in all 132
ocp_resources/files from the old path (scripts/resource/README.md) to the current class-generator path (class_generator/README.md).Why
The
.coderabbit.yamlskip instruction references the new marker (class_generator/README.md), but all existing generated files still used the old marker (scripts/resource/README.md). This meant CodeRabbit was not skipping generated code sections during reviews.Changes
ocp_resources/: replacedscripts/resource/README.md→class_generator/README.mdin the generated code start marker comment.Summary by CodeRabbit