Skip to content

fix(CI, docs): פריסה או בנייה של אתר התיעוד שנכשלו אחרי מיזוג מגיעות לטלגרם - #3757

Merged
amirbiron merged 2 commits into
mainfrom
claude/inspiring-fermat-8qwein
Nov 29, 2026
Merged

amirbiron merged 2 commits into
mainfrom
claude/inspiring-fermat-8qwein

Conversation

@amirbiron

@amirbiron amirbiron commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

✨ תיאור קצר

ב-28.11 הג'וב "🚀 Deploy to GitHub Pages" נכשל אחרי מיזוג ל-main. האינדקס של החיפוש בתיעוד נשאר על קומיט ישן כמה שעות, ולא הגיעה שום התראה לטלגרם. אחרי השינוי: כשהפריסה נכשלת, השומר של האינדקס (check-docs-index) רץ ושולח מיד התראה עם קישור לריצה, בלי להריץ את scripts/docs_index_check.py. וכשהבנייה של main נכשלת, ההתראה נשלחת מ-notify-failure, לפני האישו שהוא כבר פתח.

למה זה קרה: ב-if של השומר לא הייתה פונקציית מצב. במצב כזה GitHub מוסיף success() בעצמו, וג'וב שאחד מה-needs שלו נכשל או דולג — מדולג. אותו חור היה בכשל של הבנייה: כשל בכל צעד של build-docs ב-main דילג על הפריסה ועל השומר, ו-notify-failure פתח רק אישו.

📦 שינויים עיקריים

  • קוד (Backend)

  • בוט טלגרם

  • מסד נתונים/מיגרציות

  • תיעוד (docs/)

  • DevOps/CI/CD

  • check-docs-index — ה-if החדש: !cancelled() && (needs.deploy-docs.result == 'failure' || (needs.deploy-docs.result == 'success' && needs.build-docs.outputs.sections_export == 'success')). צעד חדש, אחרי ה-checkout, שולח התראה כשהפריסה נכשלה. setup-python והבדיקה עצמה רצים רק כשהפריסה הצליחה.

  • notify-failure — checkout, ואחריו צעד התראה לטלגרם, לפני יצירת האישו. התנאי github.ref == 'refs/heads/main' עבר מהצעד אל ה-if של הג'וב, כדי שלא יהיו שני עותקים שלו.

  • סטייה מהבריף: הבריף הציע להוסיף !cancelled() && ל-if הקיים. זה לבד היה שובר דבר אחר: !cancelled() מבטל את ה-success() האוטומטי, וב-PR הפריסה מדולגת (skipped) והייצוא מצליח, ולכן השומר היה רץ בכל PR ומחכה עד DEADLINE_SECONDS לקומיט שלא נפרס. לכן ה-if בודק את התוצאה של הפריסה במפורש, success או failure.

  • בדיקות — tests/_workflow_conditions.py מעריך תנאי if לפי מה שהם עושים ב-GitHub, ולא משווה טקסט. המקורות שלו: התיעוד של GitHub (expressions, workflow-syntax, contexts), הקוד של actions/runner (איך failure() עובד בתוך צעד), והמפרש של GitHub ל-expressions (actions/languageservices: קדימות וקיצור). tests/test_docs_pipeline_alerts.py מריץ את כל הצינור של push ל-main, מכשיל כל צעד שרץ בו, אחד בכל פעם, וגם את הפריסה, ובודק שכל כשל שולח התראה אחת בדיוק.

  • תיעוד — הפריט "הבדיקה שאחרי הפריסה" בסעיף docs-index (docs/webapp/global-search.rst), ורשומה ביומן העדכונים (29.11).

🧪 בדיקות

  • Unit

  • Integration

  • Manual

  • הטסטים החדשים נכשלים בלי התיקון: מול ה-workflow הישן נכשלו 9 מתוך 23, בדיוק אלה שנוגעים לפריסה או לבנייה שנכשלו. המטריצה הדפיסה שכשל בכל צעד של build-docs ובפריסה שלח 0 התראות.

  • שלוש המלכודות מהבריף נתפסות במוטציות: !cancelled() לבד (3 טסטים נכשלים, ובהם ה-PR), always() במקום !cancelled() (נכשל התרחיש של ריצה שבוטלה), והתראה על "כל מה שאינו success" (5 נכשלים).

  • actionlint 1.7 עובר נקי על ה-workflow. מוטציה שמפנה לג'וב שאינו ב-needs נתפסה, כלומר הבדיקה שלו אמיתית.

  • רצו ועברו גם test_docs_index_check.py, test_docs_export_sections.py, test_docs_pr_build_fails_on_warnings.py, test_update_log_pages.py, test_docs_index_docs.py, test_workflow_runner_labels.py ועוד, כ-350 טסטים. flake8 נקי על הקבצים שנגעתי בהם.

  • מה לא אומת בפועל: את הענפים של פריסה שנכשלה ובנייה שנכשלה ב-main אי אפשר להריץ בלי להכשיל את main. הם מאומתים מול המודל ומול המקורות, לא בריצה אמיתית. ה-PR הזה כן מריץ את documentation.yml, ושם אפשר לראות את הענף של PR בפועל: check-docs-index ו-notify-failure אמורים להיות מדולגים.

