Skip to content

Drift workflow crashes creating large issues: gh body passed via argv exceeds ARG_MAX #304

Description

@sdairs

The scheduled OpenAPI drift check failed today: https://github.com/ClickHouse/clickhousectl/actions/runs/29905793331/job/88876797296

The analyzer worked (155 actionable findings), but create_issue() in scripts/check-openapi-drift.py passes the rendered issue body to gh issue create as a command-line argument. With 155 findings (including embedded spec JSON fragments) the body exceeded Linux's per-argument limit (~128 KiB), so spawning gh failed with OSError: [Errno 7] Argument list too long — and no drift issue was filed despite real drift.

Two fixes needed:

  1. Pass the body via stdin (gh issue create --body-file -) instead of argv.
  2. Truncate oversized bodies to fit GitHub's 65,536-character issue body limit (a 128 KiB+ body would be rejected by the API even via --body-file), with a notice pointing at python3 scripts/check-openapi-drift.py --dry-run for the full report.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions