Skip to content

chore: retire next branch, main now drives staging deploys (CPL-272)#312

Open
GTC6244 wants to merge 1 commit intonextfrom
feature/cpl-272-update-yml-files-for-deployment
Open

chore: retire next branch, main now drives staging deploys (CPL-272)#312
GTC6244 wants to merge 1 commit intonextfrom
feature/cpl-272-update-yml-files-for-deployment

Conversation

@GTC6244
Copy link
Copy Markdown
Contributor

@GTC6244 GTC6244 commented Apr 23, 2026

Summary

Linear: CPL-272

Implements the branch-flow migration from CPL-272. The next branch is retired as a deploy trigger; main now drives staging deploys. Production stays tag-driven (v*deploy-prod-1-propose.yml).

Effect per user decision:

  • main push → chipotle-next (Phala) + lit-static-next (Cloudflare Pages)
  • chipotle-dev / lit-static-dev are retired — dev no longer gets deployed
  • v* tag → production (unchanged)

Deployment workflows

  • deploy-staging.yml: triggers only on main; deploys to chipotle-next; Stripe always uses sandbox keys
  • deploy-static.yml: triggers only on main; deploys to lit-static-next with test.chipotle.litprotocol.com; PR preview repointed from lit-static-devlit-static-next

CI/check workflows (next → main rename)

  • phala-simulator.yml, k6-client-check.yml, contract-bindings-check.yml: [main, next][main]
  • k6-smoke.yml, k6-correctness.yml: github.ref_name == 'next''main'
  • manual_contract-upgrade.yml: intentionally left unchanged (user reverted)

Supporting files

  • NodeConfig.main.toml: contents replaced with the former next config (chipotle-next contract 0x98e5...)
  • NodeConfig.next.toml: deleted
  • Dockerfile, Dockerfile.lit-api-server: default NODE_CONFIGNodeConfig.main.toml
  • justfile, justfile.sim: branch-conditional lookups collapsed to main-only

Test plan

  • CI green on PR
  • After merge: push to main triggers deploy-staging → chipotle-next (not chipotle-dev)
  • After merge: push to main triggers deploy-static → lit-static-next
  • v* tag still triggers deploy-prod-1-propose.yml (no regression)
  • manual_contract-upgrade workflow still runs (it was intentionally reverted — note: it references deleted NodeConfig.next.toml when next is selected; follow-up may be needed)

Known follow-ups (not in this PR)

  • manual_contract-upgrade.yml still offers a next branch choice but NodeConfig.next.toml is deleted — selecting next will fail until that workflow is reconciled
  • k6/data/accounts.next.json and k6/justfile still use next naming internally — not touched per scope

🤖 Generated with Claude Code

Removes the next branch from deploy triggers and retires the chipotle-dev
staging target. Main now deploys to chipotle-next / lit-static-next
(inheriting the old next-branch behavior). Production deploys remain
tag-driven via v* tags.

- deploy-staging.yml, deploy-static.yml: trigger only on main; drop
  chipotle-dev and lit-static-dev paths; always use Stripe sandbox keys
- phala-simulator, k6-client-check, contract-bindings-check,
  k6-smoke, k6-correctness, manual_contract-upgrade: branch/ref
  references switched from next to main
- NodeConfig: consolidate next.toml into main.toml (chipotle-next
  contract); delete NodeConfig.next.toml
- Dockerfile, Dockerfile.lit-api-server, justfile, justfile.sim:
  default NODE_CONFIG and branch-conditional lookups updated to main

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the repo’s deployment/CI branch flow so that main replaces the retired next branch as the staging deploy trigger, while keeping production deploys tag-driven (v*).

Changes:

  • Update GitHub Actions workflows to trigger staging/static deploys and several checks from main only.
  • Retire NodeConfig.next.toml by moving its contract address into NodeConfig.main.toml, and update Docker/just scripts to default to NodeConfig.main.toml.
  • Simplify local/CI scripts that previously branched on main vs next.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lit-api-server/NodeConfig.next.toml Removes the retired next node config.
lit-api-server/NodeConfig.main.toml Updates main config to use the former next contract address.
justfile.sim Always copies NodeConfig.main.toml into the gitignored NodeConfig.toml.
justfile Removes branch-conditional deploy vars; hard-codes staging target values.
Dockerfile.lit-api-server Defaults NODE_CONFIG build arg to NodeConfig.main.toml.
Dockerfile Defaults NODE_CONFIG build arg to NodeConfig.main.toml.
.github/workflows/phala-simulator.yml Runs on main only; always uses NodeConfig.main.toml.
.github/workflows/k6-smoke.yml Switches “next-vs-dev” selection logic to key off main.
.github/workflows/k6-correctness.yml Switches “next-vs-dev” selection logic to key off main.
.github/workflows/k6-client-check.yml Removes next from push trigger branches.
.github/workflows/deploy-static.yml Removes next push trigger; points deploys at lit-static-next.
.github/workflows/deploy-staging.yml Removes next push trigger; staging deploy target becomes chipotle-next; always uses Stripe sandbox keys.
.github/workflows/contract-bindings-check.yml Removes next from push trigger branches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

branches: [main]
paths:
- 'lit-static/**'
- '.github/workflows/deploy-static.yml'
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

deploy-preview is gated on github.event_name == 'pull_request', but this workflow is only triggered by push events. As a result, PR preview deployments will never run. Add a pull_request trigger (and optionally restrict paths) or remove the preview job/condition if previews are no longer intended.

Suggested change
- '.github/workflows/deploy-static.yml'
- '.github/workflows/deploy-static.yml'
pull_request:
paths:
- 'lit-static/**'
- '.github/workflows/deploy-static.yml'

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +5
contract_address = "0x98e501fab2d60a5119a185e1563f10cb54bc6068"

# contract_address = "0x6c4989c3c2aab271444b4b7b4ec3aca6da1bf1e5" # old contracts, TODO: about 10 USD still sitting in api-payer signers
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

With NodeConfig.next.toml removed/retired, there are still repo references to it (e.g. manual_contract-upgrade.yml offers a next option that maps to lit-api-server/NodeConfig.next.toml). This will cause that workflow to fail when next is selected unless the workflow is updated or an alias config file is kept.

Copilot uses AI. Check for mistakes.
Comment thread justfile
node_config := `git branch --show-current | xargs -I {} sh -c '[ "{}" = "main" ] && echo NodeConfig.main.toml || echo NodeConfig.next.toml'`
domain := `git branch --show-current | xargs -I {} sh -c '[ "{}" = "main" ] && echo api.dev.litprotocol.com || echo test.chipotle.litprotocol.com'`
# main → chipotle-next (override with PHALA_APP_NAME)
app_name := 'chipotle-next'
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

The comment says "override with PHALA_APP_NAME", but app_name is currently hard-coded and does not read PHALA_APP_NAME from the environment. Either wire app_name to env('PHALA_APP_NAME', ...) (or document the actual override mechanism, e.g. passing app_name=.../deploy name=... to just).

Suggested change
app_name := 'chipotle-next'
app_name := env('PHALA_APP_NAME', 'chipotle-next')

Copilot uses AI. Check for mistakes.
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