Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Azure Pipelines CI to GitHub Actions #109408

Open
hugovk opened this issue Sep 14, 2023 · 7 comments
Open

Move Azure Pipelines CI to GitHub Actions #109408

hugovk opened this issue Sep 14, 2023 · 7 comments
Labels
build The build process and cross-build

Comments

@hugovk
Copy link
Member

hugovk commented Sep 14, 2023

GitHub Actions is easier to use and maintain. For example, GitHub Actions is more popular and widely used, and so more familiar. It's easier to maintain a single system. Also core devs can restart failed GitHub Actions whereas they can't for Azure Pipelines. Both are owned by Microsoft and I believe they run on much the same infra.

There's a lot of duplication of tests between Azure Pipelines and GitHub Actions.

Let's remove the duplicated tests, and move the unique things over to GitHub Actions. For example, patchcheck is only run on AP.

We might not necessarily need to port things directly over, it may be possible to replicate equivalent checks in another way, possible with a pre-commit or Ruff lint rule. Let's evaluate these separately.

Related issues/PRs:

Linked PRs

@hugovk
Copy link
Member Author

hugovk commented Sep 14, 2023

Hmm, and Azure Pipelines is only running for PRs to main (not backports); and on the version branches after PRs have been merged, but not for 3.12.

There are two top-level Azure Pipelines config files:

Azure Pipelines CI

This runs on version branches, after a PR has been merged.

But when we forked 3.12 from main in May, we forgot to add '3.12' to the config, so it's not run on that branch at all:

trigger: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']

Azure Pipelines PR

This runs when PRs are opened. But it's only running for PRs against main, not for any of the backport PRs. I'm not sure why.

Example

To illustrate, this set of PRs only only had AP builds for main (python/cpython#109360) and not 3.12 (
python/cpython#109361) or 3.11 (#109362).

After merge, AP ran for main (https://dev.azure.com/Python/cpython/_build/results?buildId=137654&view=results) and 3.11 (https://dev.azure.com/Python/cpython/_build/results?buildId=137657&view=results) but not 3.12.

For comparison, GitHub Actions runs for PRs for all branches, but not merged pushes to version branches.

@brettcannon
Copy link
Member

I believe @zooba said there were some things being tested on Azure Pipelines that GitHub Actions didn't support?

@zooba
Copy link
Member

zooba commented Sep 14, 2023

Azure Pipelines is doing install layout testing using the APPX layout as a second step post-commit. While I'd most like to have the default build match the install layout, this has been a useful way to catch issues in tests that assume a source directory layout. These tests are templated at https://github.com/python/cpython/blob/main/.azure-pipelines/windows-layout-steps.yml and included a few times in ci.yml.

@hugovk
Copy link
Member Author

hugovk commented Sep 14, 2023

Looks like we could potentially remove the "Tests" step (and "Publish Test Results") from windows-steps.yml without affecting the layout testing? The main thing in windows-steps.yml being the CPython build.

In addition to the APPX layout step, should we also keep the nuget and embed layout steps?

steps:
- template: ./windows-steps.yml
- template: ./windows-layout-steps.yml
parameters:
kind: nuget
- template: ./windows-layout-steps.yml
parameters:
kind: embed
- template: ./windows-layout-steps.yml
parameters:
kind: appx
fulltest: true

@zooba
Copy link
Member

zooba commented Sep 14, 2023

Yeah, that would work. But it's post-commit testing anyway, so it isn't holding anyone up. And knowing that the regular tests pass is incredibly valuable when something specific to one of the layouts fails.

I'm pretty sure people are only annoyed by the PR integration. If that goes away, nobody will care unless they're looking for it.

As for the different layouts, the nuget and embed layouts only do really quick tests. I'd keep them all, as it gives us early warning that something has broken them (e.g. a new DLL isn't being copied). Otherwise we won't find out until during the release process when the same tests are run.

@hugovk
Copy link
Member Author

hugovk commented Sep 15, 2023

Sounds good. I suggest we proceed as follows:

  1. Leave ci.yml be, only change pr.yml
  2. Remove duplicate CI tests from pr.yml, keeping patchcheck on AP
  3. Move patchcheck to GHA, either as is or equivalent lint checks
  4. If necessary, disable "Azure Pipelines PR" via the web UI
  5. Remove pr.yml

@hugovk
Copy link
Member Author

hugovk commented Sep 15, 2023

Clarification on 1:

  1. Leave Windows testing in ci.yml be, change Windows testing in pr.yml

Let's remove Ubuntu unit tests from both ci.yml and pr.yml, because they're run on GHA.

That leaves only patchcheck in pr.yml (it's skipped in ci.yml because it only makes sense for PRs).

Please see PR #109452.

sobolevn added a commit to sobolevn/cpython that referenced this issue Sep 15, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 17, 2023
…nGH-109452)

(cherry picked from commit a75daed)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit to hugovk/cpython that referenced this issue Sep 17, 2023
…pythonGH-109452)

