Skip to content

Commit 98261d6

Browse files
author
InfoTech.io Bot
committed
docs(issue-10): update Stage 2 plan with correct problem analysis
The previous Stage 2 plan incorrectly assumed Hugo Templates Framework would successfully wget the base site. After analyzing failed runs, the root problem is that --preserve-base-site tries to download https://info-tech-io.github.io but fails with wget exit code 8. However, we already have the downloaded state in current-site from Phase 1! Key Updates: - Identify real problem: Hugo Templates Framework wget failure - Correct solution: Use --base-site-path=../current-site parameter - Pass existing current-site as local source instead of URL - Fix config and output paths for workflow compatibility This fixes preserve-base-site integration without changing strategy logic. Related: #10, Stage: 2 (Plan Update) Updates: 002-fix-build-logic.md with correct problem understanding
1 parent 7f8ab1d commit 98261d6

1 file changed

Lines changed: 38 additions & 31 deletions

File tree

docs/proposals/10-fix-incremental-deployment-logic/002-fix-build-logic.md

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@
88

99
## Overview
1010

11-
На основе анализа проблемы, корневая причина не в логике определения build targets,
12-
а в том, что workflow использует кастомную логику вместо встроенных возможностей
13-
Hugo Templates Framework для инкрементальных обновлений.
11+
**ОБНОВЛЕНО**: После анализа failed runs, корневая проблема в интеграции с Hugo Templates Framework.
1412

15-
**Решение**: Использовать `federated-build.sh --preserve-base-site` вместо кастомной логики:
13+
**Проблема**: Hugo Templates Framework с флагом `--preserve-base-site` пытается скачать базовый сайт
14+
через `wget https://info-tech-io.github.io`, но получает ошибки (rate limiting, временные сбои).
1615

17-
1. Заменить кастомные steps на вызов federated-build.sh
18-
2. Настроить modules.json конфигурацию
19-
3. Использовать preserve-base-site стратегию для инкрементальных обновлений
20-
4. Убрать кастомную "Atomic Merge" логику
16+
**Но у нас уже есть скачанное состояние** в `current-site` (Phase 1 workflow)!
17+
18+
**Правильное решение**: Настроить Hugo Templates Framework для использования уже скачанного `current-site`
19+
как local source для базового сайта вместо попыток wget URL.
20+
21+
**Ключевые изменения**:
22+
1. Использовать local source type для базового сайта в preserve-base-site стратегии
23+
2. Передать path к current-site директории вместо URL
24+
3. Убедиться что federated-build.sh корректно обрабатывает local base sites
25+
4. Сохранить существующую логику определения стратегий
2126

2227
---
2328

@@ -107,17 +112,16 @@ Hugo Templates Framework для инкрементальных обновлен
107112

108113
---
109114

110-
### Step 2.2: Update Workflow to Use Hugo Templates Framework
115+
### Step 2.2: Fix Hugo Templates Framework Integration
111116

112-
**Action**: Заменить кастомную логику на federated-build.sh
117+
**Action**: Исправить передачу базового сайта в preserve-base-site стратегии
113118

114119
**File**: `.github/workflows/deploy-github-pages.yml`
115120

116-
**Current Problematic Sections to Replace**:
117-
1. Lines 99-151: "Determine Build Targets" - удалить
118-
2. Lines 139-189: "Build Corporate Site" (conditional) - упростить
119-
3. Lines 194-248: "Build All Product Documentation" (conditional) - заменить
120-
4. Lines 344-425: "Atomic Merge - Combine All Content" - заменить
121+
**Проблема**: Hugo Templates Framework пытается `wget https://info-tech-io.github.io`
122+
но у нас уже есть скачанное состояние в `current-site` из Phase 1.
123+
124+
**Решение**: Передать `current-site` как local source в preserve-base-site стратегии.
121125

122126
**New Workflow Structure**:
123127
```yaml
@@ -200,22 +204,20 @@ Hugo Templates Framework для инкрементальных обновлен
200204
STRATEGY="${{ steps.build-strategy.outputs.strategy }}"
201205
202206
if [ "$STRATEGY" = "preserve-base-site" ]; then
203-
echo "🔄 Incremental build - preserving existing content"
207+
echo "🔄 Incremental build - using existing current-site as base"
208+
209+
# КЛЮЧЕВОЕ ИСПРАВЛЕНИЕ: Передать current-site как base-site-path
204210
./scripts/federated-build.sh \
205-
--config=../configs/federation-modules.json \
206-
--output=../federation-output \
211+
--config=../hub-repo/configs/documentation-modules.json \
212+
--output=../docs-build \
207213
--preserve-base-site \
214+
--base-site-path=../current-site \
208215
--verbose
209216
else
210217
echo "🔄 Full rebuild - building everything"
211-
# First, prepare corporate site as base
212-
if [ -d "../corporate-build" ]; then
213-
cp -r ../corporate-build ../federation-base
214-
fi
215-
216218
./scripts/federated-build.sh \
217-
--config=../configs/federation-modules.json \
218-
--output=../federation-output \
219+
--config=../hub-repo/configs/documentation-modules.json \
220+
--output=../docs-build \
219221
--verbose
220222
fi
221223
@@ -237,16 +239,21 @@ Hugo Templates Framework для инкрементальных обновлен
237239
echo "✅ Final site prepared"
238240
```
239241
242+
**Ключевые изменения**:
243+
1. **Добавлен параметр `--base-site-path=../current-site`** - это заставляет Hugo Templates Framework использовать уже скачанное состояние вместо попыток wget
244+
2. **Исправлен путь к config** - используется правильный путь `../hub-repo/configs/documentation-modules.json`
245+
3. **Исправлен output path** - используется `../docs-build` для совместимости с остальным workflow
246+
240247
**Verification**:
241-
- [ ] Workflow uses federated-build.sh
242-
- [ ] preserve-base-site flag used for incremental updates
243-
- [ ] Custom merge logic removed
248+
- [ ] Добавлен параметр --base-site-path=../current-site для preserve-base-site стратегии
249+
- [ ] Hugo Templates Framework больше не пытается wget URL
250+
- [ ] Используется уже скачанное состояние из Phase 1
244251
- [ ] Syntax is valid YAML
245252

246253
**Success Criteria**:
247-
- ✅ Workflow simplified and uses Hugo Templates Framework
248-
- ✅ Incremental logic handled by federated-build.sh
249-
- ✅ No custom merge operations
254+
- Hugo Templates Framework использует local base site вместо wget
255+
- Исправлена интеграция preserve-base-site стратегии
256+
- Устранена проблема "wget failed with exit code: 8"
250257

251258
---
252259

0 commit comments

Comments
 (0)