Skip to content

Conversation

@nkomonen-amazon
Copy link
Contributor

After some testing there is the edge case of cached Customizations/Profiles not being sent on startup.
This PR fixes that so that they are sent to the LSP on extension startup, when expected.

See each individual commit as they are isolated changes.


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem

On start of the extension when we called getSelectedCustomization() it would
return the wrong customization. This caused the wrong customization to be
pushed to the LSP.

The reason was due to notifyNewCustomizations not being called before getSelectedCustomization()
was used.

Solution

Ensure the call that uses notifyNewCustomizations() runs before getSelectedCustomization is used.

I also refactored to compartmentalize the relevant code.

Signed-off-by: nkomonen-amazon <[email protected]>
This function makes more sense to live in the lsp config folder
as it is a general function that pushes a config to the lsp

Signed-off-by: nkomonen-amazon <[email protected]>
Because the `AuthUtil.restore()` was called before we registered the
onDidChangeRegionProvider, the expected pushConfigUpdate was not called
when the server started. This resulted in the cached Developer Profile
not being pushed to the LSP.

This fixes that.

Signed-off-by: nkomonen-amazon <[email protected]>
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@nkomonen-amazon nkomonen-amazon marked this pull request as ready for review May 14, 2025 06:00
@nkomonen-amazon nkomonen-amazon requested review from a team as code owners May 14, 2025 06:00
@opieter-aws opieter-aws merged commit f849b3f into aws:feature/amazonqLSP-auth May 14, 2025
15 of 22 checks passed
@nkomonen-amazon nkomonen-amazon deleted the customizationFix branch May 14, 2025 13:59
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.

2 participants