Repository navigation
Always run GitHub action jobs, even on documentation-only jobs #84728
Copy link
Copy link
Closed
Labels
3.9 (EOL)end of lifeend of lifebuildThe build process and cross-buildThe build process and cross-build
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2020-05-18.14:18:46.803>
created_at = <Date 2020-05-07.17:39:37.087>
labels = ['build', '3.9']
title = 'Always run GitHub action jobs, even on documentation-only jobs'
updated_at = <Date 2020-08-10.17:09:45.684>
user = 'https://github.com/vstinner'bugs.python.org fields:
activity = <Date 2020-08-10.17:09:45.684>
actor = 'miss-islington'
assignee = 'none'
closed = True
closed_date = <Date 2020-05-18.14:18:46.803>
closer = 'vstinner'
components = ['Build']
creation = <Date 2020-05-07.17:39:37.087>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 40548
keywords = ['patch']
message_count = 17.0
messages = ['368357', '368359', '368361', '368366', '368372', '368384', '368870', '368915', '368922', '368924', '369210', '369225', '369226', '369230', '375129', '375131', '375132']
nosy_count = 4.0
nosy_names = ['vstinner', 'jstasiak', 'miss-islington', 'FFY00']
pr_nums = ['19981', '19983', '20097', '20100', '20101', '20164', '20178', '20179', '20740', '21806', '21812', '21813', '21814']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue40548'
versions = ['Python 3.9']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.9 (EOL)end of lifeend of lifebuildThe build process and cross-buildThe build process and cross-build
Activity
vstinner commentedon May 7, 2020
bpo-39837 made Azure Pipelines CI non-mandatory. Travis CI was made mandatory to have at least one mandatory job: python/core-workflow#365
I would prefer to have at least one mandatory Windows CI running on Python pull requests. Before we had pre-commit checks, it was too common to break Windows. I would prefer to not regress on that aspect.
--
Currently, GitHub action jobs ignore "documentation-only" changes. Extract of .github/workflows/build.yml:
on:
push:
branches:
- master
- 3.8
- 3.7
paths-ignore:
- 'Doc/'
- 'Misc/'
- '**/.md'
- '**/.rst'
If a job is marked as mandatory but the GitHub action is skipped because of paths-ignore, the PR cannot be merged :-( It seems to be a known GitHub limitation which is not going to be fixed soon:
https://discuss.python.org/t/make-one-windows-ci-job-mandatory/4047/6
To workaround is to always run GitHub action jobs, even on documentation-only jobs.
I propose to always run GitHub actions and then make the Windows (64 bit) job mandatory.
--
Sadly, it will waste resources for documentation-only jobs. To avoid that, the Windows job can be modified later to be skipped if it detects that the PR is a documentation-only change.
Steve Dower wrote:
"That workaround looks roughly like what is in the Azure Pipelines files. Someone just needs the time to go and migrate it."
https://discuss.python.org/t/make-one-windows-ci-job-mandatory/4047/6
Note: the Travis CI job (.travis.yml) uses the following check:
--
More background on these CI issues:
FFY00 commentedon May 7, 2020
The workaround presented at https://github.community/t5/GitHub-Actions/Feature-request-conditional-required-checks/m-p/51344/highlight/true#M8157 seems pretty reasonable. And it seems like travis is alerady doing the same thing as it doesn't have native support to skip runs based on path changes.
I can open a PR if you want.
vstinner commentedon May 7, 2020
I suppose that Steve Dower mentioned the following part of .azure-pipelines/prebuild-checks.yml:
----------------
if ! git diff --name-only
then
echo "Only docs were updated: tests.run=false"
echo "##vso[task.setvariable variable=run;isOutput=true]false"
else
echo "Code was updated: tests.run=true"
echo "##vso[task.setvariable variable=run;isOutput=true]true"
fi
displayName: Detect source changes
name: tests
----------------
I understood that he proposed to port it inside the Windows job of GitHub actions (.github/workflows/build.yml).
I propose the following plan:
FFY00 commentedon May 7, 2020
Done :)
vstinner commentedon May 7, 2020
New changeset 4e36376 by Victor Stinner in branch 'master':
bpo-40548: Always run GitHub action, even on doc PRs (GH-19981)
4e36376
vstinner commentedon May 7, 2020
Done.
My request: python/core-workflow#368
vstinner commentedon May 14, 2020
New changeset 75d7257 by Filipe Laíns in branch 'master':
bpo-40548: GitHub Action workflow: skip jobs on doc only PRs (GH-19983)
75d7257
vstinner commentedon May 15, 2020
New changeset 6a78589 by Filipe Laíns in branch 'master':
bpo-40548: github actions: pass the changes check on no source changes (GH-20097)
6a78589
vstinner commentedon May 15, 2020
New changeset 07bd5cf by Victor Stinner in branch '3.8':
[3.8] bpo-40548: GitHub Action workflow: skip jobs on doc only PRs (GH-20100)
07bd5cf
miss-islington commentedon May 15, 2020
New changeset 6ad51a1 by Miss Islington (bot) in branch '3.7':
[3.8] bpo-40548: GitHub Action workflow: skip jobs on doc only PRs (GH-20100)
6ad51a1
vstinner commentedon May 18, 2020
New changeset c444108 by Filipe Laíns in branch 'master':
bpo-40548: Github Actions: update actions/checkout to v2 (GH-20164)
c444108
miss-islington commentedon May 18, 2020
New changeset 9ecf25e by Miss Islington (bot) in branch '3.7':
bpo-40548: Github Actions: update actions/checkout to v2 (GH-20164)
9ecf25e
miss-islington commentedon May 18, 2020
New changeset d8cbfa2 by Miss Islington (bot) in branch '3.8':
bpo-40548: Github Actions: update actions/checkout to v2 (GH-20164)
d8cbfa2
vstinner commentedon May 18, 2020
The initial issue (be able to make a GitHub action job mandatory) is now fixed, I close the issue.
Making Windows x64 job mandatory is now tracked at: python/core-workflow#368
vstinner commentedon Aug 10, 2020
New changeset eaa5517 by Victor Stinner in branch 'master':
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job (GH-21806)
eaa5517
miss-islington commentedon Aug 10, 2020
New changeset 09d8260 by Miss Islington (bot) in branch '3.8':
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job (GH-21806)
09d8260
miss-islington commentedon Aug 10, 2020
New changeset 2cd58d8 by Miss Islington (bot) in branch '3.9':
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job (GH-21806)
2cd58d8