-
Notifications
You must be signed in to change notification settings - Fork 273
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
perf(cli): avoid unnecessary module resolution when filtering by name #6002
Conversation
668abf1
to
51cb7a9
Compare
if (opts.module) { | ||
actionsFilter = [...(actionsFilter || []), `test.${opts.module}-*`] | ||
} |
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.
It looks like garden run
command also support --module
option. Should we implement the same logic for the Run actions?
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.
Ah, didn't notice that. I'd say not strictly necessary for that one, feels more relevant for tests (since it's more natural to run all tests for a module than to run all tasks).
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.
LGTM! Thank you! 👍
The ModuleResolver.resolve()
seems go be a bit long and complicated, but let's avoid unnecessary refactoring for now. The tests pass, so we can go ahead :)
Fully agree on that one. Since modules are deprecated though, I didn't want to spend too much time on that. If we put more work into it we can clean it up. |
0e441af
to
2785f95
Compare
This applies to most common usages of the `build`, `deploy`, `run` and `test` commands when one or more names are specified, as well as in the `get modules` and `get actions` commands. For now this is enabled specifically with by setting the `GARDEN_ENABLE_PARTIAL_RESOLUTION=true` env variable.
Post-rebase fix
2785f95
to
754030e
Compare
Print class name as a prefix in all debug/silly messages.
@edvald I reverted one behavioural change in 269b79a (see the commit message Please take a look. If you're fine with that, let's merge this. I'm also thinking about some tiny refactoring to unify the build/run/test/deploy action lookups by names/wildcards and the relevant error handling. Update. I've just noticed that some tests failed after the commit above. Well, we can preserve the old behaviour, but fail with different error messages. That should be ok. |
269b79a
to
f93125f
Compare
Did more precise error handling in 4b86e05. Let's see if all the tests pass. |
Changes from 4b86e05 caused even more test failures, I'll revert that commit. |
This reverts commit 4b86e05.
84f3c51
to
1e64797
Compare
Finally, did some explicit check in 1e64797 to ensure the old behaviour when |
This applies to most common usages of the
build
,deploy
,run
andtest
commands when one or more names are specified, as well as in theget modules
andget actions
commands.For now this is enabled specifically by setting the
GARDEN_ENABLE_PARTIAL_RESOLUTION=true
env variable.Fixes #5844