Repository navigation
OSAC-2116: migrate E2E tests from cores/memory_gib to instance_type - #164
openshift-merge-bot[bot] merged 1 commit into
Conversation
|
@ygalblum: This pull request references OSAC-2116 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 task to target the "5.0.0" version, but no target version was set. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (5)
WalkthroughTests now resolve compute-instance sizing through instance type defaults instead of explicit cores/memoryGiB arguments. A session fixture provisions the default instance type, OsacCLI uses it when creating instances, and the catalog and API field tests were updated to match the instance-type shape. ChangesInstance-type based sizing migration
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@tests/catalog/test_compute_instance_catalog_item_lifecycle.py`:
- Around line 124-137: The `reduced_fds` step in
`test_compute_instance_catalog_item_lifecycle` is redundant because it matches
the earlier `updated_fds` payload, so the
`grpc.update_compute_instance_catalog_item` call and the following
`get_compute_instance_catalog_item` assertions do not exercise any new behavior.
Either remove this block entirely and keep the existing `updated_fds` checks, or
change `reduced_fds` to a meaningfully different payload in this test by
updating the `fieldDefinitions` data through
`grpc.update_compute_instance_catalog_item` and asserting the distinct result
from `grpc.get_compute_instance_catalog_item`.
In `@tests/vmaas/test_compute_instance_api_fields.py`:
- Around line 89-94: The immutability check in the compute instance API test
uses a compound assertion that makes failures hard to diagnose. In the test
around the k8s_hub_client.patch call for instanceType, split the combined
substring check into separate assertions so it is clear whether the output is
missing "instanceType" or "immutable". Keep the existing rc check and use the
same output variable to preserve the current test flow while improving failure
diagnostics.
In `@tests/vmaas/test_compute_instance_cli_fields.py`:
- Around line 44-49: Split the combined assertion in the test around ci_spec and
it_label so absence of the "osac.openshift.io/instance-type-name" label and an
empty label value fail separately with distinct messages. Update the check near
labels/get("osac.openshift.io/instance-type-name") to use two assertions instead
of one compound condition, preserving the existing test intent while improving
diagnostics.
🪄 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: osac-project/coderabbit/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 0a1ea8fe-98e6-42f9-b70f-25b7fef5a890
📒 Files selected for processing (5)
tests/catalog/test_compute_instance_catalog_item_lifecycle.pytests/core/osac_cli.pytests/vmaas/conftest.pytests/vmaas/test_compute_instance_api_fields.pytests/vmaas/test_compute_instance_cli_fields.py
|
@ygalblum: The following test 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. |
Replace direct cores/memory_gib parameters with instance_type across all E2E test infrastructure, preparing for the breaking API removal in Phase 5. - Add default_instance_type to OsacCLI with explicit None-check fallback - Remove cores/memory_gib params from create_compute_instance (clean break) - Add session-scoped default_instance_type fixture in vmaas/conftest.py - Migrate CLI and API field tests to use instance_type path - Replace cores/memoryGiB immutability tests with instanceType immutability - Migrate CatalogItem field_definitions from cpu_cores/memory_gb to instance_type Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
3c974e0 to
fcc76b2
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DakCrowder, ygalblum 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 |
Replace direct cores/memory_gib parameters with instance_type across all E2E test infrastructure, preparing for the breaking API removal in Phase 5.
Assisted-by: Claude Code noreply@anthropic.com
Summary by CodeRabbit