mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
feat: comprehensive module system and database management improvements
This commit introduces major enhancements to the module installation system, database management, and configuration handling for AzerothCore deployments. ## Module System Improvements ### Module SQL Staging & Installation - Refactor module SQL staging to properly handle AzerothCore's sql/ directory structure - Fix SQL staging path to use correct AzerothCore format (sql/custom/db_*/*) - Implement conditional module database importing based on enabled modules - Add support for both cpp-modules and lua-scripts module types - Handle rsync exit code 23 (permission warnings) gracefully during deployment ### Module Manifest & Automation - Add automated module manifest generation via GitHub Actions workflow - Implement Python-based module manifest updater with comprehensive validation - Add module dependency tracking and SQL file discovery - Support for blocked modules and module metadata management ## Database Management Enhancements ### Database Import System - Add db-guard container for continuous database health monitoring and verification - Implement conditional database import that skips when databases are current - Add backup restoration and SQL staging coordination - Support for Playerbots database (4th database) in all import operations - Add comprehensive database health checking and status reporting ### Database Configuration - Implement 10 new dbimport.conf settings from environment variables: - Database.Reconnect.Seconds/Attempts for connection reliability - Updates.AllowedModules for module auto-update control - Updates.Redundancy for data integrity checks - Worker/Synch thread settings for all three core databases - Auto-apply dbimport.conf settings via auto-post-install.sh - Add environment variable injection for db-import and db-guard containers ### Backup & Recovery - Fix backup scheduler to prevent immediate execution on container startup - Add backup status monitoring script with detailed reporting - Implement backup import/export utilities - Add database verification scripts for SQL update tracking ## User Import Directory - Add new import/ directory for user-provided database files and configurations - Support for custom SQL files, configuration overrides, and example templates - Automatic import of user-provided databases and configs during initialization - Documentation and examples for custom database imports ## Configuration & Environment - Eliminate CLIENT_DATA_VERSION warning by adding default value syntax - Improve CLIENT_DATA_VERSION documentation in .env.template - Add comprehensive database import settings to .env and .env.template - Update setup.sh to handle new configuration variables with proper defaults ## Monitoring & Debugging - Add status dashboard with Go-based terminal UI (statusdash.go) - Implement JSON status output (statusjson.sh) for programmatic access - Add comprehensive database health check script - Add repair-storage-permissions.sh utility for permission issues ## Testing & Documentation - Add Phase 1 integration test suite for module installation verification - Add comprehensive documentation for: - Database management (DATABASE_MANAGEMENT.md) - Module SQL analysis (AZEROTHCORE_MODULE_SQL_ANALYSIS.md) - Implementation mapping (IMPLEMENTATION_MAP.md) - SQL staging comparison and path coverage - Module assets and DBC file requirements - Update SCRIPTS.md, ADVANCED.md, and troubleshooting documentation - Update references from database-import/ to import/ directory ## Breaking Changes - Renamed database-import/ directory to import/ for clarity - Module SQL files now staged to AzerothCore-compatible paths - db-guard container now required for proper database lifecycle management ## Bug Fixes - Fix module SQL staging directory structure for AzerothCore compatibility - Handle rsync exit code 23 gracefully during deployments - Prevent backup from running immediately on container startup - Correct SQL staging paths for proper module installation
This commit is contained in:
274
docs/BLOCKED_MODULES_SUMMARY.md
Normal file
274
docs/BLOCKED_MODULES_SUMMARY.md
Normal file
@@ -0,0 +1,274 @@
|
||||
# Blocked Modules - Complete Summary
|
||||
|
||||
**Last Updated:** 2025-11-14
|
||||
**Status:** ✅ All blocked modules properly disabled
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
All modules with known compilation or linking issues have been:
|
||||
1. ✅ **Blocked in manifest** with documented reasons
|
||||
2. ✅ **Disabled in .env** (set to 0)
|
||||
3. ✅ **Excluded from build** via module state generation
|
||||
|
||||
---
|
||||
|
||||
## Blocked Modules (8 Total)
|
||||
|
||||
### Build Failures - Compilation Errors (3)
|
||||
|
||||
#### 1. mod-azerothshard (MODULE_AZEROTHSHARD)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** Compilation Error
|
||||
**Issue:** Method name mismatch
|
||||
|
||||
**Error:**
|
||||
```cpp
|
||||
fatal error: no member named 'getLevel' in 'Player'; did you mean 'GetLevel'?
|
||||
if (req <= pl->getLevel())
|
||||
^~~~~~~~
|
||||
GetLevel
|
||||
```
|
||||
|
||||
**Root Cause:** Module uses lowercase method names instead of AzerothCore's PascalCase convention
|
||||
|
||||
**Fix Required:** Update all method calls to use correct casing
|
||||
|
||||
---
|
||||
|
||||
#### 2. mod-challenge-modes (MODULE_CHALLENGE_MODES)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** Compilation Error
|
||||
**Issue:** Override signature mismatch
|
||||
|
||||
**Error:**
|
||||
```cpp
|
||||
fatal error: only virtual member functions can be marked 'override'
|
||||
void OnGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 /*xpSource*/) override
|
||||
```
|
||||
|
||||
**Root Cause:** Method signature doesn't match base class - likely API change in AzerothCore
|
||||
|
||||
**Fix Required:** Update to match current PlayerScript hook signatures
|
||||
|
||||
---
|
||||
|
||||
#### 3. mod-quest-count-level (MODULE_LEVEL_GRANT)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** Compilation Error
|
||||
**Issue:** Uses removed API
|
||||
|
||||
**Details:** Uses `ConfigMgr::GetBoolDefault` which was removed from modern AzerothCore
|
||||
|
||||
**Fix Required:** Update to use current configuration API
|
||||
|
||||
---
|
||||
|
||||
### Build Failures - Linker Errors (2)
|
||||
|
||||
#### 4. mod-ahbot (MODULE_AHBOT)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** Linker Error
|
||||
**Issue:** Missing script loader function
|
||||
|
||||
**Error:**
|
||||
```
|
||||
undefined reference to 'Addmod_ahbotScripts()'
|
||||
```
|
||||
|
||||
**Root Cause:** ModulesLoader expects `Addmod_ahbotScripts()` but function not defined
|
||||
|
||||
**Alternative:** ✅ Use **MODULE_LUA_AH_BOT=1** (Lua version works)
|
||||
|
||||
---
|
||||
|
||||
#### 5. azerothcore-lua-multivendor (MODULE_MULTIVENDOR)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** Linker Error
|
||||
**Issue:** Missing script loader function
|
||||
|
||||
**Error:**
|
||||
```
|
||||
undefined reference to 'Addazerothcore_lua_multivendorScripts()'
|
||||
```
|
||||
|
||||
**Root Cause:** Module may be Lua-only but marked as C++ module
|
||||
|
||||
**Fix Required:** Check module type in manifest or implement C++ loader
|
||||
|
||||
---
|
||||
|
||||
### Known API Incompatibilities (3)
|
||||
|
||||
#### 6. mod-pocket-portal (MODULE_POCKET_PORTAL)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** C++20 Requirement
|
||||
**Issue:** Requires std::format support
|
||||
|
||||
**Details:** Module uses C++20 features not available in current build environment
|
||||
|
||||
**Fix Required:** Either upgrade compiler or refactor to use compatible C++ version
|
||||
|
||||
---
|
||||
|
||||
#### 7. StatBooster (MODULE_STATBOOSTER)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** API Mismatch
|
||||
**Issue:** Override signature mismatch on OnLootItem
|
||||
|
||||
**Details:** Hook signature doesn't match current AzerothCore API
|
||||
|
||||
**Fix Required:** Update to match current OnLootItem hook signature
|
||||
|
||||
---
|
||||
|
||||
#### 8. DungeonRespawn (MODULE_DUNGEON_RESPAWN)
|
||||
**Status:** 🔴 BLOCKED
|
||||
**Category:** API Mismatch
|
||||
**Issue:** Override signature mismatch on OnBeforeTeleport
|
||||
|
||||
**Details:** Hook signature doesn't match current AzerothCore API
|
||||
|
||||
**Fix Required:** Update to match current OnBeforeTeleport hook signature
|
||||
|
||||
---
|
||||
|
||||
## Working Alternatives
|
||||
|
||||
Some blocked modules have working alternatives:
|
||||
|
||||
| Blocked Module | Working Alternative | Status |
|
||||
|----------------|-------------------|--------|
|
||||
| mod-ahbot (C++) | MODULE_LUA_AH_BOT=1 | ✅ Available |
|
||||
|
||||
---
|
||||
|
||||
## .env Configuration
|
||||
|
||||
All blocked modules are disabled:
|
||||
|
||||
```bash
|
||||
# Build Failures - Compilation
|
||||
MODULE_AZEROTHSHARD=0 # Method name mismatch
|
||||
MODULE_CHALLENGE_MODES=0 # Override signature mismatch
|
||||
MODULE_LEVEL_GRANT=0 # Removed API usage
|
||||
|
||||
# Build Failures - Linker
|
||||
MODULE_AHBOT=0 # Missing script function (use lua version)
|
||||
MODULE_MULTIVENDOR=0 # Missing script function
|
||||
|
||||
# API Incompatibilities
|
||||
MODULE_POCKET_PORTAL=0 # C++20 requirement
|
||||
MODULE_STATBOOSTER=0 # Hook signature mismatch
|
||||
MODULE_DUNGEON_RESPAWN=0 # Hook signature mismatch
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Module Statistics
|
||||
|
||||
**Total Modules in Manifest:** ~93
|
||||
**Blocked Modules:** 8 (8.6%)
|
||||
**Available Modules:** 85 (91.4%)
|
||||
|
||||
### Breakdown by Category:
|
||||
- 🔴 Compilation Errors: 3 modules
|
||||
- 🔴 Linker Errors: 2 modules
|
||||
- 🔴 API Incompatibilities: 3 modules
|
||||
|
||||
---
|
||||
|
||||
## Verification Status
|
||||
|
||||
✅ **All checks passed:**
|
||||
|
||||
- ✅ All blocked modules have `status: "blocked"` in manifest
|
||||
- ✅ All blocked modules have documented `block_reason`
|
||||
- ✅ All blocked modules are disabled in `.env` (=0)
|
||||
- ✅ Module state regenerated excluding blocked modules
|
||||
- ✅ Build will not attempt to compile blocked modules
|
||||
|
||||
---
|
||||
|
||||
## Build Process
|
||||
|
||||
With all problematic modules blocked, the build should proceed cleanly:
|
||||
|
||||
```bash
|
||||
# 1. Clean any previous build artifacts
|
||||
docker compose down
|
||||
rm -rf local-storage/source/build
|
||||
|
||||
# 2. Module state is already generated (excluding blocked modules)
|
||||
# Verify: cat local-storage/modules/modules.env | grep MODULES_ENABLED
|
||||
|
||||
# 3. Build
|
||||
./build.sh --yes
|
||||
```
|
||||
|
||||
**Expected Result:** Clean build with 85 working modules
|
||||
|
||||
---
|
||||
|
||||
## For Module Developers
|
||||
|
||||
If you want to help fix these modules:
|
||||
|
||||
### Quick Fixes (1-2 hours each):
|
||||
|
||||
1. **mod-azerothshard**: Search/replace `getLevel()` → `GetLevel()` and similar
|
||||
2. **mod-level-grant**: Replace `ConfigMgr::GetBoolDefault` with current API
|
||||
|
||||
### Medium Fixes (4-8 hours each):
|
||||
|
||||
3. **mod-challenge-modes**: Update `OnGiveXP` signature to match current API
|
||||
4. **StatBooster**: Update `OnLootItem` signature
|
||||
5. **DungeonRespawn**: Update `OnBeforeTeleport` signature
|
||||
|
||||
### Complex Fixes (16+ hours each):
|
||||
|
||||
6. **mod-ahbot**: Debug why script loader function is missing or use Lua version
|
||||
7. **mod-multivendor**: Determine if module should be Lua-only
|
||||
8. **mod-pocket-portal**: Refactor C++20 features to C++17 or update build environment
|
||||
|
||||
---
|
||||
|
||||
## Testing After Fixes
|
||||
|
||||
If a module is fixed upstream:
|
||||
|
||||
```bash
|
||||
# 1. Update the module repository
|
||||
cd local-storage/staging/modules/mod-name
|
||||
git pull
|
||||
|
||||
# 2. Update manifest (remove block)
|
||||
# Edit config/module-manifest.json:
|
||||
# Change: "status": "blocked"
|
||||
# To: "status": "active"
|
||||
|
||||
# 3. Enable in .env
|
||||
# Change: MODULE_NAME=0
|
||||
# To: MODULE_NAME=1
|
||||
|
||||
# 4. Clean rebuild
|
||||
docker compose down
|
||||
rm -rf local-storage/source/build
|
||||
./build.sh --yes
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Maintenance
|
||||
|
||||
This document should be updated when:
|
||||
- Modules are fixed and unblocked
|
||||
- New problematic modules are discovered
|
||||
- AzerothCore API changes affect more modules
|
||||
- Workarounds or alternatives are found
|
||||
|
||||
---
|
||||
|
||||
**Last Verification:** 2025-11-14
|
||||
**Next Review:** After AzerothCore major API update
|
||||
Reference in New Issue
Block a user