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

Reorganize comment and remove unnessary message to reduce confusion #4407

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions buildenv/jenkins/openjdk_tests
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,8 @@ timestamps{
}
}
} else {
// IF no nodes are idle we will check if there is supported virtual agent
// When Parallel the race condition could happen. Say the number of multiply jobs is larger than the available nodes the query's result may be delayed and wrong
// In this case jobs will be fooled to fall back to wait local busy nodes.
dynamicAgents = PLATFORM_MAP[params.PLATFORM]["DynamicAgents"] ? PLATFORM_MAP[params.PLATFORM]["DynamicAgents"] : []
println "dynamicAgents: ${dynamicAgents}"

// If virtual agent isn't supported fall back to normal LABEL check regardless if there are nodes available or not
if (params.CLOUD_PROVIDER != null && params.CLOUD_PROVIDER in dynamicAgents && LABEL == PLATFORM_MAP[params.PLATFORM]["LABEL"]) {
boolean isNodeIdle = false
node {
Expand All @@ -230,8 +226,11 @@ timestamps{
}
}
}
// No agents available, start VM agent.
// When Parallel the race condition could happen. Say the number of multiply jobs is larger than the available nodes the query's result may be delayed and wrong
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// When Parallel the race condition could happen. Say the number of multiply jobs is larger than the available nodes the query's result may be delayed and wrong
// When running in parallel, a race condition could occur. If for example, the number of multiply jobs is greater than the available nodes, then the query's result may be delayed and incorrect

// In this case jobs will be fooled to fall back to wait local busy nodes.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite understand this comment.

if (!isNodeIdle) {
println "Cannot find any idle nodes. Starting dynamic vm"
println "Cannot find any idle nodes. Starting dynamic vm ${params.CLOUD_PROVIDER}"
karianna marked this conversation as resolved.
Show resolved Hide resolved
LABEL = LABEL.minus("ci.role.test&&")
LABEL += '&&ci.agent.dynamic'
}
Expand Down