-
Notifications
You must be signed in to change notification settings - Fork 179
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
refactor(cli): don't load config twice for commands that use a client #1350
Conversation
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
✅ Deploy Preview for docs-kargo-akuity-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1350 +/- ##
==========================================
- Coverage 45.40% 45.36% -0.04%
==========================================
Files 136 136
Lines 11717 11726 +9
==========================================
Hits 5320 5320
- Misses 6206 6215 +9
Partials 191 191 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
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!
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
Ever since #1179, we've been loading CLI config up front since it may contain a user's preference for a default project.
I noticed today that commands requiring a client for interacting with the Kargo API server continue to reload the configuration just-in-time.
This change passed the config that is loaded up front to the "constructors" for each of the CLI's sub-commands so configuration is now only ever loaded once per invocation of the CLI.