Skip to content

fix(lambda-go): tidy error handling and typing in the Go Lambda SDK - #8986

Merged
JonnyBurger merged 2 commits into
remotion-dev:mainfrom
iliya-vidrush:lambda-go-cleanup
Jul 11, 2026
Merged

fix(lambda-go): tidy error handling and typing in the Go Lambda SDK#8986
JonnyBurger merged 2 commits into
remotion-dev:mainfrom
iliya-vidrush:lambda-go-cleanup

Conversation

@iliya-vidrush

Copy link
Copy Markdown
Contributor

Small correctness and ergonomics fixes in the @remotion/lambda Go SDK, with no change to the wire format sent to the Lambda function.

Changes

  • constructRenderInternals now returns the serialization error instead of calling log.Fatal, so importing the SDK can no longer kill the caller's process on a bad input.
  • Invocation, marshalling and response-parsing errors are wrapped with %w and include the function name for context.
  • The internal Crf, ColorSpace and GopSize fields are typed as pointers instead of interface{}, so an unset value serializes to null without relying on a typed zero value.
  • Fixed the example program, which printed RenderId under the bucketName label, and removed a duplicate print.
  • Removed a stray semicolon and added the missing trailing newline in version.go.

Testing

  • go build ./..., go vet ./..., go test ./... and gofmt -l all pass in packages/lambda-go and packages/lambda-go-example.

- Return the serialization error from constructRenderInternals instead of
  calling log.Fatal, so callers stay in control of process exit.
- Wrap invocation, marshalling and response-parsing errors with %w and
  include the function name for context.
- Type the internal Crf, ColorSpace and GopSize fields as pointers instead
  of interface{} so an unset value serializes to null without a typed
  zero-value.
- Fix the example progress output that printed RenderId under the
  "bucketName" label and dropped the redundant print.
- Remove the stray semicolon and add the missing trailing newline in
  version.go.
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Jul 10, 2026 11:30am
remotion Ready Ready Preview, Comment Jul 10, 2026 11:30am

Request Review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — cleaned up error handling and internal typing in the Go Lambda SDK without changing the serialized wire format.

  • constructRenderInternals now returns serialization errors instead of calling log.Fatal.
  • Invocation, marshalling, and response-parsing errors in invocations.go are wrapped with %w and annotated with the function name.
  • Internal Crf, ColorSpace, and GopSize fields in renderInternalOptions are typed as pointers, so unset values serialize to null without relying on a typed zero value.
  • Fixed the example program's bucket-name label and removed the duplicate RenderId print.
  • Cleaned up the stray semicolon and missing newline in version.go.

Pullfrog  | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@JonnyBurger
JonnyBurger merged commit 15be9ff into remotion-dev:main Jul 11, 2026
17 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