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

Distributed scan run #62

Merged
merged 8 commits into from
Aug 12, 2024
Merged

Distributed scan run #62

merged 8 commits into from
Aug 12, 2024

Conversation

souvik-karfa
Copy link
Contributor

@souvik-karfa souvik-karfa commented Aug 7, 2024

Summary:

Replaced the following steps using a FileCallable:

  • Downloading the binary
  • Copying the script
  • Running the script

Replaced the following steps with Launcher:

  • Deleting the temporary script using rm command.

These ensure that all the processes take place at the remote agent, where the workspace is present.

@souvik-karfa souvik-karfa marked this pull request as draft August 7, 2024 04:31
@souvik-karfa souvik-karfa marked this pull request as ready for review August 7, 2024 10:26
if (caller.equals("runScan")) {
TraceableASTRunStepBuilder.setScanId(workspace.act(new RunScript(listener, scriptPath, args, caller)));
} else if (caller.equals("abortScan")) {
workspace.act(new RunScript(listener, scriptPath, args, caller));
Copy link
Collaborator

Choose a reason for hiding this comment

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

common out this line

execScript.append(" ").append(args[i]);
else execScript.append(" ''");
if (caller.equals("runScan")) {
TraceableASTRunStepBuilder.setScanId(workspace.act(new RunScript(listener, scriptPath, args, caller)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

how is this scan Id getting set , where are we returning the extracted scanId in RunScript?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The RunScript after processing, returns the scanId to this function. Which is been set using setScanId method.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can you point in RunScript where are we returning the scanId

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the invoke method of RunScript, we are returning this. We are setting this in the logOutputmethod.

RunScript.scanId = tokens[tokens.length - 1].substring(0, 36);

@dhruv-singhal-github dhruv-singhal-github merged commit 9781c2c into main Aug 12, 2024
3 checks passed
@dhruv-singhal-github dhruv-singhal-github deleted the distributed-AstRun branch August 12, 2024 09:59
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