Skip to content

Conversation

@LuD1161
Copy link
Contributor

@LuD1161 LuD1161 commented Feb 3, 2026

Summary

  • Add migration for workflow_traces.error field from TEXT to JSONB for better error data structure and querying
  • Add SECRET_STORE_MASTER_KEY environment variable to docker-compose for secret encryption support

Why these changes?

  1. workflow_traces.error migration: The error field needs to store structured JSON data (stack traces, error metadata) rather than plain text. JSONB enables better querying and indexing of error information.

  2. SECRET_STORE_MASTER_KEY: Required for encrypting sensitive data (API keys, credentials) stored in the secret store. Without this key, the secret encryption/decryption functionality won't work in Docker deployments.

Test plan

  • Verify migration runs successfully on existing database
  • Verify docker compose starts with new SECRET_STORE_MASTER_KEY config
  • Test secret store encryption/decryption works with the key

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51978067a1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Add migration for workflow_traces.error TEXT to JSONB
- Add SECRET_STORE_MASTER_KEY to compose config

Signed-off-by: Aseem Shrey <LuD1161@users.noreply.github.com>
@LuD1161 LuD1161 force-pushed the chore/squash-db-docker-commits branch from 5197806 to 8715b15 Compare February 3, 2026 00:48
@LuD1161
Copy link
Contributor Author

LuD1161 commented Feb 3, 2026

Thanks for catching this! Fixed in the latest push.

The migration now uses a helper function try_parse_jsonb() that:

  1. Tries to parse the text as JSON - preserves structured error objects that were serialized as JSON text
  2. Falls back to to_jsonb() - wraps plain text strings as JSON strings if parsing fails

This ensures historical traces with structured errors (type, stack, details, fieldErrors) are preserved correctly.

@LuD1161 LuD1161 merged commit bc0228e into main Feb 3, 2026
3 checks passed
@LuD1161 LuD1161 deleted the chore/squash-db-docker-commits branch February 3, 2026 00:58
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