Clean leftovers of previous run before MSI install test#984
Merged
Conversation
A killed run, or an uninstall that failed to remove files, leaves a non-empty data directory. Every subsequent MSI install on the worker then fails with 'data directory exists and is not empty'. Currently the case on amd64-windows-packages (builds 43478+).
RazvanLiviuVarzaru
approved these changes
Jul 4, 2026
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.
The amd64-windows-packages worker is currently stuck: every build since 43478 fails the MSI install step in ~1.5s with data directory exists and is not empty, because a previous run left a non-empty C:\Program Files\MariaDB\data behind (an uninstall that failed to remove files, or a killed run - the MSI RemoveDataDirectory action is deliberately Return=ignore, so a locked file can leak the datadir even from a successful-looking uninstall).
Make the install script precondition explicit instead of trusting the previous run cleanup: stop and delete a leftover service and remove a leftover installation directory before installing. This also heals the currently stuck worker on the next run.