-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI registry clear-cache command #18467
Conversation
what does "in project dir" means in a multimodule project ? |
btw. +1 on having registry command for add/remove etc. but shouldn't clear-cache more be something doable by a flag on a command that uses the registry ? i.e. |
The root project dir. |
I'd personally prefer a separate command. It could have more arguments, e.g. clear cache for a specific registry, clear cache for platform catalog only, for a particular stream, etc. The impl in this PR is cleaning everything. |
devtools/cli/src/main/java/io/quarkus/cli/RegistryClearCache.java
Outdated
Show resolved
Hide resolved
cd87342
to
790bf4a
Compare
With debug enabled in the
|
} | ||
|
||
output.info("Available Quarkus extension registries:"); | ||
final RegistriesConfig config = RegistriesConfigLocator.resolveConfig(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the BaseRegistryCommand also bring in the RegistryClient mixin? And shouldn't that mixin be used to find the catalog resolver so that it is consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The registry
command isn't actually using the registry client. At least at this point. It's basically a config reading/editing command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QuarkusProjectHelper.getCatalogResolver().clearRegistryCache();
-- that is what the RegistryClient currently encapsulates (discovery of CatalogResolver based on what it knows about the project and/or global config)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, once we enable the registry client by default that could make more sense. While all of this is related to the registry client, the RegistryClientMixin
is currently used to provide the --registry-client
option and QuarkusProject
with an ExtensionCatalog
. Atm, none of that is relevant for the registry command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm. true. but would/should --refresh
apply everywhere that the registry client is used? (this gets back to @maxandersen comment earlier/somewhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, refactored to add the --refresh
option to the RegistryClientMixin.
1b3a408
to
d6ffeba
Compare
This workflow status is outdated as a new workflow run has been triggered. 🚫 This workflow run has been cancelled. Failing Jobs - Building 1b3a408
|
the create commands
d6ffeba
to
2422ce6
Compare
This workflow status is outdated as a new workflow run has been triggered. 🚫 This workflow run has been cancelled. Failing Jobs - Building d6ffeba
|
An attempt to add
registry clear-cache
CLI command to clear the local registry cache.Other
registry
sub-commands could include:list
to list currently enabled registries;add
to add another registry to the devtools config;remove
to remove a registry from the config;disable
to temporarily disable a registry in the config;enable
to (re-)enable a registry in the config.A config file could be either a global (in the user home dir) or in the project dir.