Public Access
fix: remove dead definitionParser reference in RepositorySynchronizer
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
The definitionParser property was never initialized or implemented. synchronizeRepository() crashed with "Call to a member function parseForPlatform() on null". Replaced with direct use of getSharedWorkflows() which provides all files to sync.
This commit is contained in:
@@ -173,37 +173,15 @@ class RepositorySynchronizer
|
|||||||
$platform = $this->detectPlatform($repoInfo);
|
$platform = $this->detectPlatform($repoInfo);
|
||||||
$this->logger->logInfo("Detected platform for {$repo}: {$platform}");
|
$this->logger->logInfo("Detected platform for {$repo}: {$platform}");
|
||||||
|
|
||||||
// Load file list from the Terraform definition for this platform
|
// Load shared workflows and config files for this platform from templates
|
||||||
$filesToSync = $this->definitionParser->parseForPlatform($platform, $repoRoot);
|
$filesToSync = $this->getSharedWorkflows($platform, $repoRoot);
|
||||||
|
$sharedTotal = count($filesToSync);
|
||||||
// Append shared workflows — the parser can't extract them from nested
|
|
||||||
// subdirectories blocks due to heredoc interference in .tf files.
|
|
||||||
$sharedFiles = $this->getSharedWorkflows($platform, $repoRoot);
|
|
||||||
|
|
||||||
// Deduplicate by destination — shared workflows take precedence over parser entries
|
|
||||||
$seen = [];
|
|
||||||
foreach ($filesToSync as $f) {
|
|
||||||
$seen[$f['destination']] = true;
|
|
||||||
}
|
|
||||||
foreach ($sharedFiles as $f) {
|
|
||||||
if (!isset($seen[$f['destination']])) {
|
|
||||||
$filesToSync[] = $f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$defCount = count($filesToSync) - count($sharedFiles);
|
|
||||||
$sharedAdded = count($filesToSync) - $defCount;
|
|
||||||
$sharedTotal = count($sharedFiles);
|
|
||||||
$this->logger->logInfo(
|
$this->logger->logInfo(
|
||||||
"Loaded " . count($filesToSync) . " sync entries for {$platform}"
|
"Loaded {$sharedTotal} sync entries for {$platform}"
|
||||||
. " (def={$defCount}, shared={$sharedAdded}/{$sharedTotal} added, "
|
|
||||||
. ($sharedTotal - $sharedAdded) . " deduped)"
|
|
||||||
);
|
);
|
||||||
// Log shared workflow destinations for debugging
|
foreach ($filesToSync as $sf) {
|
||||||
foreach ($sharedFiles as $sf) {
|
|
||||||
$dest = $sf['destination'] ?? '?';
|
$dest = $sf['destination'] ?? '?';
|
||||||
$added = !isset($seen[$dest]) ? 'ADDED' : 'DEDUPED';
|
$this->logger->logInfo(" sync: {$dest}");
|
||||||
$this->logger->logInfo(" shared: {$dest} [{$added}]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($filesToSync)) {
|
if (empty($filesToSync)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user