Replace archived delegation with hierarchical check
What does this MR do and why?
This commit changes how the archived status is determined for
project import states. Previously, it delegated directly to the
project's archived attribute. Now it checks if either the project
itself or any of its ancestor groups are archived by implementing
an archived method that calls project.self_or_ancestors_archived?.
This ensures that mirror updates are properly prevented when a project is in an archived namespace hierarchy, not just when the project itself is marked as archived.
References
Make project archival features compatible with ... (&19690)
Query Plans
| Before | After |
|---|---|
| https://console.postgres.ai/gitlab/gitlab-production-main/sessions/45191/commands/138626 | https://console.postgres.ai/gitlab/gitlab-production-main/sessions/45191/commands/138627 |
How to set up and validate locally
Run the specs
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.
Related to #578815 (closed)