Skip to content

Conversation

@aws-toolkit-automation
Copy link
Collaborator

Automatic merge failed

  • Resolve conflicts and push to this PR branch.
  • Do not squash-merge this PR. Use the "Create a merge commit" option to do a regular merge.

Command line hint

To perform the merge from the command line, you could do something like the following (where "origin" is the name of the remote in your local git repo):

git stash
git fetch --all
git checkout origin/feature/q-lsp
git merge origin/main
git commit
git push origin HEAD:refs/heads/autoMerge/feature/q-lsp

aws-toolkit-automation and others added 7 commits April 3, 2025 18:56
…nged (#2004)

* add sessionClear

* change listener to project level

* change listener param

* fx

* ensure dev/test/review work

* linter

* hack

* update endpoint

* delete loh

* revert transform change

* cr

* update session clear

* leave stopModernize in  codeModernizerManager

---------

Co-authored-by: Will Lo <[email protected]>
Co-authored-by: Will Lo <[email protected]>
* move validate in factory

* centralize all clients
@aws-toolkit-automation aws-toolkit-automation requested review from a team as code owners April 8, 2025 18:19
aws-toolkit-automation and others added 13 commits April 8, 2025 18:25
* Add ability to filter tests based on feature

* feedback
* fix empty profile name provided as the response

* Update plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/profile/QRegionProfileManager.kt

Co-authored-by: Richard Li <[email protected]>

---------

Co-authored-by: Richard Li <[email protected]>
Co-authored-by: evanliu048 <[email protected]>
Avoid calling ListAvailableProfiles at a higher frequency by:
-Calling this API only when it's in the ProfileSelection stage
-Using AwsResourceCache to cache the api result and retrieve it after the cache expired.
…files is long (#5547)

`CodeWhispererStatusBarWidget` attempts to query active connections, but lock is being held while trying to list profiles

```
"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 blocked
     java.lang.Thread.State: BLOCKED
 on software.aws.toolkits.jetbrains.core.credentials.DefaultToolkitConnectionManager@37995400 owned by "ApplicationImpl pooled thread 5 @coroutine#17104" Id=128
	at software.aws.toolkits.jetbrains.core.credentials.DefaultToolkitConnectionManager.activeConnectionForFeature(DefaultToolkitConnectionManager.kt)
	at software.aws.toolkits.jetbrains.services.amazonq.QUtilsKt.calculateIfIamIdentityCenterConnection(QUtils.kt:18)
	at software.aws.toolkits.jetbrains.services.codewhisperer.customization.DefaultCodeWhispererModelConfigurator.activeCustomization(CodeWhispererModelConfigurator.kt:171)
	at software.aws.toolkits.jetbrains.services.codewhisperer.status.CodeWhispererStatusBarWidget.getSelectedValue(CodeWhispererStatusBarWidget.kt:114)
	at com.intellij.openapi.wm.impl.status.MultipleTextValues.beforeUpdate(IdeStatusBarImpl.kt:983)
```

```
- "coroutine#17104":BlockingCoroutine{Active}@7dced952, state: RUNNING [CoroutineId(17104), BlockingEventLoop@2da7461c]
	at java.base/jdk.internal.misc.Unsafe.park(Native Method)
	at java.base/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269)
	at java.base/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1866)
	at java.base/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:4013)
	at java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3961)
	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1939)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
	at migration.software.aws.toolkits.jetbrains.core.AwsResourceCache$Companion.wait(AwsResourceCache.kt:150)
	at migration.software.aws.toolkits.jetbrains.core.AwsResourceCache$Companion.access$wait(AwsResourceCache.kt:145)
	at migration.software.aws.toolkits.jetbrains.core.AwsResourceCache.getResourceNow(AwsResourceCache.kt:92)
	at migration.software.aws.toolkits.jetbrains.core.AwsResourceCache.getResourceNow(AwsResourceCache.kt:105)
	at software.aws.toolkits.jetbrains.services.amazonq.profile.QRegionProfileManager.listRegionProfiles(QRegionProfileManager.kt:70)
	at software.aws.toolkits.jetbrains.services.amazonq.profile.QRegionProfileManager.validateProfile$lambda$0(QRegionProfileManager.kt:50)
	at software.aws.toolkits.core.utils.ExceptionUtils.tryOrNull(ExceptionUtils.kt:11)
	at software.aws.toolkits.jetbrains.services.amazonq.profile.QRegionProfileManager.validateProfile(QRegionProfileManager.kt:49)
	at software.aws.toolkits.jetbrains.services.amazonq.toolwindow.AmazonQToolWindowFactory$createToolWindowContent$2.activeConnectionChanged(AmazonQToolWindowFactory.kt:68)
[...]
	at software.aws.toolkits.jetbrains.core.credentials.DefaultToolkitConnectionManager.switchConnection(DefaultToolkitConnectionManager.kt:159)
```
…ks (#5539)

`@JsonIgnoreProperties` should be a class-level annotation
 Conflicts:
	plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/startup/AmazonQStartupActivity.kt
	plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt
	plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererCodeCoverageTrackerTest.kt
	plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererServiceTest.kt
	plugins/amazonq/codewhisperer/jetbrains-community/tstFixtures/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererTestUtil.kt
@github-actions
Copy link

github-actions bot commented Apr 10, 2025

Qodana Community for JVM

7 new problems were found

Inspection name Severity Problems
Extension class should be final and non-public 🔶 Warning 2
Message format validation in properties files 🔶 Warning 1
Incorrect string capitalization 🔶 Warning 1
Unused symbol 🔶 Warning 1
Class naming convention ◽️ Notice 1
Nested lambda has shadowed implicit parameter ◽️ Notice 1

💡 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]

ToolkitConnectionManager.getInstance(project).activeConnectionForFeature(QConnection.getInstance())?.getConnectionSettings()
?.awsClient<CodeWhispererRuntimeClient>()
?: throw Exception("attempt to get bearer client while there is no valid credential")
open class CodeWhispererClientAdaptorImpl(override val project: Project) : CodeWhispererClientAdaptor {

Check warning

Code scanning / QDJVMC

Extension class should be final and non-public Warning

Extension class should not be open
add(CodeWhispererShowSettingsAction())
(
ToolkitConnectionManager.getInstance(it).activeConnectionForFeature(QConnection.getInstance()) as? AwsBearerTokenConnection
)?.takeIf { !it.isSono() }

Check notice

Code scanning / QDJVMC

Nested lambda has shadowed implicit parameter Note

Implicit parameter 'it' of enclosing lambda is shadowed
amazonq.workspace.settings.open.prompt=Workspace index is now enabled. You can disable it from Amazon Q settings.
q.hello=Hello
action.q.profile.usage.text=You changed profile
action.q.profile.usage=You're using the '<b>{0}</b>' profile for Amazon Q.

Check warning

Code scanning / QDJVMC

Message format validation in properties files Warning

Unpaired quote in message pattern
import software.aws.toolkits.telemetry.MetricResult
import software.aws.toolkits.telemetry.Telemetry

class QSwitchProfilesAction : AnAction(message("action.q.switchProfiles.text")), DumbAware {

Check warning

Code scanning / QDJVMC

Incorrect string capitalization Warning

String 'Change profile' is not properly capitalized. It should have title capitalization
private val LOG = getLogger<QRegionEndpoint>()
data class QRegionEndpoint(val region: String, val endpoint: String)

object Q_DEFAULT_SERVICE_CONFIG {

Check notice

Code scanning / QDJVMC

Class naming convention Note

Class name Q_DEFAULT_SERVICE_CONFIG should not contain underscores

@Service(Service.Level.APP)
@State(name = "qProfileStates", storages = [Storage("aws.xml")])
class QRegionProfileManager : PersistentStateComponent<QProfileState>, Disposable {

Check warning

Code scanning / QDJVMC

Extension class should be final and non-public Warning

Service implementation should not be public. If a service is supposed to be used outside its module, extract an interface from it and specify it as serviceInterface in plugin.xml.
@rli rli merged commit d03a641 into feature/q-lsp Apr 10, 2025
11 of 18 checks passed
@rli rli deleted the autoMerge/feature/q-lsp branch April 10, 2025 18:23
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.

5 participants