Skip to content

[Sync] Update project files from source repository (16d1713)#272

Merged
mrz1836 merged 1 commit intomasterfrom
chore/sync-files-bitcoin-schema-20260207-161012-16d1713
Feb 7, 2026
Merged

[Sync] Update project files from source repository (16d1713)#272
mrz1836 merged 1 commit intomasterfrom
chore/sync-files-bitcoin-schema-20260207-161012-16d1713

Conversation

@mrz1836
Copy link
Copy Markdown
Member

@mrz1836 mrz1836 commented Feb 7, 2026

What Changed

  • Added --paginate flag to gh api calls when fetching artifacts lists in .github/actions/download-artifact-resilient/action.yml
  • Added --paginate flag to gh api calls when fetching coverage history artifacts in .github/workflows/fortress-coverage.yml (line 408)
  • Added --paginate flag to gh api calls when fetching coverage-data artifacts in .github/workflows/fortress-coverage.yml (line 1081)

Why It Was Necessary

  • GitHub API returns paginated results by default (typically 30 items per page), which could cause incomplete artifact lists to be returned when runs produce many artifacts
  • Without pagination, the workflows might fail to discover all available artifacts, leading to incomplete coverage data collection or failed artifact downloads
  • Ensures all artifacts are retrieved regardless of how many are produced in a given workflow run

Testing Performed

  • Verify that existing workflows continue to function correctly with the pagination flag added
  • Test artifact retrieval in scenarios with both small and large numbers of artifacts
  • Confirm that the fallback behavior in download-artifact-resilient action still works when API calls fail

Impact / Risk

  • Risk Level: Low - the --paginate flag is additive and doesn't change existing behavior for small result sets
  • Performance: Minimal impact expected; may slightly increase API call duration for runs with many artifacts, but ensures completeness
  • Breaking Changes: None - this is a transparent enhancement to artifact discovery that maintains backward compatibility

Copilot AI review requested due to automatic review settings February 7, 2026 21:10
@mrz1836 mrz1836 self-assigned this Feb 7, 2026
@mrz1836 mrz1836 added automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps labels Feb 7, 2026
@github-actions github-actions Bot added update General updates size/XS Very small change (≤10 lines) labels Feb 7, 2026
Copy link
Copy Markdown

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 syncs GitHub workflow/action updates to ensure artifact discovery is complete by paginating gh api calls when listing workflow run artifacts, preventing missed artifacts when runs produce more than the default page size.

Changes:

  • Added --paginate to gh api artifact-listing calls in the resilient artifact download composite action.
  • Added --paginate to gh api artifact-listing calls in the fortress-coverage workflow for coverage-history and coverage-data discovery.

Reviewed changes

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

File Description
.github/workflows/fortress-coverage.yml Paginates artifact listing so coverage-history and coverage-data artifacts are discoverable beyond the first page.
.github/actions/download-artifact-resilient/action.yml Paginates artifact listing in the composite action to avoid incomplete artifact preflight results.
Comments suppressed due to low confidence (1)

.github/actions/download-artifact-resilient/action.yml:111

  • gh api .../artifacts --paginate returns one JSON object per page (newline-delimited). Capturing that into ARTIFACTS_JSON makes it a multi-document stream, but later code treats it as a single JSON document (e.g., the jq ... | length used for AVAILABLE_ARTIFACTS). With pagination, this produces multiple lengths (one per page), which can introduce newlines into ARTIFACTS_FOUND and ultimately write an invalid artifacts-found= line to $GITHUB_OUTPUT. Consider aggregating paginated pages before further processing (e.g., jq -s to merge .artifacts arrays / sum lengths) or avoid storing page objects by using gh api --paginate --jq '.artifacts[]' and deriving counts from that stream.
          ARTIFACTS_JSON=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts --paginate 2>&1) || {
            API_ERROR=$?
            echo "⚠️ Failed to fetch artifacts list (exit code: $API_ERROR)"
            echo "   Response: $ARTIFACTS_JSON"
            echo "↪ Falling back to direct download attempt (skipping preflight list)"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mrz1836 mrz1836 merged commit a038845 into master Feb 7, 2026
53 checks passed
@github-actions github-actions Bot deleted the chore/sync-files-bitcoin-schema-20260207-161012-16d1713 branch February 7, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps size/XS Very small change (≤10 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants