Skip to content

fix(cli): Allow subcommands while another instance owns the cache - #53

Merged
jbaiter merged 1 commit into
mainfrom
fix-cli-subcommand-cache-directory
Nov 23, 2026
Merged

jbaiter merged 1 commit into
mainfrom
fix-cli-subcommand-cache-directory

Conversation

@jbaiter

@jbaiter jbaiter commented Nov 20, 2026

Copy link
Copy Markdown
Member

The HTTP source cache is enabled by default and takes an exclusive lock on its directory. Because the operational subcommands build the regular application context, wolpi validate aborted with a Spring stack trace and a bare "directory is already in use" whenever another instance owned the data directory.

Serve the lock conflict as a dedicated exception and let subcommand invocations fall back to a temporary cache directory with a warning, while a server still refuses to start with an actionable message. Subcommands do not serve production traffic and terminate after their work, so a throwaway cache is safe there.

The HTTP source cache is enabled by default and takes an exclusive lock on its
directory. Because the operational subcommands build the regular application
context, `wolpi validate` aborted with a Spring stack trace and a bare
"directory is already in use" whenever another instance owned the data
directory.

Serve the lock conflict as a dedicated exception and let subcommand
invocations fall back to a temporary cache directory with a warning, while a
server still refuses to start with an actionable message. Subcommands do not
serve production traffic and terminate after their work, so a throwaway cache
is safe there.
@jbaiter
jbaiter force-pushed the fix-cli-subcommand-cache-directory branch from c8eb1a7 to 439561f Compare November 23, 2026 12:49
@jbaiter
jbaiter merged commit 9b5ff95 into main Nov 23, 2026
6 checks passed
@jbaiter
jbaiter deleted the fix-cli-subcommand-cache-directory branch November 23, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants