Skip to content

mpg: show v1 to v2 migration notices - #5133

Open
kylemclaren wants to merge 4 commits into
masterfrom
mpg-v2-migration-notice
Open

mpg: show v1 to v2 migration notices#5133
kylemclaren wants to merge 4 commits into
masterfrom
mpg-v2-migration-notice

Conversation

@kylemclaren

@kylemclaren kylemclaren commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

This change adds migration messages to the fly mpg commands. The messages tell users about the migration from MPG v1 to MPG v2.

  • A command that operates on one cluster shows a message if that cluster is MPG v1. The message contains a link to the migration page for that cluster in the Fly.io dashboard.
  • The command fly mpg list shows a general message if the organization has MPG v1 clusters.
  • The commands do not show a message for MPG v2 clusters.
  • The messages go to stderr. The JSON output on stdout does not change.

Changes

  • internal/command/mpg/mpg.go: This file gets the message text and two print functions. The function ClusterFromArgOrSelect prints the cluster message when it finds an MPG v1 cluster.
  • internal/command/mpg/list.go: The list command prints the general message when the list contains an MPG v1 cluster. It does not print the message for deleted clusters.
  • iostreams/iostreams.go: The new function CreateLinkURL makes a URL clickable in terminals that support hyperlinks. Other terminals show the plain URL one time.
  • internal/command/mpg/notice_test.go: New tests examine the two print functions.

Test

  1. Run go test ./internal/command/mpg/ ./iostreams/. All tests pass.
  2. Run fly mpg status <v1-cluster-id>. The command shows the cluster message and the link.
  3. Run fly mpg status <v2-cluster-id>. The command shows no migration message.
  4. Run fly mpg list. The command shows the general message if v1 clusters are in the list.

🤖 Generated with Claude Code

kylemclaren and others added 3 commits August 26, 2026 14:20
Cluster-scoped commands print a direct dashboard migration link when the
resolved cluster is MPG v1. fly mpg list prints a general notice when
the organization has v1 clusters. Messages go to stderr so JSON output
stays clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mL1h244soaT82gD6ak7y8
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mL1h244soaT82gD6ak7y8
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mL1h244soaT82gD6ak7y8
@kylemclaren
kylemclaren requested a review from gargakshit August 26, 2026 12:27
Uses eligible_for_v2_migration from the v1 get-cluster endpoint
(superfly/ui-ex#5317). nil (older server or list endpoint) keeps the
link visible; an explicit false hides it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mL1h244soaT82gD6ak7y8
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