Summary: Previously, if a software upgrade task failed after promoting autoflags, YBA would incorrectly overwrite the stored autoflag version with the latest (potentially updated) version, instead of preserving the original version needed for rollback. This PR updates the logic to prevent storing the autoflag version again if it has already been stored, ensuring correct rollback behavior.
Test Plan: Manually verified that software upgrade rollback functions correctly when the initial upgrade attempt fails after promoting autoflags and the upgrade succeeds on a retry.
Reviewers: svarshney, anabaria
Reviewed By: anabaria
Subscribers: yugaware
Differential Revision: https://phorge.dev.yugabyte.com/D44908