(cherry picked from commit a75daed)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this issue Sep 17, 2023
Yhg1s pushed a commit that referenced this issue Sep 17, 2023
…09452) (#109519)

gh-109408: Remove Ubuntu unit tests from Azure Pipelines (GH-109452)
(cherry picked from commit a75daed)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 18, 2023
(cherry picked from commit dd5d214)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 18, 2023
(cherry picked from commit dd5d214)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this issue Sep 18, 2023
)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Yhg1s pushed a commit that referenced this issue Sep 18, 2023
)

gh-109408: Azure Pipelines: test 3.12 branch (GH-109453)
(cherry picked from commit dd5d214)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 20, 2023
…b Actions (pythonGH-109569)

(cherry picked from commit 14cdefa)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this issue Oct 10, 2023
…mmit (#109890)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 10, 2023
…k to pre-commit (pythonGH-109891)

(cherry picked from commit 08ec4a1)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
AlexWaygood pushed a commit that referenced this issue Oct 10, 2023
…ck to pre-commit (GH-109891) (#110633)

GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891)
(cherry picked from commit 08ec4a1)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
AA-Turner added a commit to AA-Turner/cpython that referenced this issue Oct 10, 2023
…eck to pre-commit (pythonGH-109890)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit f5edb56)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AA-Turner added a commit to AA-Turner/cpython that referenced this issue Oct 10, 2023
…eck to pre-commit (pythonGH-109890)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>.
(cherry picked from commit f5edb56)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AA-Turner added a commit to AA-Turner/cpython that referenced this issue Oct 10, 2023
…tchcheck to pre-commit (pythonGH-109891)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>.
(cherry picked from commit 08ec4a1)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AlexWaygood pushed a commit that referenced this issue Oct 10, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 11, 2023
… solution (pythonGH-110726)

(cherry picked from commit de956b2)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
AlexWaygood pushed a commit that referenced this issue Oct 11, 2023
…e solution (GH-110726) (#110730)

gh-109408: Revert pre-commit whitespace checks pending portable solution (GH-110726)
(cherry picked from commit de956b2)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@iritkatriel iritkatriel added the build The build process and cross-build label Dec 1, 2023
AA-Turner added a commit that referenced this issue Aug 3, 2024
This no longer does anything useful, beyond wasting Azure resources.
brandtbucher pushed a commit to brandtbucher/cpython that referenced this issue Aug 7, 2024
brandtbucher pushed a commit to brandtbucher/cpython that referenced this issue Aug 7, 2024
This no longer does anything useful, beyond wasting Azure resources.
blhsing pushed a commit to blhsing/cpython that referenced this issue Aug 22, 2024
blhsing pushed a commit to blhsing/cpython that referenced this issue Aug 22, 2024
This no longer does anything useful, beyond wasting Azure resources.
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…-commit (python#109854)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…k to pre-commit (python#109891)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…pre-commit (python#109890)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

4 participants