FDM updates: `fdm serve`, snapshot/restore improvements
For #27889
This PR introduces several improvements to the Makefile/fdm tool for development:
fdm serve (alias fdm up)
Starts a local Fleet server (building the binary first). The first time this is called, it will start the server on localhost:8080 with the --dev and --dev_license flags, but the command accepts all of the options that you can pass to fleet serve. If you pass options to fdm serve, then subsequent invocations without options will replay your last command. Additionally, fdm serve supports the following:
-
--use-ip: start the local server on your system's local IP address rather thanlocalhost. This makes it easier to point VMs on your system to the fleet server to act as hosts. -
--no-build: don't rebuild the fleet binary before starting the server. -
--no-save: don't save the current command for future invocations (useful for scripting) -
--show: show options for the last-invokedfdm servecommand -
--reset: reset the options forfdm serve. The next timefdm serveis invoked, it will use the default options. -
--help: show all of the Fleet server options
fdm snapshot improvements
- Added
fdm snapalias - Tracks the name of the last snapshot saved, to use as the default for
fdm restore - Suppresses the "don't use password in CLI" warning when saving the snapshot
fdm restore improvements
- Added
--prep/--prepareoption to run db migrations after restoring snapshot. - Improved UI (more options displayed, and clearer indicator for selected option)
- Now defaults to last snapshot restored
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 63.89%. Comparing base (
193af72) to head (4ad5f2e). Report is 190 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #27890 +/- ##
==========================================
+ Coverage 63.78% 63.89% +0.10%
==========================================
Files 1744 1757 +13
Lines 165612 168256 +2644
Branches 4515 4515
==========================================
+ Hits 105630 107500 +1870
- Misses 51750 52347 +597
- Partials 8232 8409 +177
| Flag | Coverage Δ | |
|---|---|---|
| backend | 64.69% <ø> (+0.10%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.