Skip to content

Add target env selection to prod build workflow#228

Open
dobrac wants to merge 4 commits intomainfrom
dobrac/prod-build-target
Open

Add target env selection to prod build workflow#228
dobrac wants to merge 4 commits intomainfrom
dobrac/prod-build-target

Conversation

@dobrac
Copy link
Contributor

@dobrac dobrac commented Mar 22, 2026

This updates the manual prod build workflow to let operators choose foxtrot, staging, or juliett at dispatch time. The workflow resolves the matching E2B domain and API key secret, writes them to GITHUB_ENV, and fails fast on missing or unknown targets. Foxtrot remains the default and the automatic main release workflow stays unchanged. Staging and juliett require the new repository secrets E2B_STAGING_API_KEY and E2B_JULIETT_API_KEY.


Note

Medium Risk
Updates a manually-triggered production build workflow to dynamically select domains and API keys based on operator input, which can affect where templates are built/published. Risk is mainly from misconfiguration of new secrets/inputs causing failed builds or targeting the wrong environment.

Overview
Adds a target_environment choice input to the manual Build Prod Template workflow and includes it in the concurrency group to avoid cross-environment lock contention.

The workflow now resolves E2B_DOMAIN and E2B_API_KEY at runtime based on the selected target (foxtrot/staging/juliett), masks the key, writes both to GITHUB_ENV, and fails fast for unknown targets or missing configuration before running build_prod.py.

Written by Cursor Bugbot for commit 33d3314. This will update automatically on new commits. Configure here.

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: 055fa33295

ℹ️ 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".


case "$TARGET_ENVIRONMENT" in
foxtrot)
E2B_DOMAIN="e2b.dev"

Choose a reason for hiding this comment

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

P2 Badge Keep foxtrot domain configurable via repository variable

This hardcodes the foxtrot target to e2b.dev, which changes behavior from the previous workflow that read vars.E2B_DOMAIN and can now diverge from the main release pipeline (which still uses vars.E2B_DOMAIN in .github/workflows/release.yml line 268). In repositories where E2B_DOMAIN is intentionally overridden (for example, a non-default/proxied production endpoint), manual foxtrot builds will publish against the wrong domain.

Useful? React with 👍 / 👎.

Copy link

@cursor cursor bot left a comment

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 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.

Copy link
Contributor

@matthewlouisbrockman matthewlouisbrockman left a comment

Choose a reason for hiding this comment

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

nice way to make it easier to build the template for different envs. added the missing fast fail on the domain from the comment.

  • this does drop the concurrent build lock on releases but can just rebuild as well. (so if pushing a bunch of changes to code intepreter while also trying to manually rebuild, but the point of the manual rebuild is like... we updated envd but not code interpreter)

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