发布

  • [OPIK-2414] [CI] Fix ClickHouse workflow fetch-depth issue for pushes to main (#3332)

    frostbyte_neo 发布于 2025-09-19 11:43:23 +00:00

    • [OPIK-2414] [CI] Fix ClickHouse workflow fetch-depth issue for pushes to main

    Replace git diff with GitHub API for detecting changed migration files on pushes.
    The original implementation used 'git diff HEAD1..HEAD' which fails when
    fetch-depth=1 because HEAD
    1 doesn't exist in shallow clones.

    Changes:

    • Use GitHub API for both PR and push scenarios
    • Remove dependency on git history for file detection
    • Maintain consistent filtering logic across both cases
    • Keep fetch-depth=1 for performance

    Implements OPIK-2414: Fix ClickHouse migration cluster check workflow issue

    • Revision 2: Fix GitHub API endpoint and jq filter for commit files

    Address critical bug identified in PR review:

    • Fix invalid endpoint: /commits/{sha}/files → /commits/{sha}
    • Fix jq filter: .[] → .files[] to access nested files array
    • Maintain single-commit validation approach for pushes to main

    Resolves Cursor[bot] review comment about invalid API endpoint.

    下载附件