Skip to content

chore(ci): drop Fly.io Electric deploys (use Electric Cloud)#3590

Merged
saddlepaddle merged 1 commit into
mainfrom
saddlepaddle/fix-fly-electric-deploy
Apr 22, 2026
Merged

chore(ci): drop Fly.io Electric deploys (use Electric Cloud)#3590
saddlepaddle merged 1 commit into
mainfrom
saddlepaddle/fix-fly-electric-deploy

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Apr 20, 2026

Summary

  • The deploy-electric job in deploy-production.yml has been failing every run with Could not find App "superset-electric" because the Fly.io app no longer exists — we use Electric Cloud in prod and Docker locally.
  • Delete the production deploy-electric job, its preview counterpart, the preview cleanup step, and the root fly.toml. Point preview API at the same ELECTRIC_URL / ELECTRIC_SECRET secrets already used in prod, and drop the Electric row from the preview comment template.
  • The Cloudflare Worker (deploy-electric-proxy) is untouched — that's the path desktop uses.

Test plan

  • Next main push: deploy-electric job is gone and the overall deploy-production workflow succeeds.
  • Preview PR: deploy-preview runs without the deploy-electric job, API deploy gets Electric env from shared secrets, and the preview comment renders without the Electric row.
  • Closing a preview PR runs cleanup-preview without the Fly.io step.

Summary by CodeRabbit

  • Chores
    • Removed Electric (Fly.io) service deployment and related infrastructure from preview and production pipelines.
    • Deleted Fly.io deployment configuration.
    • Removed Electric status/link from PR preview comments and eliminated automated Electric cleanup steps.
    • Updated deployment workflows to read Electric credentials directly from repository secrets.

Summary by cubic

Dropped Fly.io Electric deploys from CI (prod and preview) to stop failing runs and use Electric Cloud instead. Preview API now uses shared ELECTRIC_URL and ELECTRIC_SECRET; the Cloudflare Electric proxy is unchanged.

  • Refactors
    • Removed production deploy-electric from deploy-production.yml.
    • Removed preview Fly job, env, artifacts, and needs; switched API to shared secrets.
    • Deleted fly.toml.
    • Removed Fly cleanup step and mention from cleanup-preview.yml.
    • Dropped the Electric row from the preview comment.

Written for commit c1f914f. Summary will update on new commits.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af97b3cb-31aa-4180-9bfa-a86968462712

📥 Commits

Reviewing files that changed from the base of the PR and between cc6e24f and c1f914f.

📒 Files selected for processing (5)
  • .github/templates/preview-comment.md
  • .github/workflows/cleanup-preview.yml
  • .github/workflows/deploy-preview.yml
  • .github/workflows/deploy-production.yml
  • fly.toml
💤 Files with no reviewable changes (4)
  • .github/templates/preview-comment.md
  • .github/workflows/cleanup-preview.yml
  • .github/workflows/deploy-production.yml
  • fly.toml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/deploy-preview.yml

📝 Walkthrough

Walkthrough

Removed Fly.io / Electric deployment and preview integrations: deleted fly.toml, removed deploy-electric jobs and Fly CLI/cleanup steps from workflows, updated preview/deploy workflows to use secrets directly, and removed the Electric row from the preview comment template. (47 words)

Changes

Cohort / File(s) Summary
Workflows — preview cleanup & deploy
\.github/workflows/cleanup-preview.yml, \.github/workflows/deploy-preview.yml
Removed Fly CLI install and Electric app destroy steps; deleted deploy-electric job; switched ELECTRIC_URL/ELECTRIC_SECRET usage to read directly from secrets.*; stopped exporting/sourcing Electric status/env artifacts; updated post-deploy comment vars.
Workflows — production
\.github/workflows/deploy-production.yml
Removed the deploy-electric job (Deploy Electric to Fly.io) and its steps, leaving Electric-proxy deployment intact.
Config & Templates
fly.toml, \.github/templates/preview-comment.md
Deleted fly.toml (Fly.io app config) and removed the Electric (Fly.io) row (favicon, status and link placeholders) from the preview comment template.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through YAML, nibbled a line,
Pulled out Fly wings and left the branch fine.
Secrets now sleep where the old app did play,
Quiet previews hum — carrot crumbs today. 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing Fly.io Electric deploys and switching to Electric Cloud.
Description check ✅ Passed The description provides clear context, rationale, and a detailed test plan, though it doesn't follow the template structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch saddlepaddle/fix-fly-electric-deploy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 20, 2026

Greptile Summary

This PR removes the Fly.io-based deploy-electric job from both the production and preview workflows, replacing it with the existing Electric Cloud shared secrets (ELECTRIC_URL / ELECTRIC_SECRET) that are already wired into the deploy-api step. The root fly.toml, the Electric row in the preview comment template, and the Fly.io teardown step in cleanup-preview.yml are all cleaned up accordingly. The Cloudflare Worker (deploy-electric-proxy) is intentionally left untouched.

