Skip to content

Conversation

@XiaoxuanLu
Copy link
Contributor

@XiaoxuanLu XiaoxuanLu commented Nov 5, 2025

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.

…2462)

Co-authored-by: Conor Stewart <[email protected]>
Co-authored-by: constewart9 <[email protected]>
Co-authored-by: manodnyab <[email protected]>
@XiaoxuanLu XiaoxuanLu requested a review from a team as a code owner November 5, 2025 19:31
@XiaoxuanLu XiaoxuanLu changed the title fix: send a defaultConfig flag to prevent init with default config (#… fix: send a defaultConfig flag to prevent init with default config Nov 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.00%. Comparing base (9e08fe1) to head (e41c285).

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              
Flag Coverage Δ
unittests 63.00% <100.00%> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const updateConfigurationHandler = async (updatedConfig: AmazonQWorkspaceConfig) => {
logging.log('Updating configuration of local context server')
try {
if (updatedConfig.isDefaultConfig === true) {
Copy link
Contributor

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')
Copy link
Contributor

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

Suggested change
logging.log('Skipping init for default config')
logging.log('Skipping local project context initialization for default config')

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.

4 participants