fleet icon indicating copy to clipboard operation
fleet copied to clipboard

FDM updates: `fdm serve`, snapshot/restore improvements

Open sgress454 opened this issue 10 months ago • 1 comments

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 than localhost. 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-invoked fdm serve command
  • --reset: reset the options for fdm serve. The next time fdm serve is invoked, it will use the default options.
  • --help: show all of the Fleet server options

fdm snapshot improvements

  • Added fdm snap alias
  • 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 / --prepare option to run db migrations after restoring snapshot.
  • Improved UI (more options displayed, and clearer indicator for selected option)
  • Now defaults to last snapshot restored

sgress454 avatar Apr 04 '25 17:04 sgress454

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.

codecov[bot] avatar Apr 04 '25 17:04 codecov[bot]