Skip to content

refactor(admin): route tier config manager through AppContext#1959

Merged
overtrue merged 1 commit intorustfs:mainfrom
overtrue:codex/refactor-p5-02-admin-tier-context
Feb 25, 2026
Merged

refactor(admin): route tier config manager through AppContext#1959
overtrue merged 1 commit intorustfs:mainfrom
overtrue:codex/refactor-p5-02-admin-tier-context

Conversation

@overtrue
Copy link
Collaborator

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Summary of Changes

  • Add TierConfigInterface in AppContext with default adapter to centralize tier-config dependency access.
  • Replace direct GLOBAL_TierConfigMgr reads/writes in admin/handlers/tier.rs with AppContext-based access.
  • Keep tier admin API behavior unchanged; only dependency wiring moved behind context interfaces.

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit
  • Added/updated necessary tests
  • Documentation updated (if needed)
  • CI/CD passed (if applicable)

Impact

  • Breaking change (compatibility)
  • Requires doc/config/deployment update
  • Other impact:
  • Internal refactor only; no external API changes expected.

Additional Notes


Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.

Copilot AI review requested due to automatic review settings February 25, 2026 14:54
@overtrue overtrue added the codex label Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors tier configuration management to route through AppContext instead of direct global access, continuing the P5-02 convergence initiative started in PR #1958. The changes introduce a new TierConfigInterface boundary in the application context layer and update all tier admin handlers to use it.

Changes:

  • Added TierConfigInterface to AppContext with default adapter that wraps GLOBAL_TierConfigMgr
  • Replaced all direct GLOBAL_TierConfigMgr reads/writes in tier admin handlers with AppContext-based access via helper function
  • Removed direct global import from tier handler module while maintaining identical external API behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
rustfs/src/app/context.rs Added TierConfigInterface trait, TierConfigHandle adapter, integrated into AppContext struct and initialization
rustfs/src/admin/handlers/tier.rs Added tier_config_mgr_from_context() helper, updated all 7 operations (Add/Edit/List/Remove/Verify/GetInfo/Clear) to use context-based access, removed GLOBAL_TierConfigMgr import

@overtrue overtrue merged commit fd86d0b into rustfs:main Feb 25, 2026
17 checks passed
@overtrue overtrue deleted the codex/refactor-p5-02-admin-tier-context branch February 25, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants