Skip to content

BLT UMD/T - better error handling for file deletion logic#9696

Open
joewhitsitt wants to merge 2 commits intomainfrom
error_handling_delete_remove_files
Open

BLT UMD/T - better error handling for file deletion logic#9696
joewhitsitt wants to merge 2 commits intomainfrom
error_handling_delete_remove_files

Conversation

@joewhitsitt
Copy link
Copy Markdown
Contributor

@joewhitsitt joewhitsitt commented Mar 19, 2026

Marie encountered a failed file cleanup during a deprovision (ssh known_hosts change) which made a bigger mess than I originally thought. With the change to the command to keep going and note that manual file deletion would be necessary, it deleted the database in the remotes and cleaned up the local files (aliases) that are used within the command. This prevented re-running the command after fixing the known_hosts. My local didn't have those git changes and after temporarily recreating the database, I was able to successfully run the command including the file deletion process.

This PR restores the exception for failures resulting from the environment lookup as well as a host key change, allowing the option to fix the option, try again later.

How to test

  • Code review unless you want to run a deprovision and trick the code into a failure situation.
  • This same deleteRemoteMultisiteFiles is used for the umt command as well but I don't think that command as a whole has been tested in quite some time (post ACN migration).

@joewhitsitt joewhitsitt marked this pull request as ready for review March 19, 2026 20:32
@pyrello
Copy link
Copy Markdown
Contributor

pyrello commented Mar 24, 2026

It seems like this still leaves open the possibility of the command failing on non-test/stage environments if there is a similar known_hosts problem?

@joewhitsitt
Copy link
Copy Markdown
Contributor Author

It seems like this still leaves open the possibility of the command failing on non-test/stage environments if there is a similar known_hosts problem?

Yes it does, it essentially rolls us back to before but without the whoami junk method of determining the environment. What we found with Marie's situation is that if the process continues to run, it is very manual to finish the deprovision. erroring out on a known_hosts issue, fixing and then re-running to completion seemed easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants