Repository navigation
fix(CI, docs): פריסה או בנייה של אתר התיעוד שנכשלו אחרי מיזוג מגיעות לטלגרם - #3757
Conversation
…לטלגרם השומר של אינדקס התיעוד (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
|
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 |
|
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. |
|
Warning Review limit reachedYou'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. View limit details
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. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
🧯 Dangerous deletes guard reportPolicy: see .cursorrules — dangerous deletions are blocked unless wrapped safely. Summary:
Flagged findings (file:line:snippet): Excluded matches (by path pattern) |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Mergestorm reviews this repository's pull requestsEvery 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 The Starter plan includes 120 credits a month. |
There was a problem hiding this comment.
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-indexifcondition, new Telegram alert step for deploy failure,notify-failuregains checkout + Telegram alert step,github.refguard moved from step to jobif.tests/_workflow_conditions.py— New file: a mini-interpreter for GitHub Actionsifexpressions 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.
⏱️ Performance report(No performance test durations collected. Mark tests with |
📖 Documentation PreviewThe documentation has been built successfully!
To view locally:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
✨ תיאור קצר
ב-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
📝 סוג שינוי
✅ צ'קליסט
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, שרץ אחרי פריסה מוצלחת של האתר, כשהייצוא הצליח"🧩 השפעות/סיכונים
mainשום דבר לא משתנה: השומר מדולג כמו קודם.notify-failureכבר לא עולה על runner בכשל של PR. קודם הוא רץ ודילג על הצעד היחיד שלו.deploy-docsנכשל, גם ב-releaseוב-workflow_dispatchעםdeploy=true.🔗 קישורים
docs/whats-new/2026-11.rst(אינדקס החיפוש בתיעוד שלא התעדכן אחרי פריסה)🧯 סיכון / החזרה לאחור (Rollback)
Generated by Claude Code