Repository navigation
Honour delete_on_complete in the Azure VM runner - #709
Open
VenishPaneliya wants to merge 1 commit into
Open
VenishPaneliya wants to merge 1 commit into
VenishPaneliya wants to merge 1 commit into
Conversation
run_azure_process accepted delete_on_complete but never read it, so the startup script's self_delete ran unconditionally and passing False to AzureVMExecutor had no effect. Export the flag into the script and skip the delete when it is off, as run/azure_ci.py already does. Signed-off-by: VenishPaneliya <141703684+VenishPaneliya@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #709 +/- ##
==========================================
- Coverage 67.82% 67.77% -0.06%
==========================================
Files 77 77
Lines 11893 11893
==========================================
- Hits 8066 8060 -6
- Misses 3827 3833 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run_azure_processtakesdelete_on_completeand never reads it.AzureVMExecutordocuments it as "Delete group containers after completion. Defaults to True", stores it, and passes it down — but the startup script callsself_deleteunconditionally from thirteen places, sodelete_on_complete=Falseis silently ignored and the VM is deleted anyway. That is the case where you most want the VM kept: inspecting a failed trial.run/azure_ci.pyalready guards its cleanup withif delete_on_complete:, so this is the VM runner missing the behaviour its sibling has.The fix exports the flag alongside the seven variables already exported into the script, and returns early from
self_deletewhen it is off — stillexit $1, so termination is unchanged. With the defaultTruethe generated script behaves exactly as before.ruff checkonmainreportsARG001 Unused function argument: delete_on_completefor this function; that warning is gone after the change.No test added, since
powerlift/run/has no test coverage to extend and this path needs a live Azure subscription. I did check the generated shell: pulling thestartup_scriptliteral out of the module and runningself_deleteunder bash withazstubbed,az vm deleteis reached withDELETE_ON_COMPLETE=1and not reached with0; onmainit is reached either way.ruff format --checkpasses.(The red
format_clangis not from this diff, which touches no C++: itscheck_cppstep iscontinue-on-error, but the follow-upchecks.create()needschecks: write, which a fork PR's token does not have. That step only runs because clang-format already finds files to reformat undershared/libebm/at this commit, so any fork PR shows it red.)