Skip to content

feat: add release workflow monitoring and validation scripts#47

Open
technicalpickles wants to merge 1 commit intomainfrom
add-release-monitoring
Open

feat: add release workflow monitoring and validation scripts#47
technicalpickles wants to merge 1 commit intomainfrom
add-release-monitoring

Conversation

@technicalpickles
Copy link
Copy Markdown
Owner

Overview

This PR adds comprehensive monitoring scripts to track GitHub Actions release workflows and automatically validate the new bundle-based signing process.

🔍 New Scripts

scripts/monitor-release-workflow.sh

  • Purpose: Monitor GitHub Actions release workflow until completion
  • Features:
    • ✅ Smart detection of in-progress vs new workflows
    • ✅ Real-time job status reporting
    • ✅ Configurable timeouts and polling intervals
    • ✅ Robust error handling with colored output
    • ✅ Detailed progress tracking

scripts/monitor-and-validate-release.sh

  • Purpose: End-to-end monitoring and validation workflow
  • Features:
    • ✅ Automatic signature validation after release completion
    • ✅ Clear next steps for aqua registry submission
    • ✅ Comprehensive error reporting and debugging guidance
    • ✅ User-friendly progress indicators

🎯 Use Cases

Primary Use Case: Validate New Bundle Signing

After PR #46 merged with improved bundle-based signing, we need to validate that:

  • Bundle files (.bundle) are created correctly
  • Signature verification works with the new format
  • The release process completes successfully

Usage Examples

# Monitor and validate automatically (recommended)
./scripts/monitor-and-validate-release.sh

# Monitor workflow only  
./scripts/monitor-release-workflow.sh

# Custom configuration
./scripts/monitor-release-workflow.sh myorg/myrepo Release main 60 10

🔧 Technical Features

Smart Workflow Detection

  • Detects if a release workflow is already in progress
  • Waits for new workflows to start if none are running
  • Handles edge cases like queued workflows

Real-Time Progress Tracking

  • Shows individual job status during execution
  • Updates every 30 seconds (configurable)
  • Provides estimated time remaining

Comprehensive Error Handling

  • Clear error messages for common failure scenarios
  • Debugging guidance for signature verification issues
  • Graceful handling of timeouts and API failures

Automatic Validation

  • Runs validate-signing.sh immediately after release completion
  • Uses dynamic version detection from Cargo.toml
  • Provides actionable next steps for aqua registry submission

🚀 Expected Workflow

  1. Merge this PR to add monitoring scripts
  2. Trigger a release (version bump or manual trigger)
  3. Run monitoring: ./scripts/monitor-and-validate-release.sh
  4. Validate results: Confirm bundle-based signing works
  5. Submit to aqua registry if validation passes

🧪 Testing

Tested Locally

  • ✅ Help documentation displays correctly
  • ✅ GitHub CLI integration works
  • ✅ Dependency checking functions properly
  • ✅ Scripts have proper permissions and error handling

Will Test in Practice

  • 🔄 Monitoring actual release workflow execution
  • 🔄 Bundle signature validation in real release
  • 🔄 End-to-end workflow from monitoring to validation

📋 Dependencies

  • GitHub CLI: gh command for workflow monitoring
  • jq: JSON processing for API responses
  • Existing scripts: Uses validate-signing.sh for signature verification

🎯 Success Criteria

  • Scripts successfully monitor release workflow
  • Bundle signatures are created and verified correctly
  • Validation passes for new bundle-based signing
  • Clear next steps provided for aqua registry submission

These scripts will be essential for validating that the improved bundle-based signing from PR #46 works correctly in practice and is ready for aqua registry submission.

## New Scripts

### monitor-release-workflow.sh
- Monitor GitHub Actions release workflow until completion
- Wait for new workflows to start or monitor in-progress runs
- Configurable timeout and polling intervals
- Detailed job status reporting
- Robust error handling and colored output

### monitor-and-validate-release.sh
- End-to-end monitoring and validation workflow
- Automatically runs signature validation after release completes
- Provides clear next steps for aqua registry submission
- Comprehensive error reporting and debugging guidance

## Features

