Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all VMSizeFlags in fly postgres create #4216

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

vboginskey
Copy link
Contributor

Supersedes #4158

Change Summary

Before this change, fly postgres create only supported a set of bespoke VM sizes via the --vm-size flag, making it impossible to create a postgres cluster with, say, 1 shared CPU and 1 GB of memory.

As of this change, we create the underlying machine using the entire MachineGuest set of options, which allows for additional customization.

The legacy prompt and error behavior given no --vm-size or an invalid --vm-size is preserved.

Tested

  • No VM options specified, selected preset configuration from prompt
  • No VM options specified, selected custom configuration from prompt
  • Specified --vm-size only
  • Specified --vm-size and --vm-memory
  • Specified --vm-memory only
  • Specified an invalid --vm-size

Documentation

  • Fresh Produce
  • In superfly/docs, or asked for help from docs team
  • n/a

Before this change, `fly postgres create` only supported a set of
bespoke VM sizes via the --vm-size flag, making it impossible to create
a postgres cluster with, say, 1 shared CPU and 1 GB of memory.

As of this change, we create the underlying machine using the entire
`MachineGuest` set of options, which allows for additional
customization.

The legacy prompt and error behavior given no --vm-size or an invalid
--vm-size is preserved.
@dangra dangra merged commit ef6c170 into superfly:master Feb 12, 2025
6 checks passed
@dangra
Copy link
Member

dangra commented Feb 12, 2025

Good job! thanks

I was going to provide strong feedback about how CreateCluster shouldn't access flags directly but accept everything through its params argument when I realized that is already happening. So your changes are good and at some point we will have to move that stuff out to the caller.

@vboginskey vboginskey deleted the val/add-postgres-sizing-options branch February 12, 2025 16:35
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