Skip to content

Update Artifact Handling and Add PR Trigger to Error Analysis Workflow#6

Merged
backup-bdg-2 merged 2 commits into
mainfrom
mentat-1-3-improve-artifact-handling
Apr 25, 2025
Merged

Update Artifact Handling and Add PR Trigger to Error Analysis Workflow#6
backup-bdg-2 merged 2 commits into
mainfrom
mentat-1-3-improve-artifact-handling

Conversation

@mentatbot
Copy link
Copy Markdown

@mentatbot mentatbot Bot commented Apr 25, 2025

This PR updates the existing error analysis system with improved artifact handling and adds a direct PR trigger:

  1. Enhanced Artifact Handling:

    • Updated download-artifacts.sh with better log file detection
    • Added multiple fallback mechanisms for finding build logs
    • Improved handling of multiple artifact formats
    • Added automatic log file combination for comprehensive analysis
  2. Direct PR Trigger:

    • Added pull_request trigger alongside the existing workflow_run trigger
    • Added a dedicated job for analyzing PRs directly
    • Builds the project and analyzes errors in a single workflow
  3. Better Maintainability:

    • Moved more inline code from the workflow file to scripts
    • Improved error handling and log output
    • Added better fallback mechanisms when resources are missing

These changes make the error analysis system more reliable by ensuring it finds and analyzes logs in more situations, and make the system easier to maintain by moving complex logic out of the workflow file into dedicated scripts.


🤖 See my steps and cost here

#1

  • Wake on any new activity.

mentatbot Bot added 2 commits April 25, 2025 07:07
This PR updates the existing error analysis system with improved artifact handling and adds a direct PR trigger:

1. **Enhanced Artifact Handling**:
   - Updated `download-artifacts.sh` with better log file detection
   - Added multiple fallback mechanisms for finding build logs
   - Improved handling of multiple artifact formats
   - Added automatic log file combination for comprehensive analysis

2. **Direct PR Trigger**:
   - Added pull_request trigger alongside the existing workflow_run trigger
   - Added a dedicated job for analyzing PRs directly
   - Builds the project and analyzes errors in a single workflow

3. **Better Maintainability**:
   - Moved more inline code from the workflow file to scripts
   - Improved error handling and log output
   - Added better fallback mechanisms when resources are missing

These changes make the error analysis system more reliable by ensuring it finds and analyzes logs in more situations, and make the system easier to maintain by moving complex logic out of the workflow file into dedicated scripts.
@mentatbot mentatbot Bot requested a review from backup-bdg-2 April 25, 2025 07:18
@mentatbot
Copy link
Copy Markdown
Author

mentatbot Bot commented Apr 25, 2025

Enhanced Artifact Handling and PR Trigger

This PR updates the existing build error analysis system to:

1. Improve Artifact Handling

I've enhanced the existing download-artifacts.sh script with:

  • Robust log file detection that can find logs regardless of naming
  • Intelligent content-based log identification (looks for error patterns)
  • Multiple fallback mechanisms when primary log files aren't found
  • Automatic log combination for comprehensive analysis

2. Add Direct PR Trigger

Added pull_request trigger to existing workflow with:

  • Separated jobs for PR vs. workflow-run analysis
  • Direct build and analysis in the PR context
  • Clear output and summary generation

3. Move Code to Scripts

Created dedicated scripts to clean up the workflow file:

  • workflows/download-workflow-artifacts.sh - Handles artifact download
  • workflows/check-build-logs.sh - Validates log files
  • workflows/find-pr-number.sh - Extracts PR numbers from workflow runs
  • workflows/build-project.sh - Handles project building
  • workflows/analyze-errors.sh - Runs the error analysis

These changes ensure the error analysis system is more reliable at finding and analyzing logs, while making the workflow file much cleaner and more maintainable.

@backup-bdg-2 backup-bdg-2 merged commit 3aa768c into main Apr 25, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant