-
Notifications
You must be signed in to change notification settings - Fork 290
Jphenow/deployer mergeable #4654
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
Conversation
…y deploy with everything from the manifest
…k during the plan step
Note: no longer abort processing if bundle install fails
… work because jsFramework always defaults to 3000, so now we attempt to find a specified port
…ts up the app name stuff
Enables flag.App(), flag.Region(), flag.Org(), flag.AppConfig() in the generate command and adds logic to respect precedence: - If flags are explicitly specified → override manifest values - Otherwise → preserve manifest values (for deploy.rb use case) Uses flag.IsSpecified() to distinguish between explicitly set flags vs defaults. This allows deploy.rb to load manifests without app name override while still allowing users to explicitly override via command-line flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR splits off changes from #4609 to enable support for a deployer wrapper (flyctl-deployer), refactoring the codebase to work better as a library while maintaining backward compatibility. The changes focus on improving scanner detection logic, adding runtime information to configurations, and enhancing the launch command's manifest handling.
- Scanner improvements for multiple languages (Ruby, Python, Node, Go, Deno, Django, Rails, Phoenix, etc.) with better version detection and configuration
- Enhanced launch plan commands with manifest serialization/deserialization and new flags for better integration
- Added
memory_mbfield to test configurations to match expected API response format
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| test/preflight/fly_launch_test.go | Added memory_mb field to VM configuration in tests to match API expectations |
| scripts/delete_preflight_apps.sh | Added ` |
| scanner/templates/node/Dockerfile | Added --force flag to npm install for yarn installation |
| scanner/templates/go/Dockerfile | Added conditional go.sum copy based on skipGoSum template variable |
| scanner/templates/deno/Dockerfile | Switched base image to distroless/cc with Alpine, added environment variables for cgroups |
| scanner/scanner.go | Added SkipHealthcheck config option and OPT_OUT_GITHUB_ACTIONS environment variable support |
| scanner/ruby_test.go | New test file for Ruby version parsing from Gemfile |
| scanner/ruby.go | Refactored version extraction into separate extractGemfileRuby function, added performance optimizations |
| scanner/redwood.go | Added Node.js version detection by delegating to configureNode |
| scanner/rails_dockerfile_test.go | Added healthcheck channel draining to prevent file handle issues on Windows |
| scanner/rails.go | Improved database detection from config/database.yml, moved binrails to local scope, enhanced healthcheck goroutine with skip option |
| scanner/python.go | Moved extractPythonVersion from django.go, added Pipfile version detection, added runtime information |
| scanner/phoenix.go | Added asdf tool-versions support for launch UI, added runtime information |
| scanner/nuxtjs.go, scanner/nextjs.go, scanner/redwood.go | Added Node.js version detection through configureNode delegation |
| scanner/node.go | Added yarn installation condition for Node.js < 18, added runtime information |
| scanner/jsFramework.go | Added detectPortFromSource function to scan source files for port configuration |
| scanner/go.go | Added skipGoSum template variable to handle missing go.sum files gracefully |
| scanner/flask.go, elixir.go, lucky.go, laravel.go, deno.go | Added runtime information to source info |
| scanner/django.go | Fixed command selection logic, added bind address to runserver, moved Python version extraction |
| internal/prompt/prompt.go | Moved slug variable declaration earlier for better code organization |
| internal/flag/flag.go | Added MPGCluster() flag function for managed Postgres cluster selection |
| internal/command/mpg/mpg.go | Enhanced error handling for uiex client initialization, added ClusterFromFlagOrSelect function |
| internal/command/launch/state.go | Added Config field to LaunchManifest with JSON tags |
| internal/command/launch/plan_commands.go | Renamed manifest-path flag to from-manifest with backward-compatible alias, added flags to propose command |
| internal/command/launch/plan_builder.go | Added config to manifest, removed warning for existing fly.toml, enhanced app name handling |
| internal/command/launch/plan/plan.go | Fixed JSON tag from vm_cpukind to vm_cpu_kind, added NoInstallRequired to RuntimeStruct |
| internal/command/launch/launch_frameworks.go | Conditionally show GitHub Actions messages based on plan step |
| internal/command/launch/launch_databases.go | Added retry logging for network errors and status updates during Postgres provisioning |
| internal/command/launch/launch.go | Enhanced updateConfig with nil checks and plan-level compute override logic, added internal port override support |
| internal/command/launch/cmd.go | Added force-name and no-create-app flags, improved manifest loading and override logic |
| internal/command/extensions/core/core.go | Improved extension name prompt logic to respect -y flag |
| internal/command/deploy/deploy_build.go | Added fallback image handling when reference resolution fails |
| .gitignore | Added .fly directory and .claude/settings.local.json |
| .github/workflows/preflight.yml | Changed quote style from double to single quotes |
| .github/workflows/build.yml | Added pull_request trigger and conditional preflight execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… and we're trying to use asdf without definitely having it
The Deno.serve and Deno.listen regex patterns were missing closing parentheses, causing a panic during regexp compilation.
Split #4609 off to pluck out the actual changes.
Then build a separate deployer wrapper that is the actual guts we need to wrap the functionality.
Intention is that these changes work as well or better than what we have today but wind up helping service the wrapper mentioned above.
The changes were almost entirely plucked from the PR mentioned above. Extra changes were made so tests here and in the wrapper would actually pass (should be good things)