Skip to content

Test extension data source against Kernel - #88

Merged
IlyaasK merged 3 commits into
mainfrom
hypeship/extension-data-source-acceptance
Jul 29, 2026
Merged

Test extension data source against Kernel#88
IlyaasK merged 3 commits into
mainfrom
hypeship/extension-data-source-acceptance

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • upload a uniquely named Chrome extension fixture through the durable Kernel SDK
  • test kernel_extension lookup by canonical ID and exact name
  • test explicit resource scope and provider-default project scope
  • verify durable creation metadata and require an empty follow-up plan
  • recover uncertain uploads by unique name so cleanup can still be registered
  • add the extension data-source package to the manual acceptance workflow

Why this is v0 work

This closes the live coverage gap for the existing v0 kernel_extension data source. The fixture is created and deleted through durable SDK operations, with no dependency on the parked Terraform extension resource.

Tests

  • go test -short -timeout=2m ./...
  • go test -race -short -timeout=2m ./internal/datasources/extension ./internal/acctest ./internal/kernelclient
  • focused archive and uncertain-upload recovery unit tests
  • opt-out test proving acceptance skips before network access
  • 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

The live API path was not run locally because KERNEL_API_KEY and KERNEL_PROJECT_ID are unset. It is available through the manual Acceptance workflow and requires TF_ACC=1, KERNEL_ACC=1, KERNEL_API_KEY, and KERNEL_PROJECT_ID.

Intentionally unsupported

  • no Terraform extension resource
  • no extension import or content replacement
  • no extension download or Chrome Store operations
  • no runtime usage metadata in Terraform state
  • no browser/session runtime operations

Note

Low Risk
Test-only changes against live API in opt-in acceptance runs; no provider runtime or auth logic changes.

Overview
Adds live acceptance tests for the existing kernel_extension data source and registers that package in the manual Acceptance workflow matrix (project ID required).

Tests upload a minimal Chrome extension ZIP via the Kernel SDK, then assert data.kernel_extension lookups by canonical ID (with explicit project_id) and by name (provider-default project scope), including created_at, size_bytes, and absence of last_used_at. A plan-only step checks for an empty follow-up plan.

Fixture setup includes recovery by unique name when upload responses are ambiguous, plus cleanup registration and post-test verification that extensions are deleted. Unit tests cover the ZIP fixture shape and recovery behavior (found, not found, server error, empty response).

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

@IlyaasK
IlyaasK marked this pull request as ready for review July 11, 2026 17:32
@IlyaasK
IlyaasK requested review from Sayan- and tnsardesai and removed request for Sayan- and tnsardesai July 11, 2026 17:32
@IlyaasK
IlyaasK force-pushed the hypeship/project-data-source-acceptance branch from c3088b7 to 6aa8f7e Compare July 13, 2026 13:35
@IlyaasK
IlyaasK force-pushed the hypeship/extension-data-source-acceptance branch 2 times, most recently from 96fc45a to 7002e83 Compare July 13, 2026 14:32
@IlyaasK
IlyaasK force-pushed the hypeship/project-data-source-acceptance branch from 28fbd5b to 8c8ae34 Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/extension-data-source-acceptance branch from 7002e83 to 59c5c08 Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/project-data-source-acceptance branch from 8c8ae34 to 73c12a6 Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/extension-data-source-acceptance branch from 59c5c08 to 25067e6 Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/project-data-source-acceptance branch from 73c12a6 to 8b311fa Compare July 21, 2026 14:46
@IlyaasK
IlyaasK force-pushed the hypeship/extension-data-source-acceptance branch from 25067e6 to 62b16f4 Compare July 21, 2026 14:46
@IlyaasK
IlyaasK force-pushed the hypeship/project-data-source-acceptance branch from 8b311fa to f771e32 Compare July 21, 2026 18:10
@IlyaasK
IlyaasK force-pushed the hypeship/extension-data-source-acceptance branch 3 times, most recently from e779a03 to ebe2c13 Compare July 21, 2026 20:15
@IlyaasK
IlyaasK force-pushed the hypeship/project-data-source-acceptance branch 2 times, most recently from fd04fe6 to f8d064d Compare July 27, 2026 19:00
@IlyaasK
IlyaasK force-pushed the hypeship/extension-data-source-acceptance branch from ebe2c13 to fc608d1 Compare July 27, 2026 22:05
@IlyaasK
IlyaasK changed the base branch from hypeship/project-data-source-acceptance to hypeship/extension-durable-metadata July 27, 2026 22:06
@IlyaasK
IlyaasK force-pushed the hypeship/extension-durable-metadata branch 2 times, most recently from f35b190 to 0f9ca3b Compare July 28, 2026 13:28
@IlyaasK
IlyaasK requested a review from Sayan- July 28, 2026 13:57

@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 d360e8d. Configure here.

Comment thread internal/datasources/extension/datasource_acc_test.go
@IlyaasK
IlyaasK force-pushed the hypeship/extension-durable-metadata branch from 0f9ca3b to 1b19253 Compare July 29, 2026 19:41
@IlyaasK
IlyaasK force-pushed the hypeship/extension-data-source-acceptance branch from d360e8d to aa323b3 Compare July 29, 2026 19:45
@IlyaasK
IlyaasK changed the base branch from hypeship/extension-durable-metadata to main July 29, 2026 19:45
@IlyaasK
IlyaasK merged commit fc6b246 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