sk-reddy17 opened a new pull request, #24005:
URL: https://github.com/apache/camel/pull/24005

   ## Summary
   
   - Adds a new `camel infra restart <service>` command that stops any running 
instance of the named external service and starts a fresh one
   - Supports the same options as `camel infra run`: `--background`, `--port`, 
`--log`, and `--kill` (for forcibly stopping the existing instance)
   - Fixes `InfraBaseCommand.findPids` to handle a missing `~/.camel` directory 
gracefully (was crashing with `NoSuchFileException` on a clean machine)
   - Regenerates metadata and docs to include the new subcommand
   - Adds upgrade guide entry
   
   ## Usage
   
   ```bash
   # Foreground (blocks until stopped)
   camel infra restart kafka
   
   # Background (returns immediately)
   camel infra restart kafka --background
   
   # Force-kill the existing instance before restarting
   camel infra restart kafka --kill
   ```
   
   When no instance is running, `restart` simply starts the service (same as 
`camel infra run`).
   
   ## Test plan
   
   - [x] `InfraRestartTest.restartService` — restart with nothing running → 
starts the service
   - [x] `InfraRestartTest.restartStopsExistingService` — restart with a fake 
running PID file → prints stopping message then starts fresh
   - [x] Manual end-to-end test: started FTP via `camel infra run ftp`, then 
ran `camel infra restart ftp` — confirmed "Stopping external service ftp (PID: 
...)" followed by a fresh start
   
   _Claude Code on behalf of Shashi Kumar Reddy (sk-reddy17)_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to