Skip to content

Keep extension data source state durable - #105

Merged
IlyaasK merged 1 commit into
mainfrom
hypeship/extension-durable-metadata
Jul 29, 2026
Merged

Keep extension data source state durable#105
IlyaasK merged 1 commit into
mainfrom
hypeship/extension-durable-metadata

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove runtime last_used_at from the kernel_extension data-source schema and state model
  • ignore SDK usage timestamps when flattening extension metadata
  • update focused schema/state tests and generated Terraform docs

Why this is v0 work

Terraform manages durable desired configuration. Extension usage timestamps change at runtime and would make data-source state depend on browser activity, so they must not enter the provider’s durable state boundary.

Tests

  • go test -short -timeout=2m ./...
  • go test -race -short -timeout=2m ./internal/datasources/extension
  • go vet ./...
  • go mod verify
  • go mod tidy -diff
  • terraform fmt -check -recursive examples
  • bash scripts/check-markdown-links.sh
  • bash scripts/check-docs.sh
  • git diff --check
  • gofmt -l cmd internal

Acceptance status

No live API operation is required for this schema correction. The stacked extension data-source acceptance PR verifies stable live metadata and a no-drift plan.

Intentionally unsupported

  • no runtime usage timestamps in Terraform state
  • no Terraform extension resource
  • no extension download or Chrome Store operations

Note

Medium Risk
Breaking schema change for anyone depending on last_used_at in configs or modules; behavior is intentional but requires consumer updates.

Overview
Removes last_used_at from the kernel_extension data source so Terraform state only holds durable extension metadata (id, name, project_id, created_at, size_bytes). Usage timestamps from the API are no longer mapped in flattenExtension or exposed in the schema.

Generated docs and tests are updated accordingly, including asserting last_used_at is absent from the schema and removing nullable last_used_at read coverage.

Reviewed by Cursor Bugbot for commit 1b19253. Bugbot is set up for automated code reviews on this repo. Configure here.

@IlyaasK
IlyaasK marked this pull request as ready for review July 27, 2026 21:58
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance-fixture branch from a06c10b to 08f1ba9 Compare July 28, 2026 13:23
@IlyaasK
IlyaasK force-pushed the hypeship/extension-durable-metadata branch from 0f9ca3b to f35b190 Compare July 28, 2026 13:23
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance-fixture branch from 08f1ba9 to a06c10b Compare July 28, 2026 13:28
@IlyaasK
IlyaasK force-pushed the hypeship/extension-durable-metadata branch from f35b190 to 0f9ca3b Compare July 28, 2026 13:28
@IlyaasK
IlyaasK requested a review from Sayan- July 28, 2026 13:44
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance-fixture branch from a06c10b to de11cd5 Compare July 29, 2026 19:36
@IlyaasK
IlyaasK force-pushed the hypeship/extension-durable-metadata branch from 0f9ca3b to 1b19253 Compare July 29, 2026 19:41
@IlyaasK
IlyaasK changed the base branch from hypeship/extension-acceptance-fixture to main July 29, 2026 19:41
@IlyaasK
IlyaasK merged commit f85c9b2 into main Jul 29, 2026
2 checks passed
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.

2 participants