Updating Flutter Build Agents | FlightStack
Updating Agents
Section titled “Updating Agents”FlightStack agents include built-in update capabilities to ensure you’re always running the latest version with bug fixes and new features.
Update Methods
Section titled “Update Methods”There are two ways to keep your agent updated:
| Method | Description | When It Runs |
|---|---|---|
| Auto-Update | Automatically checks and installs updates | Between build jobs |
| Manual Upgrade | On-demand update via command | When you run the command |
Auto-Update (Default)
Section titled “Auto-Update (Default)”By default, agents automatically check for and install updates between build jobs. This ensures your agent stays current without interrupting active builds.
How Auto-Update Works
Section titled “How Auto-Update Works”- Check interval - Agent checks for updates once per hour
- Version comparison - Compares current version with latest release
- Download - If newer version available, downloads the update
- Install - Replaces the binary with the new version
- Restart - Agent exits with code 100 to signal restart needed
Disabling Auto-Update
Section titled “Disabling Auto-Update”You can disable auto-updates if you prefer to manage updates manually:
For a single session:
flightstack-agent start --no-auto-updatePermanently via config:
# Edit ~/.flightstack/config.json{ "autoUpdate": false, ...}Manual Upgrade
Section titled “Manual Upgrade”Use the upgrade command to update the agent immediately:
flightstack agent upgradeOutput:
FlightStack Agent Upgrade────────────────────────────────────────Current version: v1.1.31
Checking for updates...
New version available: v1.1.32Downloading v1.1.32...Extracting...Installing...
✓ Agent upgraded to v1.1.32
If the agent is running, restart it to use the new version.Check for Updates Only
Section titled “Check for Updates Only”To see if an update is available without installing:
flightstack agent upgrade --checkOutput (when update available):
FlightStack Agent Upgrade────────────────────────────────────────Current version: v1.1.31
New version available: v1.1.32
Run `flightstack agent upgrade` to update.Output (when up-to-date):
FlightStack Agent Upgrade────────────────────────────────────────Current version: v1.1.32
✓ Agent is already on the latest version (v1.1.32)Update Process Details
Section titled “Update Process Details”When an update is applied (either auto or manual):
- Download - New binary downloaded from GitHub releases
- Backup - Current binary backed up temporarily
- Replace - New binary copied to agent location
- Permissions - Executable permissions set (Unix systems)
- Cleanup - Backup and temp files removed
- Rollback - If anything fails, backup is restored
Platform-Specific Downloads
Section titled “Platform-Specific Downloads”Updates are downloaded for your specific platform:
| Platform | Binary |
|---|---|
| macOS (Apple Silicon) | flightstack-agent-X.X.X-macos-arm64.tar.gz |
| macOS (Intel) | flightstack-agent-X.X.X-macos-x64.tar.gz |
| Linux | flightstack-agent-X.X.X-linux-x64.tar.gz |
| Windows | flightstack-agent-X.X.X-windows-x64.zip |
Running as a Service
Section titled “Running as a Service”If your agent runs as a system service (launchd, systemd), it will automatically restart after an update:
The agent exits with code 100 after update. launchd automatically restarts it:
<!-- In your .plist file --><key>KeepAlive</key><true/>Configure your service to restart on exit:
[Service]Restart=alwaysRestartSec=5Checking Current Version
Section titled “Checking Current Version”To see what version you’re running:
flightstack-agent --versionOutput:
FlightStack Agent v1.1.32 (build abc123)Troubleshooting Updates
Section titled “Troubleshooting Updates”Update Fails to Download
Section titled “Update Fails to Download”Update failed: Connection timed outSolutions:
- Check internet connectivity
- Verify access to
github.com - Check for proxy/firewall blocking downloads
Permission Denied
Section titled “Permission Denied”Failed to replace binary: Permission deniedSolutions:
- Ensure you have write permissions to the agent binary location
- On macOS/Linux, you may need
sudofor system-wide installs - Check if the binary is locked by another process
Rollback After Failed Update
Section titled “Rollback After Failed Update”If an update fails mid-process, the agent automatically restores from backup:
Update failed: Could not extract archiveRestoring previous version...✓ Previous version restoredBest Practices
Section titled “Best Practices”- Keep auto-update enabled - Ensures you get bug fixes and security updates
- Check version after issues - Run
--versionwhen troubleshooting - Review changelogs - Check release notes for breaking changes
- Test in non-prod first - If running multiple agents, update one first
Release Notes
Section titled “Release Notes”View the latest changes and release notes:
Next Steps
Section titled “Next Steps”- Running Agents - Learn about agent operation
- Auto-Start on Boot - Configure automatic startup
- Troubleshooting - Solve common issues