🧪 בדיקות נדרשות ב‑PR

  • 🔍 Code Quality & Security
  • Unit Tests (3.11)
  • Unit Tests (3.12)
  • Unit Tests md-heavy (3.11)
  • Unit Tests md-heavy (3.12)

📝 סוג שינוי

  • feat: פיצ'ר חדש
  • fix: תיקון באג
  • docs: שינוי תיעוד בלבד
  • refactor: שינוי קוד ללא שינוי התנהגות
  • perf: שיפור ביצועים
  • chore/ci: תשתית/CI
  • breaking change: שינוי שובר תאימות

✅ צ'קליסט

  • הקוד עוקב אחרי הסגנון (flake8)
  • בדיקות רצות ועוברות
  • תיעוד עודכן (Docs)
  • אין סודות/מפתחות בקוד
  • אין מחיקות מסוכנות/פעולות על root
  • הודעת הקומיט תואמת Conventional Commits
  • CHANGELOG עודכן (docs/whats-new/2026-11.rst, 29.11)
  • עיינתי במסמכי אתר התיעוד — נתיב: docs/webapp/global-search.rst (סעיף docs-index), docs/doc-authoring.rst ("רשומה ב-What’s New", "ספירות בפרוזה"), docs/versioning-stable-anchors.rst, docs/ci-cd.rst | המשפט: "הג'וב check-docs-index ב-documentation.yml, שרץ אחרי פריסה מוצלחת של האתר, כשהייצוא הצליח"

🧩 השפעות/סיכונים

  • אין השפעה על הבוט, על הוובאפ או על הפרודקשן. השינוי רק ב-CI של התיעוד.
  • ב-PR וב-push לענף שאינו main שום דבר לא משתנה: השומר מדולג כמו קודם.
  • notify-failure כבר לא עולה על runner בכשל של PR. קודם הוא רץ ודילג על הצעד היחיד שלו.
  • ההתראה על פריסה שנכשלה נשלחת על כל ריצה שבה deploy-docs נכשל, גם ב-release וב-workflow_dispatch עם deploy=true.

🔗 קישורים

  • תקלה קודמת מאותו סוג: הרשומה מ-13.11.2026 ב-docs/whats-new/2026-11.rst (אינדקס החיפוש בתיעוד שלא התעדכן אחרי פריסה)

🧯 סיכון / החזרה לאחור (Rollback)

  • Revert של הקומיט. אין מצב שמור ואין מיגרציה.

Generated by Claude Code

View guided diff Turn on auto-fix

…לטלגרם

השומר של אינדקס התיעוד (check-docs-index) רץ גם כשהפריסה נכשלה, ושולח מיד
התראה בלי להריץ את scripts/docs_index_check.py. ה-if נוקב בתוצאה של הפריסה
במפורש (success / failure), כי !cancelled() מבטל את ה-success() שנוסף,
ובלי זה השומר היה רץ בכל PR, שבו הפריסה מדולגת.

כשל בבנייה של main שולח התראה מ-notify-failure, לפני האישו.

tests/test_docs_pipeline_alerts.py מעריך את התנאים של הג'ובים והצעדים
(tests/_workflow_conditions.py) ומכשיל כל צעד בצינור של main, אחד בכל פעם.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1fTK47fu3VBJKP9pVARXK
@sourcery-ai

sourcery-ai Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Sorry @amirbiron, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 3 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@amazon-q-developer

Copy link
Copy Markdown

Warning

Amazon Q Developer for GitHub: end of support

On January 30, 2027, AWS will discontinue support for the Amazon Q Developer for GitHub App. New app installations will no longer be available starting November 18, 2026.

