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

Remove node if VM doesn't exist even if computer is not idle #552

Merged
merged 11 commits into from
Jul 23, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,6 @@
continue;
}

// If the machine is not idle, don't do anything.
// Could have been taken offline by the plugin while still running
// builds.
if (!azureComputer.isIdle()) {
continue;
}

// Even if offline, a machine that has been temporarily marked offline
// should stay (this could be for investigation).
if (azureComputer.isSetOfflineByUser()) {
Expand Down Expand Up @@ -513,6 +506,13 @@
continue;
}

// If the machine is not idle, don't do anything.
// Could have been taken offline by the plugin while still running
// builds.
if (!azureComputer.isIdle()) {
continue;

Check warning on line 513 in src/main/java/com/microsoft/azure/vmagent/AzureVMAgentCleanUpTask.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 512-513 are not covered by tests
}

// Machine exists but is in either DELETE or SHUTDOWN state.
// Execute that action.
Callable<Void> task = () -> {
Expand Down