feat: Add Azure and GCP support#240
Closed
IkeM-L wants to merge 2626 commits into
Closed
Conversation
fix(config): config_dict path now applies full normalisation pipeline
…ithub-actions-20326145ca ci(deps): bump the github-actions group with 5 updates
…intenance chore: monthly dependency maintenance
Adds 33 new onmoto tests covering previously untested price type and release scenarios for the three main AWS fleet handlers: - test_ec2fleet_price_types.py (13 tests): spot + heterogeneous price types across instant/maintain/request fleet types; release capacity decrement; partial release; multi-AZ subnets; tag propagation - test_asg_price_types.py (9 tests): spot + heterogeneous price types; release with capacity decrement; partial release; tag propagation; multi-instance types; min/max/desired capacity assertions - test_spot_fleet_gaps.py (11 tests): on-demand + heterogeneous price types; maintain/request fleet cancellation on full release; partial release capacity decrement; allocation strategy; expiry time; tags 274 onmoto tests passing. Pre-existing failures in test_sdk_onmoto.py are unrelated to these changes (confirmed on main). Closes tasks: open-resource-broker-2147, open-resource-broker-2148, open-resource-broker-2149
…in CI Fixes 440 pyright errors across 87 test files, reducing to 0. Changes: - Phase 0: ruff auto-fix pass (already clean) - Phase 1: fix reportMissingImports, reportUnhashable, None guards - Phase 2: fix reportAbstractUsage, MagicMock(**dict) patterns - Phase 3: fix reportArgumentType, reportAttributeAccessIssue across all remaining files — SimpleNamespace → typed domain objects, boto3 client mock assignments via cast(Any, ...), private attr access via public API Also enforces pyright on tests/ in CI: - pyproject.toml: expand include from src/orb + 2 test dirs to all tests/ and remove 4 previously-excluded onmoto files (now clean) - makefiles/ci.mk: change pyright target from src/ to src/ tests/ 5986 tests passing, 4 pre-existing failures in test_sdk_onmoto.py (confirmed on main before these changes)
…onaws fixes Adds remaining tests for epic open-resource-broker-1670: - test_run_instances_gaps.py (9 tests): tags, user_data, key_name, IAM instance profile propagation; stopped/terminated check_status; two-step partial release; idempotent release; invalid subnet error handling - test_cross_cutting.py (6 tests): provider_data.resource_type for ASG and RunInstances; LT tag verification (orb:request-id, orb:managed-by) with real AWSLaunchTemplateManager; idempotency for RunInstances and EC2Fleet - test_cleanup_e2e_onaws.py: add TestRunInstancesCleanupE2E class - test_onaws.py: re-enable EC2Fleet+maintain+ondemand/spot in DEFAULT_ATTRIBUTE_COMBINATIONS; add partial return cases for EC2Fleet+request and SpotFleet+request Closes tasks: open-resource-broker-2150, open-resource-broker-2151, open-resource-broker-2152
…rapping Rich Console() with no arguments auto-detects terminal width and defaults to 80 chars when stdout is not a TTY (subprocess context). This caused JSON output to be line-wrapped at 80 chars, inserting literal newlines into JSON string values (e.g. status messages), making the output unparseable by hfmock._parse_json_response. Changes: - main.py: use plain print() instead of print_info() for JSON output — JSON must never go through Rich's line-wrapping console - console.py: set Console width to max int when not a TTY, and disable colour — prevents line wrapping in subprocess/pipe contexts This fixes test_partial_return_reduces_capacity failures where _wait_for_return_completion received KeyError: 'requests' because the status response JSON was corrupted by Rich line wrapping.
…rage Closes all 8 gaps identified in the onmoto/onaws equivalence analysis: - test_partial_return.py: TestPartialReturnCapacityReduction — ASG/EC2Fleet/ SpotFleet capacity decrement assertions after partial return - test_multi_resource_onmoto.py: multi-RunInstances and multi-ASG batch return - test_sdk_onmoto.py: get_request_status(ret-xxx) response shape regression guard; extended provider API scenario breadth (EC2Fleet/ASG/SpotFleet) - test_cleanup_e2e.py: TestCleanupViaOrchestrator — full return via CQRS buses deletes LT and terminates instance - test_rest_api_onmoto.py: pagination (limit/offset) and concurrent requests - test_mcp_onmoto.py: list_return_requests reaches complete status - test_cli_onmoto.py: narrow terminal (COLUMNS=40/20) JSON output validity regression test for Rich line-wrapping fix
…eturn Regression introduced in d7e804e which added fleet deletion for request fleets after any instance termination — including partial returns. This caused the fleet to enter deleted_running state with orphaned instances. Fixes: - Extract FleetReleaseDecision value object in fleet_release_policy.py encoding requires_capacity_reduction, has_fleet_record, is_full_return - EC2Fleet request partial return: terminate instances only, no fleet deletion, no LT cleanup (fire-and-forget, AWS won't replace instances) - EC2Fleet request full return: delete fleet + cleanup LT (unchanged) - EC2Fleet maintain full return: use _delete_fleet() not delete_fleets() directly (preserves TerminateInstances=True semantics) - SpotFleet request partial return: terminate instances only, no cancel - SpotFleet maintain: fix enum vs string comparison bug (AWSFleetType enum was never matching the lowercase string from fleet config) - Both release managers now use compute_fleet_release_decision() instead of inline fleet_type branching Closes: open-resource-broker-2162, open-resource-broker-2163
…leanup_e2e.py Addresses GitHub code quality bot comments on PR finos#190.
…rom main - Auto-fix 17 ruff I001/F401 errors in test files introduced by pyright fixes - Restore uv.lock from main to fix nltk 3.9.3→3.9.4 CVE regression caused by conflict resolution taking wrong side during rebase
- Rename _partial_return_cases() to _partial_return_capacity_cases() removing request fleet cases — request fleets are fire-and-forget and do not reduce capacity on partial return - Add _partial_return_fire_and_forget_cases() covering EC2Fleet request, SpotFleet request, and RunInstances - Add test_partial_return_terminates_instance_only asserting correct behaviour for fire-and-forget partial returns: instance terminated, remaining instances still running, capacity unchanged, fleet not deleted This fixes 14 failing onaws test_partial_return_reduces_capacity cases for EC2Fleet.Request and SpotFleet.Request scenarios.
…use config-driven paths - Add 4 test files to pyright exclude list — they intentionally import non-existent modules inside pytest.raises(ImportError) to verify deleted code is gone; pyright cannot distinguish this intent - Change ci-quality-pyright to run pyright without explicit paths so the exclude list in pyproject.toml is respected
…nces provisioned Weighted multi-type EC2Fleet request scenarios can fulfil 4 units of weighted capacity with a single high-weight instance (e.g. t2.medium weight=4). This is correct AWS behaviour, not a flaky infra issue. Replace assert with pytest.skip so the test is skipped gracefully rather than failing when weighted capacity results in 1 physical instance.
added 20 commits
May 29, 2026 15:18
…he resource-id field
23 tasks
This was referenced Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds first-class Azure and GCP provider support and wires both providers into
the shared ORB provider registration, configuration, template, CLI, validation,
and lifecycle paths.
Changes in this branch:
extensions, CLI spec, registration, credential/session handling, Azure client
integration, VMSS/SingleVM/CycleCloud handlers, ARM payload mapping, metadata
handling, inventory/status, provisioning, termination, VMSS cleanup, health
checks, and Azure-specific exceptions.
extensions, CLI spec, registration, Compute Engine client integration,
SingleVM/MIG handlers, operation contexts, provisioning, mutation, inventory,
health checks, dry-run support, image resolution, and typed GCP exception
translation.
registry and loads provider defaults without relying on eager provider
registry bootstrap.
orb provider add/updateandorb initCLI surfaces for Azure andGCP provider configuration.
and Azure spot placement score adapters (GCP has no equivalent abstraction).
timeout handling, partial fulfillment, planned spot shortfalls, provider
metadata propagation, and provider follow-up cleanup states.
instead of flattening AWS-only fields into shared metadata.
patterns changed by this work.
Examples of bug fixes to pre-existing code landed in this branch:
resource_idon discovered machines: theprior code always took
request.resource_ids[0]as the fallback rather thanpreferring the instance's own resource identity. Multi-resource Azure
acquires surfaced the bug, but the fix improves correctness in general.
wrapped long strings and broke consumers parsing stdout as JSON; structured
output now also honors
--quiet.Diff size: 243 files changed, 36,504 insertions, 481 deletions.
Type of Change
Related Issues
N/A
How Has This Been Tested?
Test coverage added/updated in this branch includes:
service, native spec service, network identity resolution, resource manager,
strategy lifecycle/status, template validation, CycleCloud handling, VMSS
cleanup, VMSS handler behavior, SingleVM handler behavior, SSH key resolution,
error utilities, import guards, and async service behavior.
Compute client behavior, disk types, runtime behavior, strategy CLI defaults,
and service account scopes.
machine sync, request status management, request query behavior, spot placement
planning/execution, request creation/sync handlers, template command/query
handlers, and acquire/return orchestration.
defaults, init handling, field mapping, template DTO round-tripping, and
provider import boundaries.
Checks run:
uv run pyrightuv run pytest --no-cov -q -rauv run pytest --no-cov -q -ra -o addopts='--tb=short --strict-markers' tests/onmoto/test_cli_onmoto.pyTest Configuration
httpx, Azure SDK packages,google-cloud-compute, and a dev pytest dependency entry; updatesuv.lock.Checklist
Additional Notes
username/password or bearer-token fields.
boundary so shared template DTOs do not need AWS/Azure/GCP-specific fields for
every provider knob.
Screenshots (if appropriate)
N/A
Performance Impact
Provider operations now use async orchestration paths where applicable. GCP's
synchronous SDK execution is isolated behind the async provider contract with
worker-thread execution.
Security Considerations
Security-relevant changes:
New surface added for the new providers:
callers must use credential references.
context in the new Azure paths.
Dependencies
New runtime dependencies:
httpx>=0.27.0azure-core>=1.38.2azure-identity>=1.25.2azure-mgmt-authorization>=4.0.0azure-mgmt-compute>=37.2.0azure-mgmt-monitor>=7.0.0azure-mgmt-msi>=7.1.0azure-mgmt-network>=30.2.0azure-mgmt-resource>=25.0.0azure-mgmt-resource-subscriptions>=1.0.0b1google-cloud-compute>=1.39.0New dev dependency entry:
pytest>=9.0.2Migration Guide
N/A
Deployment Notes
configuration and Azure credentials resolvable by the runtime environment.
when using CycleCloud-backed templates.
project_id,region, and Application DefaultCredentials available in the runtime environment.
Reviewers
@finos/open-resource-broker-maintainers