Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CI: Add more skip conditions #26715

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
Loading
from
Open

CI: Add more skip conditions #26715

wants to merge 8 commits into from

Conversation

HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Jun 16, 2024

Spun out of #26708. Might maybe be helpful (post docs) with #24280.

Adds a bunch of tags which can be passed to conditionally disable what isn't needed:

  • [skip circle]
  • [skip linux]
  • [skip nixblas]
  • [skip sanitizer]
  • [skip musl]
  • [skip qemu]
  • [skip simd]
  • [skip macos]
  • [skip mypy]
  • [skip wingha]
  • [wasm skip]
  • [codeql skip]

Together with a per commit tag, like [winci f2py] (from #26708) these allow for a more fine-grained control over what is run and when. The tags above do not need to be in the first line of the commit, but can occur anywhere in the body of the commit itself. So an all but [winci f2py] commit would look like:

CI: Configure F2PY GHA Windows [winci f2py]

[skip circle] [skip linux] [skip nixblas] [skip sanitizer] [skip musl]
[skip qemu] [skip simd] [skip macos] [skip mypy] [skip wingha] [wasm skip]
[codeql skip]

[skip azp]
[skip cirrus]

Since [skip azp] can be anywhere in the commit message, but [skip cirrus] must be in the first or last line.

@HaoZeke HaoZeke force-pushed the addCISkips branch 5 times, most recently from 52ff0be to ebb1e86 Compare June 17, 2024 03:16
@andyfaff
Copy link
Member

It seems to me that rather than excluding one-by-one, an approach of exclude-all, and include one-by-one might be better.

e.g.
[exclude-all][include docs].

@HaoZeke
Copy link
Member Author

HaoZeke commented Jun 17, 2024

It seems to me that rather than excluding one-by-one, an approach of exclude-all, and include one-by-one might be better.

e.g. [exclude-all][include docs].

I think for normal changes to NumPy proper, it would probably be likely that all tests need to run, and that it is probably more rare to want to exclude a bunch of actions. My main motivation was for F2Py, where changes are independent from most of the other tests, but its still less probable, though I might be wrong.

@seberg
Copy link
Member

seberg commented Jun 17, 2024

I tend to think that for this to be used often enough to make a dent it needs to be dead simple. Which is a bit related to @melissawm's PR to add [docs only] (or only docs, dunno).

My ideal world would be to have maybe 3 different options:

  • extended tests (better name), that for example even most Python changes could at least nor run during PR phase because they are just so unlikely to fail (i.e. SIMD, openblas, sanitizer tests).
  • docs only: For a PR that is only docs.
  • skip all: For that rare PR where nothing matters.

And even better, if we can do it with labels, so you can add it later (at least for possible iterations). In fact, for the "extended tests" I think it would be OK to only enable them with a label, and I think that would actually make a real dent in resource usage. (For docs that would be cool to auto detect obvious docs only changes, but dunno).

@WarrenWeckesser
Copy link
Member

Being able to select just one of the jobs, e.g. something like [only pyodide] or the notation that @andyfaff suggested, would be very helpful when debugging a specific problem with that job or on that platform. Debugging via CI is not ideal, but it might be the only option when you don't have the problematic platform available locally. Of course, once the problems with that platform are solved, the full test suite would have to be run before the PR can be considered for merging.

@melissawm
Copy link
Member

My [docs only] PR is stalled because it didn't work on my fork and I didn't have time to investigate. If you have a superseding fix please go for it!

@mhvk
Copy link
Contributor

mhvk commented Jun 20, 2024

In astropy, we do have the "Extra CI" label (which runs s390x, etc.). Otherwise, we similarly have various skip ... tests, but apart from [skip ci], I definitely don't remember them (and thus do not use them), so good to try to keep things simple (I like the [docs only] idea).

@WarrenWeckesser
Copy link
Member

I'll add that I'm not opposed to the change suggested in the PR. The use-case that I described can be achieved with the changes in this PR, so my comment was more about convenience than functionality.

@HaoZeke
Copy link
Member Author

HaoZeke commented Jun 20, 2024

@rgommers also mentioned that a DOC update detailing a simpler workflow (make a fork, enable one workflow, work through it).

HaoZeke added 7 commits June 23, 2024 23:27
[skip circle] [skip linux] [skip nixblas] [skip sanitizer] [skip musl]
[skip qemu] [skip simd] [skip macos] [skip mypy] [skip wingha]
[skip circle] [skip linux] [skip nixblas] [skip sanitizer] [skip musl]
[skip qemu] [skip simd] [skip macos] [skip mypy] [skip wingha]

[skip azp]
[skip cirrus]
Also [skip circle] does the right thing now
[skip linux] [skip wingha] [skip azp] [skip macos]
[skip cirrus]
Along with some helpers..
Copy link
Member

@melissawm melissawm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say much about the whole workflow. I agree with the result (having the options) but I find it hard to find a better/more elegant way to implement it.

I'll add one request: can you add an anchor to the "Commands to skip continuous integration" section @HaoZeke ? I often want to point people here and miss the anchor. Thanks!

* ``[skip exotic]``: ``[skip quemu] [skip simd] [skip macos] [skip wingha] [skip wasm] [skip musl] [skip circle] [skip azp] [ckip cirrus]``
* ``[skip tools]``: Expands to ``[skip codeql] [skip mypy] [skip sanitizer]``

Being CI Sensitive
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion: maybe this can be an admonition? My only concern is that this maybe too complicated for a regular contributor and we often point them to this section to see the skip commands. Being in an admonition may change the flow of the text so they realize this is more of an advanced workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.