Skip to content

Conversation

Copy link

Copilot AI commented Dec 2, 2025

When tinuous ran while a PR's workflow was still in progress, it would download incomplete logs (only the "waiting for runner" messages). The next scheduled run would skip these logs since they appeared already downloaded.

Changes

get_build_assets

  • Group PR runs by head_sha before processing
  • Track which commits have any incomplete workflows
  • Skip all runs for a commit if any workflow is still running
  • Non-PR events (push, cron, manual) continue processing individually

get_build_assets_for_commit

  • Collect all workflow runs first before yielding any assets
  • Return empty if any workflow for the commit is incomplete

Tests

  • Added 6 tests covering PR grouping, individual event processing, and commit fetch behavior

Reprocessing

To reprocess a PR after all workflows complete:

tinuous fetch-commit <full-commit-sha>

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/test/test/commits/abc123abc123abc123abc123abc123abc123abc123
    • Triggering command: /usr/bin/python python -m pytest test/test_github.py -v --tb=short (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Do not consider PR at all if any of workflows is still running</issue_title>
<issue_description>I think we might have overlapped with execution while workflow was still running so we did not get any logs . and that run eventually actually timed out at 6 h.

dandi@drogon:/mnt/backup/dandi/tinuous-logs/dandi-archive/2025/12$ cat './01/github/pr/2644/01bfb52/Test Integration with dandi-cli/4577/test (3.13, master)/system.txt'                                                     
2025-12-01T22:32:59.7800000Z Requested labels: ubuntu-22.04                                                                                                                                                                  
2025-12-01T22:32:59.7800000Z Job defined at: dandi/dandi-archive/.github/workflows/cli-integration.yml@refs/pull/2644/merge                                                                                                  
2025-12-01T22:32:59.7800000Z Waiting for a runner to pick up this job...                                                                                                                                                     
2025-12-01T22:33:09.3390000Z Job is waiting for a hosted runner to come online.                                                                                                                                              
2025-12-01T22:33:09.3380000Z Job is about to start running on the hosted runner: GitHub Actions 1000106047

dandi@drogon:/mnt/backup/dandi/tinuous-logs/dandi-archive/2025/12$ git -C './01/github/pr/2644/01bfb52/Test Integration with dandi-cli/4577/test (3.13, master)/' log . | head                                                                                                                                                                  
commit 83482a5                                                                                                                                                                                                               
Author: DANDI Team <team@dandiarchive.org>                                                                                                                                                                                   
Date:   2025 Dec 02 00:47:58 -0500                                                                                                                                                                                           
                                                                                                                                                                                                                             
    [tinuous] 6 logs added                                                                                                                                                                                                   
                                                                                                                                                                                                                             
    Produced by tinuous 0.6.0 

so we might have ran at midnight while it was still running since started at 10pm. </issue_description>

<agent_instructions>please provide instructions how to reprocess that particular PR if that is possible</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 2, 2025 19:49
Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with overlapping workflows causing log loss Skip PRs entirely if any workflow is still running Dec 2, 2025
Copilot AI requested a review from yarikoptic December 2, 2025 19:55
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 65.30612% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.69%. Comparing base (a416ffd) to head (c18690e).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/tinuous/github.py 65.30% 11 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #221       +/-   ##
===========================================
- Coverage   65.65%   46.69%   -18.97%     
===========================================
  Files          10       10               
  Lines        1383     1420       +37     
  Branches      211      228       +17     
===========================================
- Hits          908      663      -245     
- Misses        395      742      +347     
+ Partials       80       15       -65     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Do not consider PR at all if any of workflows is still running

2 participants