[ 
https://issues.apache.org/jira/browse/CAMEL-25817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-25817:
-----------------------------------

    Assignee: Claus Ibsen

> camel-jbang - camel dirty --clean removes files that belong to no process, 
> such as the log of a running Spring Boot or Quarkus app
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25817
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25817
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> {{camel dirty}} counts as dirty every file in {{~/.camel}} whose name does 
> not start with the pid of a live process, and {{camel dirty --clean}} deletes 
> them. Only {{camel-export.log}} is left out. So it also removes files that 
> belong to no pid:
> * {{<name>.log}}, the log of an app that {{camel run --runtime=spring-boot}} 
> or {{--runtime=quarkus}} runs, also while it runs.
> * {{camel-launch-*.log}} and {{camel-restart-*.log}}, the console output of 
> an integration that the {{camel_run}} and {{camel_control restart}} tools 
> started. The tools read it when the start fails.
> * Files the CLI keeps there on purpose, such as the history of the AI prompt.
> It also counts directories ({{quarkus-extension-registries}}), which it 
> cannot delete, so "Cleaned N orphan files" counts one too many.
> Seen in a home directory of its own:
> {noformat}
> ~/.camel: camel-export.log, camel-launch-123456.log, orders.log, 
> quarkus-extension-registries/, the AI prompt history
> $ camel dirty
> There are 4 orphan files
> $ camel dirty --clean
> Cleaned 4 orphan files
> ~/.camel: camel-export.log, quarkus-extension-registries/
> {noformat}
> A fix could count only the files named after a pid ({{<pid>}}, {{<pid>-*}}, 
> {{<pid>.*}} and {{infra-<service>-<pid>.*}}), when that pid is gone, and 
> leave the others. The PR of CAMEL-25784 already leaves the log of a previous 
> run ({{<name>-previous.log}}).
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to