Skip to content

Conversation

rli
Copy link
Contributor

@rli rli commented Jul 3, 2025

we have several existing checks to guard against invocation, but do not handle the case where token is no longer valid

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

…aims token is invalid

we have several existing checks to guard against invocation, but do not handle the case where token is no longer valid
Copy link

github-actions bot commented Jul 3, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@leigaol
Copy link
Contributor

leigaol commented Jul 3, 2025

Relevant: aws/aws-toolkit-vscode#7603

@rli rli marked this pull request as ready for review July 3, 2025 20:22
@rli rli requested a review from a team as a code owner July 3, 2025 20:22
val project = editor.project ?: return InlineCompletionSuggestion.Empty

// try to refresh automatically if possible, otherwise ask user to login again
if (isQExpired(project)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isQExpired should be very fast so that inline completion latency does not go up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this is just check on token timestamp

@rli rli merged commit 5f5ed91 into main Jul 9, 2025
13 of 16 checks passed
@rli rli deleted the rli/inline-auth-check branch July 9, 2025 06:12
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