Skip to content

🏥 CI Failure Investigation - Run #17346237870: Code Formatting Check Failed #1544

Description

@github-actions

🏥 CI Failure Investigation - Run #17346237870

Summary

Daily Perf Improver workflow failed due to code formatting check failure in the build script.

Failure Details

  • Run: 17346237870
  • Commit: eaa9c4a
  • Trigger: workflow_dispatch
  • Workflow: Daily Perf Improver
  • Failed Job: daily-perf-improver
  • Failed Step: "Build the project ready for performance testing" (Step 4)

Root Cause Analysis

Primary Issue: Code formatting check failed during the build process.

Specific Error:

/home/runner/work/FSharp.Data/FSharp.Data/build/build.fs needs formatting
Target 'CheckFormat' failed

Build Process Context:

  1. The build system runs CheckFormat target before Build target
  2. The CheckFormat target uses Fantomas to verify code formatting
  3. The file build/build.fs was not properly formatted according to project standards
  4. This caused the entire build to fail with exit code 134

Failed Jobs and Errors

Job: daily-perf-improver (49246600572)

  • Status: Failed
  • Duration: ~42 seconds
  • Failed Target: CheckFormat
  • Error Message: Some files need formatting, run 'dotnet run --project build/build.fsproj -- -t Format' to format them

Key Error Details:

/home/runner/work/FSharp.Data/FSharp.Data/build/build.fs needs formatting
Finished (Failed) 'CheckFormat' in 00:00:02.3018544

Unhandled exception. Fake.Core.BuildFailedException: Target 'CheckFormat' failed.
---> System.AggregateException: One or more errors occurred. (Some files need formatting, run `dotnet run --project build/build.fsproj -- -t Format` to format them)
---> System.Exception: Some files need formatting, run `dotnet run --project build/build.fsproj -- -t Format` to format them
   at Build.buildscript@222-12.Invoke(TargetParameter _arg11) in /home/runner/work/FSharp.Data/FSharp.Data/build/build.fs:line 233

Investigation Findings

File Location

The problematic file is located at: build/build.fs:line 233

Build Process Flow

  1. Clean ✅ (Success) - 00:00:00.0182689
  2. AssemblyInfo ✅ (Success) - 00:00:00.0145871
  3. CheckFormat ❌ (Failed) - 00:00:02.3017273
  4. Build ⏭️ (Skipped due to CheckFormat failure)

Context from Commit

The failure occurred on commit eaa9c4a which was a merge commit:

"Merge pull request #1539 from fsprojects/daily-test-improver/worldbank-coverage
Daily Test Coverage Improver: Massive improvement to WorldBank Core coverage (36.7% → 83.1%)"

This suggests that recent changes to the build script may have introduced formatting issues.

Recommended Actions

Immediate Fix ✅ High Priority

  • Run formatting command: dotnet run --project build/build.fsproj -- -t Format
  • Verify formatting: dotnet run --project build/build.fsproj -- -t CheckFormat
  • Commit the formatted code if changes are made

Root Cause Resolution

Verification Steps

# 1. Format the problematic file
dotnet run --project build/build.fsproj -- -t Format

# 2. Verify formatting is correct
dotnet run --project build/build.fsproj -- -t CheckFormat

# 3. Run the full build to ensure it works
dotnet run --project build/build.fsproj -- -t Build

Prevention Strategies

Short-term

  • Pre-commit hooks: Consider adding Fantomas formatting check as a git pre-commit hook
  • Editor integration: Ensure development environment auto-formats F# code on save
  • PR requirements: Add formatting check as a required status check for pull requests

Long-term

  • Automated formatting: Consider auto-formatting in CI and committing changes back
  • Documentation: Update contributor guidelines to mention formatting requirements
  • IDE templates: Provide consistent editor configurations (.editorconfig updates)

AI Team Self-Improvement

Additional prompting instructions for AI coding agents:

When working with F# projects that use FAKE build system:
1. ALWAYS run `dotnet run --project build/build.fsproj -- -t CheckFormat` before committing changes
2. If formatting fails, run `dotnet run --project build/build.fsproj -- -t Format` to fix formatting
3. After making changes to build/build.fs, verify it follows project formatting standards
4. Include formatting verification in your testing workflow for F# projects
5. Check for .editorconfig and Fantomas configuration files to understand formatting rules

Historical Context

Pattern Recognition: This is a Code Quality/Formatting Issue - a common CI failure pattern where:

  • Build process includes automated code quality checks
  • Formatting standards are enforced via build pipeline
  • Manual code changes bypass local formatting checks
  • CI catches formatting inconsistencies that local development missed

Similar Issues: Based on repository analysis, this project has strict formatting requirements using Fantomas, and formatting checks are integrated into the build process as a quality gate.

Prevention Track Record: The project already has good formatting infrastructure in place, but this failure suggests either:

  1. Recent changes weren't properly formatted before commit
  2. Possible changes to formatting rules/configuration
  3. Manual editing that bypassed automated formatting tools

Impact Assessment

  • Severity: Medium - Blocks Daily Perf Improver workflow but doesn't affect production code
  • Scope: Limited to CI pipeline, no user-facing impact
  • Urgency: Low - Can be resolved with simple formatting fix
  • Effort: Minimal - Single command execution should resolve