Key changes:

  • deploy-production.yml: Deletes the deploy-electric Fly.io job; ELECTRIC_URL/ELECTRIC_SECRET were already present in deploy-api, so no functional change to production Electric connectivity.
  • deploy-preview.yml: Deletes the preview deploy-electric job and adds ELECTRIC_URL/ELECTRIC_SECRET (from shared secrets) to the deploy-api step, so preview API deployments now point at Electric Cloud rather than a PR-specific Fly.io instance.
  • cleanup-preview.yml: Removes the Fly.io app teardown step; only Neon branch deletion remains.
  • preview-comment.md: Removes the Electric row from the PR status table.
  • fly.toml: Root Fly.io config deleted as the app no longer exists.

Confidence Score: 5/5

Safe to merge — changes are purely subtractive and correctly wire Electric Cloud secrets into the remaining jobs.

All removals are well-scoped: the defunct Fly.io jobs, the associated fly.toml, the cleanup step, and the preview comment row are all consistently deleted. The ELECTRIC_URL/ELECTRIC_SECRET secrets were already present in the production deploy-api step and are now mirrored to the preview deploy-api step, which is the correct approach. The only action item is confirming those secrets exist in the preview GitHub environment — an operational step noted in the P2 comment — but it does not block merging this code change.

.github/workflows/deploy-preview.yml — verify ELECTRIC_URL/ELECTRIC_SECRET are provisioned in the preview GitHub environment before the next preview PR is opened.

Important Files Changed

Filename Overview
.github/workflows/deploy-production.yml Removes the deploy-electric Fly.io job; ELECTRIC_URL/ELECTRIC_SECRET were already present in the deploy-api step, so production Electric connectivity is unaffected.
.github/workflows/deploy-preview.yml Removes the deploy-electric Fly.io job and adds ELECTRIC_URL/ELECTRIC_SECRET from shared secrets to the preview deploy-api step; requires those secrets to be available in the preview GitHub environment.
.github/workflows/cleanup-preview.yml Removes the Fly.io Electric app teardown step; only Neon branch deletion remains, which is correct.
.github/templates/preview-comment.md Removes the Electric row from the preview status table; remaining rows and template variables are consistent with the updated workflow.
fly.toml Root fly.toml deleted — correct cleanup since the Fly.io Electric app no longer exists.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph prod["Deploy Production (after PR)"]
        PDB[deploy-database] --> PAPI[deploy-api<br/>uses ELECTRIC_URL / ELECTRIC_SECRET]
        PDB --> PWEB[deploy-web]
        PDB --> PMKT[deploy-marketing]
        PDB --> PADM[deploy-admin]
        PDB --> PDOCS[deploy-docs]
        PPRXY[deploy-electric-proxy<br/>Cloudflare Worker — unchanged]
    end

    subgraph preview["Deploy Preview (after PR)"]
        DB[deploy-database<br/>Neon branch] --> API[deploy-api<br/>uses shared ELECTRIC_URL / ELECTRIC_SECRET]
        DB --> WEB[deploy-web]
        DB --> MKT[deploy-marketing]
        DB --> ADM[deploy-admin]
        DB --> DOCS[deploy-docs]
        API & WEB & MKT & ADM & DOCS & DB --> CMT[post-final-comment]
    end

    subgraph removed["Removed"]
        OLD1["❌ deploy-electric<br/>Fly.io app deploy (prod)"]
        OLD2["❌ deploy-electric<br/>Fly.io app deploy (preview)"]
        OLD3["❌ Fly.io teardown<br/>(cleanup-preview)"]
    end

    style removed fill:#fee,stroke:#f88
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/workflows/deploy-preview.yml
Line: 162-163

Comment:
**Confirm `ELECTRIC_URL`/`ELECTRIC_SECRET` exist in `preview` environment**

The `deploy-api` job runs under `environment: preview` (line 83), so these two secrets must be defined in the **preview** GitHub environment — not just in `production`. If they were previously only set at the production environment level, preview API deploys will receive empty strings and Electric-dependent features will silently break in PR previews.

Worth double-checking that both `ELECTRIC_URL` and `ELECTRIC_SECRET` have been added to the `preview` environment in the repository's GitHub secrets settings before merging.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "chore(ci): drop Fly.io Electric deploys ..." | Re-trigger Greptile

