Skip to content
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

feat: source IaC results from LS, make progresses & scans cancelable [IDE-630] #616

Merged
merged 54 commits into from
Oct 2, 2024

Conversation

bastiandoetsch
Copy link
Collaborator

@bastiandoetsch bastiandoetsch commented Sep 22, 2024

Description

  • integrates IaC results from LS instead of CLI scan
  • makes progresses cancelable
  • cleans up redundant / old code

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

# Conflicts:
#	src/main/kotlin/io/snyk/plugin/ui/toolwindow/panels/JCEFDescriptionPanel.kt
#	src/main/resources/META-INF/plugin.xml
# Conflicts:
#	CHANGELOG.md
@bastiandoetsch bastiandoetsch marked this pull request as draft September 30, 2024 10:25
@bastiandoetsch bastiandoetsch changed the title feat: source infrastructure-as-code results from LS, make progresses & scans cancelable [IDE-630] feat: source IaC results from LS, make progresses & scans cancelable [IDE-630] Sep 30, 2024

private fun cancelProgress(token: String) {
try {
progresses[token]?.cancel()
Copy link
Contributor

@ShawkyZ ShawkyZ Oct 1, 2024

Choose a reason for hiding this comment

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

am wondering if we need a mutex here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

progresses is a concurrentMap - so we don't

@@ -68,7 +68,6 @@ class BranchChooserComboBoxDialog(val project: Project) : DialogWrapper(true) {
}
runAsync {
LanguageServerWrapper.getInstance().updateConfiguration()
LanguageServerWrapper.getInstance().sendScanCommand(project)
}
}
Copy link
Contributor

@ShawkyZ ShawkyZ Oct 1, 2024

Choose a reason for hiding this comment

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

will LS trigger a scan here on config change? or is it a behavior we don't want atm?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think, updateConfiguration() already triggers a scan.

Copy link
Contributor

@ShawkyZ ShawkyZ left a comment

Choose a reason for hiding this comment

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

🚀🌑✨

@bastiandoetsch bastiandoetsch marked this pull request as ready for review October 2, 2024 09:52
@bastiandoetsch bastiandoetsch merged commit 14e0a29 into master Oct 2, 2024
9 checks passed
@bastiandoetsch bastiandoetsch deleted the feat/iac-from-ls branch October 2, 2024 13:21
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