AI-generated content by CI Failure Doctor may contain mistakes.

Activity

  1. github-actions commented on Aug 30, 2025

    @github-actions
    ContributorAuthor

    🔄 Duplicate Failure - Run #17346262619

    Another instance of the same code formatting failure occurred in the Daily Test Coverage Improver workflow:

    • Run: 17346262619
    • Workflow: Daily Test Coverage Improver (vs Daily Perf Improver in original)
    • Commit: Same commit eaa9c4ae6d75fa757604dc99ef19d0443c29620f
    • Error: Identical - build/build.fs needs formatting

    Key Observations

    Pattern Confirmation: This failure is now affecting multiple workflows on the same commit, confirming this is a systemic formatting issue in the build script, not specific to individual workflows.

    Affected Workflows:

    1. Daily Perf Improver (Original issue) - Run #17346237870
    2. Daily Test Coverage Improver (This instance) - Run #17346262619

    Same Root Cause

    The issue remains in build/build.fs:line 233 where the formatting check fails during the CheckFormat target.

    Error Pattern:

    Target 'CheckFormat' failed.
    /home/runner/work/FSharp.Data/FSharp.Data/build/build.fs needs formatting
    Some files need formatting, run `dotnet run --project build/build.fsproj -- -t Format` to format them
    

    Impact

    This formatting issue is now blocking multiple automated workflows that depend on successful builds, suggesting this should be prioritized for resolution.

    The fix remains the same: run dotnet run --project build/build.fsproj -- -t Format to address the formatting violations.


    AI-generated content by CI Failure Doctor may contain mistakes.

  2. github-actions commented on Aug 30, 2025

    @github-actions
    ContributorAuthor

    🔄 Duplicate Workflow Failure Detected

    Investigation Update for Run #17346288009

    I've analyzed workflow run #17346288009 and confirmed this is a duplicate of the same underlying issue reported in this issue.

    Key Details

    • New Run ID: 17346288009
    • Previous Run ID: 17346237870 (original failure)
    • Same Commit: eaa9c4ae6d75fa757604dc99ef19d0443c29620f
    • Same Error: build/build.fs needs formatting
    • Same Job: daily-perf-improver (ID: 49246706667 vs 49246600572)

    Identical Failure Pattern

    Both workflow runs show the exact same issue:

    CheckFormat target failed
    /home/runner/work/FSharp.Data/FSharp.Data/build/build.fs needs formatting
    Exit code: 134 (SIGABRT)
    Error: Some files need formatting, run 'dotnet run --project build/build.fsproj -- -t Format' to format them

    Analysis Confirmation

    This confirms the root cause analysis in this issue is accurate and the recommended fix remains the same:

    1. Immediate Fix: dotnet run --project build/build.fsproj -- -t Format
    2. Verification: dotnet run --project build/build.fsproj -- -t CheckFormat
    3. Commit formatted changes

    Status

    Since this is a duplicate of an already tracked issue, no separate issue is needed for run #17346288009. The fix for this issue will resolve both workflow failures.


    AI-generated content by CI Failure Doctor may contain mistakes.

  3. github-actions commented on Aug 30, 2025

    @github-actions
    ContributorAuthor

    🔄 Duplicate Failure Detected - Run #17346306359

    Same formatting issue occurred again in workflow run #17346306359 on PR #1543:

    • Branch: perf/json-parsing-optimization
    • Commit: f0d4a488fbe3487285edc3927b4a178e0b8b20bd
    • Failed Jobs: Both build-windows and build-ubuntu
    • Error: Identical formatting failure in build/build.fs

    Key Pattern Recognition

    This is the second occurrence of the exact same formatting issue within hours, confirming this is a systemic problem where:

    1. Build script modifications are not being properly formatted before commits
    2. The formatting check is correctly catching these issues in CI
    3. Multiple branches are affected by the same root cause

    Immediate Impact

    Investigation Status

    ✅ DUPLICATE CONFIRMED - No new issue creation needed. Root cause and solution already documented in this issue.


    AI-generated content by CI Failure Doctor may contain mistakes.

  4. github-actions commented on Aug 30, 2025

    @github-actions
    ContributorAuthor

    🔄 Duplicate Occurrence - Run #17346331925

    This is a recurring issue - the same formatting problem occurred again in workflow run #17346331925.

    Key Details for New Failure:

    • Run: #28
    • Workflow: Daily Perf Improver (vs previous Daily Test Coverage Improver)
    • Same Root Cause: build/build.fs needs formatting
    • Same Error: CheckFormat target failed
    • Same Fix Needed: Run formatting command

    Pattern Analysis:

    This confirms that build/build.fs formatting issues are recurring and suggests:

    1. The original formatting fix may not have been applied
    2. New commits are still introducing formatting violations
    3. Pre-commit formatting checks are not preventing this issue

    Recommended Action:

    Since this is the same issue recurring, the immediate fix remains:

    dotnet run --project build/build.fsproj -- -t Format

    Prevention Note:

    The recurrence suggests we need stronger prevention measures beyond just fixing the formatting - perhaps:

    • Mandatory pre-commit formatting hooks
    • Required formatting status checks on all PRs
    • Auto-formatting in CI with commit-back capability

    AI-generated content by CI Failure Doctor may contain mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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