- ✅ **Smart Detection**: Detects in-progress runs vs waiting for new ones
- ✅ **Real-time Status**: Shows job-level progress during execution
- ✅ **Automatic Validation**: Runs signature validation immediately after completion
- ✅ **Error Handling**: Comprehensive error messages and debugging steps
- ✅ **Configurable**: Customizable timeouts and polling intervals
- ✅ **User-Friendly**: Colored output and clear progress indicators

## Usage

\`\`\`bash
# Monitor and validate automatically (recommended)
./scripts/monitor-and-validate-release.sh

# Monitor workflow only
./scripts/monitor-release-workflow.sh

# Custom configuration
./scripts/monitor-release-workflow.sh myorg/myrepo Release main 60 10
\`\`\`

These scripts will be essential for validating the improved bundle-based
signing process once PR #46 merges and triggers a new release.
Copilot AI review requested due to automatic review settings September 10, 2025 15:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces comprehensive monitoring and validation scripts to track GitHub Actions release workflows and automatically validate the new bundle-based signing process implemented in PR #46.

  • Adds real-time workflow monitoring with timeout handling and progress tracking
  • Implements automatic signature validation after release completion
  • Provides user-friendly progress indicators and clear next steps for aqua registry submission

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
scripts/monitor-release-workflow.sh Core workflow monitoring script with smart detection, real-time job status reporting, and configurable timeouts
scripts/monitor-and-validate-release.sh End-to-end automation script that monitors workflows and validates signatures with actionable next steps

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

fi

# Run main function
main "$@"
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script passes all arguments to main() but main() doesn't accept any parameters. This will cause the script to fail if any arguments are passed since main() is declared without parameters while the global variables are set from positional parameters outside of main().

Suggested change
main "$@"
main

Copilot uses AI. Check for mistakes.
fi

# Run main function
main "$@"
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the first script, main() doesn't accept parameters but "$@" is being passed to it. The script should either declare main() to accept parameters or not pass arguments to it since configuration is handled via global variables.

Suggested change
main "$@"
main

Copilot uses AI. Check for mistakes.
fi

local latest_run=$(get_latest_release_run)
local latest_run_id=$(echo "$latest_run" | jq -r '.databaseId // empty')
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If get_latest_release_run() returns an empty result or fails, latest_run will be empty and the jq command will fail with an error. This should be handled by checking if latest_run is non-empty before processing with jq.

Suggested change
local latest_run_id=$(echo "$latest_run" | jq -r '.databaseId // empty')
local latest_run_id=""
if [ -n "$latest_run" ]; then
latest_run_id=$(echo "$latest_run" | jq -r '.databaseId // empty')
fi

Copilot uses AI. Check for mistakes.

# Get current latest run as baseline
local baseline_run=$(get_latest_release_run)
local baseline_run_id=$(echo "$baseline_run" | jq -r '.databaseId // empty')
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the previous issue, if get_latest_release_run() returns empty or fails, the jq command will fail. Add a check to ensure baseline_run is non-empty before processing with jq.

Suggested change
local baseline_run_id=$(echo "$baseline_run" | jq -r '.databaseId // empty')
local baseline_run_id=""
if [ -n "$baseline_run" ]; then
baseline_run_id=$(echo "$baseline_run" | jq -r '.databaseId // empty')
fi

Copilot uses AI. Check for mistakes.
fi

# Wait for new workflow to start
local new_run=$(wait_for_new_release "$baseline_run_id")
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If wait_for_new_release() fails or returns empty, the jq command will fail when trying to extract .databaseId. Add error checking to ensure new_run contains valid JSON before processing.

Suggested change
local new_run=$(wait_for_new_release "$baseline_run_id")
local new_run=$(wait_for_new_release "$baseline_run_id")
if [ -z "$new_run" ]; then
log_error "No new workflow run detected or wait_for_new_release failed."
exit 1
fi
# Check if new_run is valid JSON
if ! echo "$new_run" | jq empty >/dev/null 2>&1; then
log_error "wait_for_new_release did not return valid JSON."
exit 1
fi

Copilot uses AI. Check for mistakes.
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.

2 participants