Decide how to surface Sphinx diagnostics in GitHub Actions annotations

未关闭
#1,009 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, python

调研方向

This is a design decision, not a ready change. Start with the options table and the cli.py entry point, then check how GitHub CI detection reaches both bazel run doc builds and sandboxed Needs inventory builds. Done means one approach is chosen, its ownership and covered execution paths are recorded, and the decision is agreed in the thread before any implementation.

由索引模型根据 Issue 内容生成。

描述

Why

Documentation failures should surface their actual Sphinx/Needs diagnostics in GitHub Actions annotations, including source location when possible. Currently, a failed downstream job may expose only Process completed with exit code 1. as an annotation.

Example: https://github.com/eclipse-score/docs-as-code/actions/runs/41424127388/job/125206492378?pr=1008

The underlying diagnostics in that job are Needs link-condition warnings in three score_platform verification reports. The pytest failure and Bazel action failure only report the resulting unsuccessful build.

Decision to make

Where should the Sphinx-to-GitHub integration live? Keep general Bazel diagnostic handling separate: it needs a solution that also serves non-documentation builds.

Option Benefit Cost / constraint
Register a Sphinx problem matcher directly in workflows Leaves Sphinx output unchanged; no CLI integration Registration and matcher availability must be added and maintained across multiple workflows (docs.yml, downstream tests, integration tests, etc.); consumers using the shared workflow do not need per-repository changes
Provide a shared setup action containing the matcher Central definition and registration logic Introduces another action and still requires workflow adoption
Register a bundled matcher from cli.py Automatic adoption through the docs-as-code version; unchanged Sphinx diagnostics The runner must be able to read the JSON path emitted by the CLI, including sandboxed Needs builds; repeated registration needs consideration
Add a Sphinx logging handler emitting GitHub workflow commands Uses structured diagnostics; no matcher file or extra workflow step Adds a GitHub-specific adapter; requires escaping and source-path handling
Parse build output in a CI wrapper and emit annotations Keeps GitHub integration outside the documentation runtime Requires workflow adoption and text parsing; must preserve streaming output and exit status

Preference expressed so far: avoid introducing an extra action. No implementation decision yet. The logging-handler approach is a candidate for the smallest integration, subject to checking the execution paths below.

Checks before deciding

  • Cover both bazel run documentation builds and sandboxed Needs inventory builds, including downstream tests. Check how GitHub CI detection reaches each process.
  • Preserve normal console diagnostics and build exit status.
  • For sources in the checked-out repository, resolve paths to useful file/line annotations. For external sources, retain the original source path in the message when a checkout-relative link is unavailable.
  • Avoid duplicate annotations and correctly escape any emitted workflow commands.
  • Decide how warnings treated as errors should appear, so the reason for a failed build remains visible.

Outcome: choose one approach and record its ownership and the execution paths it covers. Implement general Bazel annotations separately.

主要语言
Python
星标
11
派生
39
平均合并
1 天 13 小时
30 天内合并 PR
65

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-score/docs-as-code 的其他 Issue

查看 eclipse-score/docs-as-code 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。