For capabilities similar to the Amazon Q Developer for GitHub App, explore Kiro and the Kiro GitHub App. For more information about the end of support, see Amazon Q Developer end-of-support announcement on the AWS DevOps Blog.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8ac4c2f8-2f44-4177-9a57-01d7aa030fd8
Commits

Reviewing files that changed from the base of the PR and between be5dc93 and 1e13fc8.

Files selected for processing: 6

  • .github/workflows/documentation.yml
  • docs/webapp/global-search.rst
  • docs/whats-new/2026-11.rst
  • tests/_workflow_conditions.py
  • tests/test_docs_index_check.py
  • tests/test_docs_pipeline_alerts.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🧯 Dangerous deletes guard report

Policy: see .cursorrules — dangerous deletions are blocked unless wrapped safely.

Summary:

  • Flagged findings (blocking): 0
    0
  • Excluded matches (not blocking): 14
  • Total matches (all files): 128

Flagged findings (file:line:snippet):
(none)

Excluded matches (by path pattern)
./docs/Makefile:24:	rm -rf $(BUILDDIR)
./docs/DOCUMENTATION_GUIDE.md:453:rm -rf _build
./Dockerfile:67:    rm -rf /var/lib/apt/lists/*; \
./Dockerfile:162:    rm -rf /var/lib/apt/lists/*; \
./webapp/static/js/md_preview.bundle.js.map:4:  "sourcesContent": ["// Markdown-it plugin to render GitHub-style task lists; see\n//\n// https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments\n// https://github.com/blog/1825-t … [truncated]
./node_modules/mermaid/dist/mermaid.min.js:1524:`,"getStyles"),c1e=RQe});var h1e={};dr(h1e,{diagram:()=>NQe});var NQe,f1e=N(()=>{"use strict";$ge();a1e();l1e();u1e();NQe={parser:Fge,db:n1e,renderer:o1e,styles:c1e}});var m1e,g1e=N(()=>{"use  … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequen … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs:1:var r={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graph … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.core/chunk-KS23V3DP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence  … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm/chunk-2M32CCKP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence d … [truncated]
./node_modules/mermaid/dist/mermaid.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values for tr … [truncated]
./node_modules/mermaid/dist/mermaid.min.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values fo … [truncated]
./node_modules/katex/src/fonts/Makefile:139:	rm -rf pfa ff otf ttf woff woff2
./node_modules/katex/package.json:153:    "build": "rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c --failAfterWarnings && webpack && node update-sri.js package dist/README.md",

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T00:46:25.965581Z 37eec01 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mergestorm-vortex

mergestorm-vortex Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Mergestorm reviews this repository's pull requests

Every PR gets AI code review that flags real bugs before they merge. This account's 30 free credits for this monthly window are used, so reviews are paused at 1e13fc8 and resume automatically on Dec 5 (UTC).

The Starter plan includes 120 credits a month.

Upgrade for more reviews →

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Summary

This PR fixes two silent-failure gaps in the documentation CI pipeline: check-docs-index was silently skipping when deploy-docs failed (missing status function caused GitHub to inject success() automatically), and notify-failure sent no Telegram alert on build-docs failures — only creating an issue.

Changes reviewed:

  • .github/workflows/documentation.yml — check-docs-index if condition, new Telegram alert step for deploy failure, notify-failure gains checkout + Telegram alert step, github.ref guard moved from step to job if.
  • tests/_workflow_conditions.py — New file: a mini-interpreter for GitHub Actions if expressions that evaluates semantics rather than comparing raw text.
  • tests/test_docs_pipeline_alerts.py — New file: end-to-end pipeline scenario tests covering every single failure path.
  • tests/test_docs_index_check.py — Updated assertions to match new job structure.

Assessment: The logic is correct. The new if condition on check-docs-index correctly handles all four deploy outcomes (success/failure/skipped/cancelled) with explicit checks rather than relying on GitHub's implicit success() injection. The _workflow_conditions.py interpreter accurately models GitHub's short-circuit evaluation, case-insensitive string comparison, and the distinction between success() (direct needs only) vs failure() (all ancestors). The test matrix approach in test_every_single_failure_on_main_sends_one_alert provides strong regression coverage. No blocking issues found.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@gitar-bot

gitar-bot Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Gitar is working

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Gitar

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

⏱️ Performance report

(No performance test durations collected. Mark tests with @pytest.mark.performance.)

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

The documentation has been built successfully!

To view locally:

  1. Download the artifacts
  2. Extract the zip file
  3. Open index.html in your browser

@codecov

codecov Bot commented Nov 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@amirbiron
amirbiron merged commit 49be98e into main Nov 29, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants