feat: add Compute Engine and storage SDK contracts - #191
Conversation
|
| Filename | Overview |
|---|---|
| src/main/java/io/floci/gcp/services/compute/ComputeService.java | Coordinates persistent Compute projects, scoped operations, request deduplication, and resource lifecycle behavior. |
| src/main/java/io/floci/gcp/services/gcs/GcsService.java | Adds multipart publication behavior, atomic bucket deletion, encoded object keys, and restart-safe legacy-key migration. |
| src/main/java/io/floci/gcp/services/gke/GkeService.java | Adds separately persisted node pools, startup migration, and expanded cluster and node-pool operations. |
| src/main/java/io/floci/gcp/services/cloudmonitoring/CloudMonitoringService.java | Scopes time-series storage and retrieval by project to prevent cross-project visibility. |
| .github/workflows/cloud-contracts.yml | Builds the native emulator and runs isolated Java and Ruby SDK and restart contracts. |
| .github/workflows/warm-compat-caches.yml | Keeps the cache-warming matrix and Ruby dependency triggers aligned with compatibility CI. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
SDK[Java and Ruby SDK clients] --> Runtime[floci-gcp runtime]
Runtime --> Compute[Compute Engine control plane]
Runtime --> GCS[GCS REST, XML, and gRPC]
Runtime --> Monitoring[Project-scoped Monitoring]
Runtime --> GKE[GKE ClusterManager]
Compute --> PersistentState[Configured storage backends]
GCS --> PersistentState
Monitoring --> ProjectState[Project-isolated state]
GKE --> ClusterStore[Cluster store]
GKE --> NodePoolStore[Node-pool store]
Reviews (3): Last reviewed commit: "chore: merge upstream GCS deletion and G..." | Re-trigger Greptile
| matrix: | ||
| test: | ||
| - sdk-test-java | ||
| - sdk-test-ruby |
There was a problem hiding this comment.
Adding sdk-test-ruby only to the compatibility matrix breaks the documented requirement that the cache-warming matrix mirror it exactly. Pull-request jobs use a read-only cache, so the Ruby image will always build cold instead of receiving a cache populated from main. Add the Ruby target to warm-compat-caches.yml.
Knowledge Base Used:
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Fixed in 9ad82ec. sdk-test-ruby is now in warm-compat-caches.yml, and changes to its Gemfile or Gemfile.lock trigger warming. Runner architecture and cache scope still match compatibility.yml; PR jobs remain cache readers.
Validated exact matrix equality and both dependency triggers. The pinned Ruby image and SDK/restart suites are also exercised in the linked validation run. Base-branch cache publication occurs through the existing warming workflow after merge; this does not claim the upstream main cache is already warm.
Validation at 9ad82ec: all 986 hosted JVM tests and 30 native Java/Ruby SDK and restart checks passed. Run and JUnit artifacts.
1117f7a to
8898b8b
Compare
8898b8b to
9ad82ec
Compare
|
What does "waiting-contributor" mean? Can I help with something? |
|
@vedit it was automatically by the automation I do have on my computer, I will need to check the conditions. |
Summary
Add a persistent Compute Engine REST control plane so official SDK clients can create networks, run VM and disk lifecycles, restore images and snapshots, and configure a global external HTTP Application Load Balancer locally. Also add GCS XML multipart uploads and project-scoped Monitoring time-series access, with Java and Ruby SDK contracts across JVM and native runtimes.
Related to #100: the network/subnet/firewall/address implementation overlaps that request. The issue remains unassigned, and its existing comment expresses another contributor's interest; no competing Compute networking PR was open when checked. This PR does not automatically close the issue or claim gcloud/Terraform coverage.
The contribution is assembled from topic commits for Ruby compatibility, Compute foundations, instances/disks, images/snapshots, load balancing, GCS multipart, and Monitoring isolation. Follow-up protocol fixes and shared SDK tests are included here so reviewers have the complete tested implementation.
Type of change
fix:)feat:)feat!:orfix!:)GCP Compatibility
/compute/v1/projects/...paths and separate scoped Compute operations, including polling/wait/delete, request-ID deduplication, optimistic fingerprints, pagination, reference checks, and restart recovery. Resource configuration is recorded at request acceptance; operation status advances from persisted timestamps during reads/polling.GCE_VM_IP_PORTNEGs, global health checks, backend services, URL maps, HTTP target proxies and forwarding rules, including shared-resource cleanup validation.MultipartUploadClientand Ruby-signed HTTP requests. No gcloud verification is claimed.Validation
SDK failure correction (2026-09-11)
Source
060bb64881e8811b069a9c3cf6d217fe6c7c255f, including fix9b4d6c8and an upstream merge to resolve the GCS write-lock conflict.The Java BOM upgrade in this PR exposed two existing compatibility gaps in the failed Java SDK job:
GcsGrpcTest: gRPC bucket responses used the project ID where Storage v2 requires a project number on output. The mapper now uses the existing stored project number. Regression coverage checks create/get/list/update and compares official Java REST/gRPC bucket metadata.GcsServiceAccountAuthenticationTest: successful SDK calls did not populate the original credential object's access-token cache. The test now captures outgoing Authorization headers at request execution and verifies nonempty Bearer credentials for bucket create/read, while preserving normal SDK credential handling and cleanup.Both tests now run in the fork's native contract workflow as well as the complete upstream compatibility suite. The upstream merge preserves bucket-before-object locking for both ordinary and XML multipart writes.
Current validation:
sha256:2e986ea09647e51e4236fbc5929c877a60e26002c93e65c31bbbb23b37e6aefd; binary SHA-25675959e6475128794447657be503191f67df386a666ca65fdc7794f94cf7417d5(Linux arm64).The local JVM TLS harness explicitly allowed Docker Host headers behind its loopback proxy (
QUARKUS_HTTP_HOST_VALIDATION_REQUIRE_LOCALHOST=false); this is a harness setting, not a source/configuration change. A preliminary SQL run timed out downloading PostgreSQL 17; after warming the images, the complete final SDK run passed. Upstream's new checks currently require maintainer approval; the contributor account cannot approve them.Earlier review validation (
9ad82ec)Successful JVM/native workflow and downloadable JUnit evidence, source
9ad82ec71238a28345314182e4485b8a83295126:sha256:8ad9f2dcd7149735194ce773e5b8386b33bcfdf1a6bd56f9b051d4578b60dce4(Linux arm64).fe206716c9b340ec34e74590949dd35dedc9e1f7f4a46143f351ef7b7b673b38.Ruby joins the existing compatibility matrix and matching cache-warming matrix, including Gemfile/Gemfile.lock triggers. The dedicated cloud-contracts workflow runs full JVM regression, builds native, runs both SDK suites on an isolated Docker network and verifies unfinished uploads/operations and address allocation after restart. It records source, image and runtime identifiers. Other language/IaC suites were not rerun in this contribution's dedicated workflow.
The successful result is attempt 2. Attempt 1 was canceled after the unchanged upstream TlsProxyServerTest stopped producing output; the same commit passed on retry without changing implementation or test expectations.
Intentional limits
This models resource metadata, not guest execution, guest disk contents, traffic forwarding, health probes or certificates. Catalogs and Hyperdisk validation cover a basic synthetic subset. Cross-project Compute references, Shared VPC, IPv6, regional/multiwriter disks and advanced route rules are unsupported.
GCS pending-upload delimiter grouping is unsupported. Multipart publication and session removal use separate checkpoints, so completion is not crash-atomic. Signed URL cryptographic signatures are not validated; accepting a URL is not proof of signature enforcement. Credential Access Boundary checks cover the existing prefix/role subset, not full IAM.
Checklist