fix: run product capture provider in runtime image#26
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the product-capture browser runtime image so it executes the Go product-capture provider binary (reading workflow-compute JSON envelopes from stdin) instead of defaulting to Node, and adds regression checks to prevent reintroducing the missing-entrypoint failure.
Changes:
- Copy the
product-capture-providerbinary into the runtime image and set it as the imageENTRYPOINT. - Update the release workflow to build the provider binary before building/pushing the runtime image.
- Add Go tests that assert the Dockerfile and release workflow include the expected entrypoint and build steps.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
release_workflow_test.go |
Adds regression tests for runtime image entrypoint and release workflow build step. |
docker/product-capture-browser/Dockerfile |
Copies provider binary into the image and sets it as ENTRYPOINT. |
.gitignore |
Ignores the generated provider binary in the docker directory. |
.github/workflows/release.yml |
Builds the provider binary prior to the Docker build/push step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Failure evidence
workflow-compute Staging Product Capture Proof run 27071404495 loaded and launched the promoted OCI runtime, but the image had no provider entrypoint. Node interpreted the JSON envelope on stdin as JavaScript and failed with
SyntaxError: Unexpected token :.\n\n## Verification\n-GOWORK=off go test ./... -run 'TestRuntimeImageRunsProductCaptureProviderEntrypoint|TestReleaseWorkflowBuildsRuntimeProviderBinaryBeforeImage'\n-GOWORK=off go test ./...\n-GOWORK=off go build -o /tmp/product-capture-provider-test ./cmd/product-capture-provider && /tmp/product-capture-provider-test --probe >/tmp/product-capture-provider-probe.json && jq -e '.provider == "workflow-plugin-product-capture" and .executor_provider == "product-capture-browser"' /tmp/product-capture-provider-probe.json\n-actionlint .github/workflows/release.yml .github/workflows/ci.yml .github/workflows/tag-immutability.yml && git diff --check\n\nNot run: full Docker build of the Chrome/Playwright image locally.