-
Notifications
You must be signed in to change notification settings - Fork 83
fix: send a defaultConfig flag to prevent init with default config #2464
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
base: main
Are you sure you want to change the base?
Conversation
…2462) Co-authored-by: Conor Stewart <[email protected]> Co-authored-by: constewart9 <[email protected]> Co-authored-by: manodnyab <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2464 +/- ##
==========================================
+ Coverage 62.71% 63.00% +0.28%
==========================================
Files 266 266
Lines 59697 59707 +10
Branches 3840 3865 +25
==========================================
+ Hits 37441 37620 +179
+ Misses 22180 22011 -169
Partials 76 76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const updateConfigurationHandler = async (updatedConfig: AmazonQWorkspaceConfig) => { | ||
| logging.log('Updating configuration of local context server') | ||
| try { | ||
| if (updatedConfig.isDefaultConfig === true) { |
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.
please add tests for this use case
| logging.log('Updating configuration of local context server') | ||
| try { | ||
| if (updatedConfig.isDefaultConfig === true) { | ||
| logging.log('Skipping init for default 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.
nit: can be a lil more specific
| logging.log('Skipping init for default config') | |
| logging.log('Skipping local project context initialization for default config') |
Problem
Currently the LocalProjectContextController does not respect real config setting for indexing, only the default configuration is called and the real configuration is thrown away if the first call is not finished yet. Thus, the vector indexing won't start and the cache indexing is broken.
Solution
Add a defaultConfig flag to make LocalProjectContextController prevent init with default config and only execute the real config
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.