Comment on lines +162 to +163
ELECTRIC_URL: ${{ secrets.ELECTRIC_URL }}
ELECTRIC_SECRET: ${{ secrets.ELECTRIC_SECRET }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Confirm ELECTRIC_URL/ELECTRIC_SECRET exist in preview environment

The deploy-api job runs under environment: preview (line 83), so these two secrets must be defined in the preview GitHub environment — not just in production. If they were previously only set at the production environment level, preview API deploys will receive empty strings and Electric-dependent features will silently break in PR previews.

Worth double-checking that both ELECTRIC_URL and ELECTRIC_SECRET have been added to the preview environment in the repository's GitHub secrets settings before merging.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/deploy-preview.yml
Line: 162-163

Comment:
**Confirm `ELECTRIC_URL`/`ELECTRIC_SECRET` exist in `preview` environment**

The `deploy-api` job runs under `environment: preview` (line 83), so these two secrets must be defined in the **preview** GitHub environment — not just in `production`. If they were previously only set at the production environment level, preview API deploys will receive empty strings and Electric-dependent features will silently break in PR previews.

Worth double-checking that both `ELECTRIC_URL` and `ELECTRIC_SECRET` have been added to the `preview` environment in the repository's GitHub secrets settings before merging.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/templates/preview-comment.md">

<violation number="1">
P2: This change re-adds the Electric (Fly.io) preview row, which contradicts the Fly.io removal migration and keeps stale Electric status/link placeholders in the comment template.</violation>
</file>

<file name=".github/workflows/cleanup-preview.yml">

<violation number="1">
P1: This change reintroduces Fly.io cleanup into preview CI, undoing the intended Fly.io removal and re-adding a secret/infrastructure dependency the migration is trying to eliminate.</violation>
</file>

<file name=".github/workflows/deploy-preview.yml">

<violation number="1">
P1: This change reintroduces the Fly.io `deploy-electric` preview job and makes downstream status reporting depend on it, adding back the CI dependency that was meant to be removed.</violation>

<violation number="2">
P1: `deploy-api` now uses a hard-coded Fly.io Electric URL instead of repository secret configuration, which couples previews to Fly host naming and breaks secret-driven Electric endpoint management.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/cleanup-preview.yml (1)

25-38: ⚠️ Potential issue | 🔴 Critical

Resolve leftover merge-conflict markers (workflow is currently invalid YAML).

Line 25 still contains Git conflict markers, which breaks parsing and blocks the workflow from running. It also reintroduces Fly.io cleanup steps this PR intends to remove.

Suggested fix
-<<<<<<< HEAD
-      - name: Setup Fly CLI
-        uses: superfly/flyctl-actions/setup-flyctl@ed8efb33836e8b2096c7fd3ba1c8afe303ebbff1 # 1.6
-
-      - name: Delete Electric Fly.io app
-        id: electric-cleanup
-        continue-on-error: true
-        env:
-          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
-        run: |
-          flyctl apps destroy "superset-electric-pr-${{ github.event.pull_request.number }}" --yes
-
-=======
->>>>>>> 96ea05cfe (chore(ci): drop Fly.io Electric deploys (use Electric Cloud))
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/cleanup-preview.yml around lines 25 - 38, Remove the Git
merge-conflict markers (<<<<<<< HEAD, =======, >>>>>>>) and delete the entire
conflicted Fly.io cleanup block that includes the steps named "Setup Fly CLI"
and "Delete Electric Fly.io app" so the workflow YAML is valid and no longer
reintroduces Fly.io cleanup steps; ensure the remaining workflow is
syntactically correct YAML after removing those lines.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.github/workflows/cleanup-preview.yml:
- Around line 25-38: Remove the Git merge-conflict markers (<<<<<<< HEAD,
=======, >>>>>>>) and delete the entire conflicted Fly.io cleanup block that
includes the steps named "Setup Fly CLI" and "Delete Electric Fly.io app" so the
workflow YAML is valid and no longer reintroduces Fly.io cleanup steps; ensure
the remaining workflow is syntactically correct YAML after removing those lines.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9bf581e1-0c34-43b1-b0ea-55c7bc1a880d

📥 Commits

Reviewing files that changed from the base of the PR and between 96ea05c and cc6e24f.

📒 Files selected for processing (5)
  • .github/templates/preview-comment.md
  • .github/workflows/cleanup-preview.yml
  • .github/workflows/deploy-preview.yml
  • .github/workflows/deploy-production.yml
  • fly.toml
💤 Files with no reviewable changes (3)
  • .github/templates/preview-comment.md
  • .github/workflows/deploy-production.yml
  • fly.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/deploy-preview.yml

Production Electric runs on Electric Cloud and local dev runs on Docker —
the Fly.io `superset-electric` app no longer exists, so every deploy-electric
run was failing on `flyctl secrets set --app superset-electric`. Remove the
job, the preview Fly.io counterpart, and the root fly.toml. Point preview API
at the shared ELECTRIC_URL/ELECTRIC_SECRET secrets.
@saddlepaddle saddlepaddle merged commit 6a2c4dd into main Apr 22, 2026
13 checks passed
@Kitenite Kitenite deleted the saddlepaddle/fix-fly-electric-deploy branch May 6, 2026 04:52
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.

1 participant