Skip to content

SCANPY-102 New bootstrapping: Execute the Scan #148

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

Merged
merged 10 commits into from
Mar 19, 2025

Conversation

thomas-serre-sonarsource
Copy link
Contributor

@thomas-serre-sonarsource thomas-serre-sonarsource commented Mar 18, 2025

@thomas-serre-sonarsource thomas-serre-sonarsource changed the base branch from master to branch-SCANPY-98 March 18, 2025 13:25
Copy link
Contributor

@Seppli11 Seppli11 left a comment

Choose a reason for hiding this comment

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

The general logic looks sound to me. The only issue regarding the logic is that the version check isn't done as the first step, but only after the JRE and scanner engine provisioning.

Apart from that, I'm not convinced that we should override __str__ for the CacheFile and JREProvisionedPath (see comment for more detail).

I've also left some other smaller nit picks.

cmd = self.__build_command(jre_path)
print(cmd)
popen = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE)
outs, _ = popen.communicate(configuration.to_json().encode())
Copy link
Contributor

Choose a reason for hiding this comment

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

The way this currently processes the log files means that there is no output from the scanner engine at all.
We probably should do this similarly to how it was done in the current master (see here)

However, I think it would be fine to do this as a separate ticket

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

Copy link
Contributor

@Seppli11 Seppli11 left a comment

Choose a reason for hiding this comment

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

LGTM!
Thanks for the changes 😁

It seems to me that there is not really any error handling in the code. But this can be done as a separate ticket. This way we can unblock the other tickets and work on master.

@thomas-serre-sonarsource thomas-serre-sonarsource merged commit e462a96 into branch-SCANPY-98 Mar 19, 2025
15 checks passed
@thomas-serre-sonarsource thomas-serre-sonarsource deleted the SCANPY-102 branch March 19, 2025 13:39
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