apache/sedona

pre-commit: validate-dependabot-yml flakes in CI on TLS reset to json.schemastore.org

已关闭

#2,866 创建于 2026年4月27日

 (0 条评论) (1 个反应) (1 位负责人)Scala (693 个派生)batch import
good first issuein progresspre-commit

仓库指标

星标
 (1,953 个星标)
PR 合并指标
 (平均合并 1天 3小时) (30 天内合并 35 个 PR)

描述

The validate-dependabot-yml pre-commit hook (powered by @bugron/validate-dependabot-yaml) fetches the JSON schema from https://json.schemastore.org/dependabot-2.0.json on every run. When the TLS handshake to schemastore.org is reset mid-connection, the whole pre-commit job fails with ECONNRESET, even though .github/dependabot.yml itself is valid.

This is a transient infrastructure failure that has nothing to do with the PR being checked, so it shows up as a flaky red on otherwise green CI runs.

Proposed fix

Replace the live-fetch validator with python-jsonschema/check-jsonschema's check-dependabot hook, which ships the schema bundled with the package — fully offline, no network at runtime, no flakes:

  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.30.0
    hooks:
      - id: check-dependabot
        name: validate dependabot.yml
        files: ^\.github/dependabot\.yml$

This is a drop-in replacement: same coverage (validates .github/dependabot.yml against the dependabot v2 schema), same trigger pattern, but no outbound HTTP from the hook.

贡献者指南