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

Scan all available roots when no configuration file can be found by JAS scanners #435

Merged
merged 6 commits into from
Nov 14, 2023

Conversation

Or-Geva
Copy link
Contributor

@Or-Geva Or-Geva commented Nov 13, 2023

  • All tests passed. If this feature is not already covered by the tests, I added new tests.

This pull request resolves an issue in the JAS scanners. Previously, in the absence of a configuration file, the scanners would only scan the root project of the opened workspace. This fix ensures that when no configuration is available, the scanners will now comprehensively scan all roots detected by IDEA.

@Or-Geva Or-Geva added bug Something isn't working safe to test Approve running integration tests on a pull request labels Nov 13, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 13, 2023
@@ -97,8 +95,8 @@ public void startScan() {
scanner.asyncScanAndUpdateResults();
}
executor.shutdown();
if (!executor.awaitTermination(SCAN_TIMEOUT_MINUTES, TimeUnit.MINUTES)) {
logError(Logger.getInstance(), "Scan timeout of " + SCAN_TIMEOUT_MINUTES + " minutes elapsed. The scan is being canceled.", true);
if (!executor.awaitTermination(Long.MAX_VALUE, TimeUnit.MINUTES)) {
Copy link
Member

Choose a reason for hiding this comment

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

I disagree with that approach. In a developer environment, it's better to end the scan after a few minutes. Plus, users don't get any feedback or indication about the ongoing scan during this prolonged period. But ultimately, it's up to you to decide.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will remove the timeout, add more logging, and add progress bars to enhance the user experience as discussed on Zoom

src/main/java/com/jfrog/ide/idea/scan/ScanUtils.java Outdated Show resolved Hide resolved
@Or-Geva Or-Geva merged commit 6f6d898 into jfrog:master Nov 14, 2023
5 of 9 checks passed
@Or-Geva Or-Geva changed the title Scan all available roots when no configuration file can be found by JAS scanners & remove JAS timeout Scan all available roots when no configuration file can be found by JAS scanners Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants