Skip to content

Commit 487780f

Browse files
committed
Run pkgcheck after R-CMD-check, and correct the earlier diagnosis
The previous commit claimed the failing "continuous integration" check would resolve itself once R-CMD-check finished before pkgcheck. That was wrong, and the run on the merge commit disproved it: R-CMD-check completed at 20:07:33 and pkgcheck at 20:11:48, yet the check still failed. What matters is not when pkgcheck ends but when it queries. pkgcheck() calls pkgcheck_fill_info(), which performs the API query, before pkgcheck_fill_goodpractice(), which is the slow rcmdcheck and covr phase. In that run the goodpractice phase began at 20:06:19, so the query happened before then, while R-CMD-check was still going. The query therefore lands roughly five minutes into the run. For R-CMD-check to be read as successful it would have to finish inside those five minutes, which it cannot: its fastest single matrix leg is over six minutes and the run completes only when all five do. So the check fails on essentially every push, and is neither self-correcting nor a symptom of R-CMD-check being unusually slow. The April run passed only because its setup happened to be slow enough that the query landed after R-CMD-check had finished. Chain the workflows so the conclusion read is always final. This serialises the run, about 10 minutes for R-CMD-check then about 15 for pkgcheck instead of the two overlapping, which is the accepted cost of a green report.
1 parent 61ae620 commit 487780f

1 file changed

Lines changed: 26 additions & 17 deletions

File tree

.github/workflows/pkgcheck.yaml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,45 @@ name: pkgcheck
22

33
# This will cancel running jobs once a new run is triggered
44
concurrency:
5-
group: ${{ github.workflow }}-${{ github.head_ref }}
5+
group: >-
6+
${{ github.workflow }}-${{
7+
github.event.workflow_run.head_branch || github.ref }}
68
cancel-in-progress: true
79

8-
# Known false positive in the report produced by this workflow.
10+
# Chained to R-CMD-check rather than triggered directly by the push.
911
#
1012
# pkgcheck's own "continuous integration" check calls the GitHub API for
1113
# push-triggered runs, groups them by workflow name, keeps the most recently
1214
# *created* run of each workflow whose name matches "cmd" or "coverage", and
13-
# requires conclusion == "success". A run that is still in progress has a null
14-
# conclusion, which the check treats as a failure rather than falling back to
15-
# the previous completed run.
15+
# requires conclusion == "success". A run still in progress has a null
16+
# conclusion, which the check treats as a failure; it does not fall back to the
17+
# previous completed run. It excludes this workflow, so this is not recursion.
1618
#
17-
# All workflows start together on a push, and pkgcheck (~18 min) currently
18-
# finishes before R-CMD-check (~23 min, dominated by the ubuntu-devel leg
19-
# building dependencies from source). pkgcheck therefore reads a null
20-
# conclusion and reports
19+
# The query runs early: pkgcheck() calls pkgcheck_fill_info(), which performs
20+
# it, *before* pkgcheck_fill_goodpractice(), which is the slow rcmdcheck and
21+
# covr phase. In practice the query happens roughly five minutes into the run,
22+
# not at the end. When all workflows start together on a push, R-CMD-check
23+
# would have to finish inside those five minutes to be read as successful, and
24+
# it cannot: its fastest single matrix leg is over six minutes and the run only
25+
# completes when all five finish (best observed total, 10m32s). So the report
26+
# would say
2127
#
2228
# Package fails continuous integration checks.
2329
#
24-
# even when R-CMD-check, test-coverage and lint all pass. This is accepted
25-
# deliberately: chaining the workflows would remove it but roughly doubles the
26-
# wall-clock time of a push. Check the other workflows for the real CI status,
27-
# and ignore that one line of the pkgcheck report. It resolves itself whenever
28-
# R-CMD-check finishes before pkgcheck, which is how it behaved until the
29-
# ubuntu-devel leg slowed down.
30+
# on essentially every push, even though R-CMD-check, test-coverage and lint
31+
# all pass. This is not self-correcting, and it is not caused by R-CMD-check
32+
# being unusually slow.
33+
#
34+
# Waiting for R-CMD-check to complete removes it. The cost is a serialised run:
35+
# about 10 minutes for R-CMD-check, then about 15 for pkgcheck, rather than the
36+
# two overlapping.
3037
on:
3138
# Manually trigger the Action under Actions/pkgcheck
3239
workflow_dispatch:
33-
# Run on every push to main
34-
push:
40+
workflow_run:
41+
workflows: ["R-CMD-check.yaml"]
42+
types:
43+
- completed
3544
branches:
3645
- main
3746

0 commit comments

Comments
 (0)