Expose browser pool profile refresh state - #112
Open
IlyaasK wants to merge 19 commits into
Open
Conversation
IlyaasK
force-pushed
the
hypeship/browser-pool-refresh-on-profile-update-resource
branch
from
August 3, 2026 14:31
a342a28 to
20143f3
Compare
IlyaasK
force-pushed
the
hypeship/browser-pool-refresh-on-profile-update-data-source
branch
from
August 3, 2026 14:36
bed2926 to
6e85ce8
Compare
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.
Lock selector, project scope, and computed attribute semantics after targeted mutation testing exposed missing schema assertions.
Keep schema mutation assertions concise so later browser-pool data source slices can verify their computed-only fields without duplicating type-specific checks.
Read canonical profile and ordered extension IDs from the SDK response, with strict validation and ID-only fallback for legacy echoes. Keep runtime fields outside Terraform state.
Assert profile and extension references remain computed-only after semantic mutation testing showed schema-mode changes were not detected.
Read proxy and launch-mode fields into durable data-source state. Reject explicit null or malformed SDK values and preserve known false booleans through Terraform serialization.
Read start URL, timeout, and fill rate into durable data-source state. Validate SDK response types and ranges while preserving omitted values and known zero.
Read viewport configuration into a typed Terraform object. Reject malformed dimensions and preserve omitted viewport and refresh-rate values without partial state.
Normalize SDK Chrome-policy JSON into stable Terraform string state. Keep loose maps at the response boundary and preserve absent or null policy compatibility.
Add opt-in acceptance coverage for ID and exact-name lookup, durable state flattening, no-drift planning, project overrides, and cleanup. Run it only from the manual acceptance matrix.
Expose Kernel's durable refresh_on_profile_update setting through the browser pool resource. Preserve API defaults when omitted, retain explicit false values across profile changes, validate the profile dependency, and cover create/update/read behavior.
IlyaasK
force-pushed
the
hypeship/browser-pool-refresh-on-profile-update-resource
branch
from
August 3, 2026 14:53
20143f3 to
e43bf84
Compare
Return refresh_on_profile_update from kernel_browser_pool lookups so imported and externally managed pools expose the same durable policy as the resource. Validate API response types and cover ID/name acceptance state.
Assert the data source exposes refresh_on_profile_update as a computed-only bool so schema drift is caught by unit tests.
IlyaasK
force-pushed
the
hypeship/browser-pool-refresh-on-profile-update-data-source
branch
from
August 3, 2026 14:54
6e85ce8 to
b3a94b8
Compare
…e' into hypeship/browser-pool-refresh-on-profile-update-data-source
IlyaasK
force-pushed
the
hypeship/browser-pool-refresh-on-profile-update-resource
branch
from
August 3, 2026 18:25
09b0ad5 to
f4021b9
Compare
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.
Summary
refresh_on_profile_updateas computed durable state on thekernel_browser_pooldata sourcefalse, return null when omitted, and diagnose malformed API valuesWhy
Browser pools created outside Terraform should expose the same durable profile-refresh policy that the managed resource supports. This keeps read-only lookup behavior consistent with the Kernel API, SDK, and CLI.
Intentionally unsupported
This does not add runtime pool counters, leases, acquire/release/flush operations, force deletion, or any profile mutation behavior.
Verification
gofmt -l cmd internalgo test -short -timeout=2m ./...go vet ./...terraform fmt -check -recursive examplesbash scripts/check-docs.shbash scripts/check-markdown-links.shThe guarded live acceptance matrix passed: https://github.com/kernel/terraform-provider-kernel/actions/runs/30825001264. All seven jobs passed, including browser-pool create/read/update/import/delete and browser-pool data-source lookup by ID and name.
Additional quality verification
Note
Low Risk
Read-only computed field on a data source; no create/update/delete or auth changes.
Overview
Adds
refresh_on_profile_updateas a computed read-only attribute on thekernel_browser_pooldata source so lookups return the same durable profile-refresh policy as the managed resource.API values are mapped with the existing
flattenOptionalBoolrules: knowntrue/falsewhen present, null when omitted, and diagnostics for null or non-boolean payloads. Generated docs and unit/acceptance tests cover schema, flatten behavior, and ID/name lookups.Reviewed by Cursor Bugbot for commit 01d3eaa. Bugbot is set up for automated code reviews on this repo. Configure here.