Skip to content

Add browser pool core data source - #74

Open
IlyaasK wants to merge 1 commit into
mainfrom
hypeship/browser-pool-data-source-core
Open

Add browser pool core data source#74
IlyaasK wants to merge 1 commit into
mainfrom
hypeship/browser-pool-data-source-core

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • register the read-only kernel_browser_pool data source
  • support exact lookup by canonical ID or exact name
  • preserve project scoping: data-source override, provider project_id, then API-key binding
  • expose only the first durable fields: id, name, project_id, and size
  • add generated Registry documentation and focused unit coverage

Why

Existing browser pools can already be imported into the resource when Terraform should manage them. This data source covers the separate read-only case: reference an existing pool without taking ownership of its lifecycle.

The implementation performs one durable SDK GET and verifies that the returned ID or name matches the exact selector. API fields are validated before entering Terraform state.

Intentionally unsupported

  • browser/session runtime operations or runtime state
  • browser-pool writes through the data source
  • resolved profile and extension references
  • remaining durable launch, warmup, viewport, and Chrome policy fields
  • live acceptance coverage in this first stack slice

Those durable read fields and acceptance coverage land in the following small PRs. No existing resource or data-source behavior changes.

Tests run

  • go test -short -timeout=2m ./...
  • go vet ./...
  • gofmt -l cmd internal
  • bash scripts/check-docs.sh
  • git diff --check origin/main...HEAD

Focused tests cover schema and registration, Framework state writes, ID/name lookup, explicit/default/unscoped project selection, unnamed pools, API errors, nil or malformed responses, and selector mismatches.

Acceptance status

Not run in this PR. Live ID/name lookup and project scoping are added to the opt-in acceptance suite at the end of this stack.

@IlyaasK
IlyaasK requested review from Sayan- and tnsardesai and removed request for Sayan- and tnsardesai July 11, 2026 10:16
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-resolved-refs branch from c579964 to 546feff Compare July 13, 2026 13:35
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-core branch from ad9b86d to 2a4d9ad Compare July 13, 2026 13:35
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-resolved-refs branch from 546feff to c8beaf5 Compare July 13, 2026 14:32
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-core branch 2 times, most recently from 825994b to e0f20fd Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-core branch from e0f20fd to 63f8898 Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-resolved-refs branch from 8a17e4c to 8791796 Compare July 20, 2026 19:38

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 63f8898. Configure here.

Comment thread internal/datasources/browserpool/datasource.go
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-core branch 2 times, most recently from feef7a2 to d1f6e31 Compare July 21, 2026 18:10
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-resolved-refs branch from 21051bf to c1cb593 Compare July 21, 2026 18:10
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-core branch from d1f6e31 to f5464c6 Compare July 21, 2026 19:51
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-resolved-refs branch from 0418ff5 to e569d69 Compare July 21, 2026 20:15
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-core branch from f5464c6 to 2da6ca9 Compare July 21, 2026 20:15
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-resolved-refs branch 2 times, most recently from 3fa1515 to c7c576d Compare July 27, 2026 18:17
Expose exact browser pool lookup by ID or name with predictable project scoping. Keep the first slice limited to canonical identity, name, and durable size so runtime state cannot enter Terraform.
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-core branch from 2da6ca9 to e1a5354 Compare July 31, 2026 19:17
@IlyaasK
IlyaasK changed the base branch from hypeship/browser-pool-resolved-refs to main July 31, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant