Draft: Update archived state with state machine
What does this MR do?
This MR ensures that the state column is updated when legacy state changes occur for archived/ancestor_archived states, following the Group and Project Operations and State Management blueprint.
Implementation Details
According to the blueprint, we need to synchronize legacy states to new states:
-
namespace_settings.archived/projects.archived=>archived/ancestor_archived
The implementation updates the new states in the services where we update the legacy states:
-
Archive Service (
app/services/namespaces/groups/archive_service.rb): -
Unarchive Service (
app/services/namespaces/groups/unarchive_service.rb):
It also adds in a FF to put this implementation behind.
Related Issues
Closes #550619
Checklist
-
Follow the Group and Project Operations and State Management blueprint -
Update state column when legacy archived state changes -
Handle both archive and unarchive operations -
Add tests for state synchronization
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.