Repository navigation
feat(mpg): support the Developer plan - #5484
Merged
Merged
Conversation
miguel-fly
marked this pull request as ready for review
November 18, 2026 03:04
tripledoublev
approved these changes
Nov 20, 2026
tripledoublev
left a comment
Contributor
There was a problem hiding this comment.
jfyi on ordering: fly-go release first, then the updated pin gets added here.
…nce-window-any-time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Problem
nulltoGET /v1/postgres/:id/maintenance_window, and 422 to a change.fly mpg maintenance-window showprintsnullas a window: no day, 00:00, 0 hours.--jsonprints an empty window.fly mpg createhides the dev-256 plan: the plan picker and the plan lists leave it out.fly launchonto an existing v2 cluster setsDATABASE_URLto just/<db>. It reads the cluster from the v1 API, which has no credentials for v2 clusters. Newer ui-ex answers that call with 409, and launch then fails instead.pgbouncerURL. On Developer both hostnames go straight to Postgres, and the plan hands out thedirectURL.Solution
showsays maintenance can run at any time.--jsonprintsnull.setis unchanged: it already shows the API's message.--planhelp ofcreateandfork, and the unknown plan error, list it asDev-256.--plantakes Developer as well as dev-256.fly launchonto an existing cluster sets the URLfly mpg attachsets, on the plan's database.fly mpg createandfly launchwith a new cluster give a Developer cluster's apps thedirectURL. Other plans keep the pooled one.fly mpg attachandfly launchonto an existing cluster use the API's newdatabase_urlwhen it's there, and the pooled URL when it isn't.Details
null. Before,nullcame back as an empty window.fly mpg statusandfly mpg listdon't show the window and don't change.--plantakes a plan's key or its name, in any case:dev-256andDeveloperboth work. The plan lists showDev-256.createandforksend a--planthey know as the plan's key:--plan Dev-256and--plan Developersenddev-256.forksends any other--planto the API as before.createstill picks Basic when--planis left out.Hiddenfield: only dev-256 used it.create's--planhelp now builds its list from the plan list, asfork's does.mpg-dev-256flag.TestRunMaintenanceWindowShowAnyTimeandTestRunMaintenanceWindowShowAnyTimeJSONare new. The 422 case ofTestMaintenanceWindowErrorsalready coversset.TestRunCreatePlanFlagtakes thedev-256andDEV-256cases ofTestRunCreateHiddenPlan, which is gone, and addsDeveloperanddeveloper. Its unknown plan case now expectsDev-256in the list.TestRunForkchecks thatDev-256,DeveloperandPERFORMANCEgo out asdev-256,dev-256andPerformance, and that an unknown plan goes out as typed.fly launchfinds the cluster asfly mpg attachdoes: Machines API first, the v1 API only for v1 clusters. A v1 cluster costs one more call. A v2 cluster with no credentials yet stops with attach's error instead of getting a broken secret.createandlaunchpick the endpoint by the plan the API returns for the cluster:directfordev-256,poolerfor the rest.database_urlto the cluster's credentials in a separate PR: thedirectURL on clusters without PgBouncers, the pooled one otherwise.pgbouncer_uridoesn't change, so older flyctl keeps working.create's error for a ready cluster with no endpoint now says "endpoint", not "pooler endpoint".TestAttachExistingManagedPostgrescovers a v2 cluster with and withoutdatabase_url, one without credentials yet, and a v1 cluster.TestRunCreate_CredentialsandTestConnectionURIcheck thedirectURL on Developer and the pooled one on Basic.TestRunAttach_databaseURLchecksdatabase_urland the fallback.Examples
nullyet.Example 1: show a cluster with no window
Before
After
Example 2: the same, with
--jsonBefore
{ "day": "", "start_hour": 0, "duration_hours": 0, "timezone": "" }After
nullExample 3: change the window of a cluster with no window
Before
(Trace ID: <id>)when the request has a valid trace ID.After
Example 4: show a cluster with a window
Before
After
Example 5:
--planhelpBefore
After
fly mpg fork --helpgainsDev-256the same way.Example 6: pick a plan
Before
After
Example 7: an unknown plan without a terminal
Before
After
Example 8: launch onto an existing cluster
abc123and databaseplan-check-db.Before
After
Example 9: create a Developer cluster
Before
After
--plan basicprints thepgbouncerURL before and after.Example 10: launch onto an existing cluster whose credentials have
database_urlBefore
After
database_url(ui-ex before its change), After is thepgbouncerURL, as Before.Notes
showhelp says what it prints for a cluster with no window. The CLI docs pick it up when they sync after the release.--planhelp the same way.Rollout
fly mpg maintenance-windowbefore this one (v0.5.11 and v0.5.12) show the empty window of Example 1 until they update, whatever the order.mpg-dev-256flag that picks it getsplan is not availableafter the region prompt, and no cluster is made.database_url, attach and launch keep the pooled URL.[Opus 5.5 on Miguel's behalf]