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

[CI] Add GitHub Actions workflow to check stdlib/Manifest.toml #56976

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

giordano
Copy link
Contributor

@giordano giordano commented Jan 6, 2025

Fix JuliaCI/julia-buildkite#417.

I first tried with a workflow to automatically open a PR to update the manifest, via workflow dispatch and/or schedule, but it's complicated to do it with limited permissions: peter-evans/create-pull-request allows creating PRs from forks, but that's finicky because it requires a PAT which can push to the fork and for the workflow dispatch we'd need to keep the list of committers in sync across different organisations (GitHub doesn't allow creating forks within the same org, even with different name), and also schedule would be useless because for a seldom used repo that'd go stale very quickly.

Adding a check in PRs is probably the easiest option with least permissions required. This needs #56972 to be merged first.

@giordano giordano added the ci Continuous integration label Jan 6, 2025
@DilumAluthge
Copy link
Member

Any particular reason for doing this in GitHub Actions (instead of Buildkite)?

@giordano
Copy link
Contributor Author

giordano commented Jan 6, 2025

Two:

  • easier
  • doesn't require using hosted runners (which for example are offline right now....)

@DilumAluthge
Copy link
Member

I think I'd prefer that we put this in Buildkite.

If it lives on GitHub Actions, then it's going to create a new commit status - there's no way to prevent that with GHA.

In the past, we've gotten feedback from committers that having too many commit statuses makes things noisier and harder to read.

If we put this job into Buildkite, then instead of creating a new commit status, we just group it under the existing Check status.

@DilumAluthge
Copy link
Member

  • doesn't require using hosted runners (which for example are offline right now....)

By "hosted runners" I assume you mean the machines that the JuliaLang project hosts (as opposed to GitHub-hosted runners).

Ultimately, a PR to be merged, it needs normal CI to run, which requires JuliaLang-hosted machines. So I'm not sure if we end up getting any benefit by having some jobs not require JuliaLang-hosted machines.

@giordano
Copy link
Contributor Author

giordano commented Jan 6, 2025

So I'm not sure if we end up getting any benefit by having some jobs not require JuliaLang-hosted machines.

The benefit is reducing the queue, especially for such short lived jobs, see for example #55281: the check whitespace job on GHA is 6x faster just because BK has a relatively large latency for short jobs.

@giordano
Copy link
Contributor Author

giordano commented Jan 6, 2025

In the past, we've gotten feedback from committers that having too many commit statuses makes things noisier and harder to read.

In case it wasn't obvious from the code, this job is run only on PRs which modifies files in the stdlib dir:

pull_request:
paths:
- 'stdlib/**'
The commit status would appear only in relevant PRs. Can probably further restrict it to stdlib/*/Project.toml and stdlib/*.version.

Also, if BumpStdlibs.jl also updated the manifest that'd further reduce the need to manually update it (or even better, the manifest wasn't needed in the first place).

@DilumAluthge
Copy link
Member

What's the actual time being saved here? Is it e.g. 30 seconds vs 60 seconds? Does the amount of time being saved outweigh the cost of adding more noise (by adding another commit status) - and thus the increased risk of a committer merging a PR with failing CI (because they get overwhelmed by all of the commit statuses)?

@DilumAluthge
Copy link
Member

  • doesn't require using hosted runners (which for example are offline right now....)

FWIW, I suspect that the current issue is not with our specific JuliaLang-hosted machines, but rather a Buildkite service degradation.

GitHub Actions frequently experiences service degradations, so this point doesn't really go to an advantage for GitHub Actions over Buildkite.

@DilumAluthge
Copy link
Member

Also, if BumpStdlibs.jl also updated the manifest that'd further reduce the need to manually update it

This likely won't be too difficult to implement.

@DilumAluthge
Copy link
Member

The commit status would appear only in relevant PRs. Can probably further restrict it to stdlib/*/Project.toml and stdlib/*.version.

Plenty of PRs touch stdlib/*, so I think the noise is still a concern there.

If the job only runs on the project and .version files, that would be better.

@giordano
Copy link
Contributor Author

giordano commented Jan 6, 2025

Plenty of PRs touch stdlib/*, so I think the noise is still a concern there.

Looks to me like BumpStdlibs is a major offender, and last 34 commits (halve that number without BumpStdlibs commits) go back to 1.5 months ago.

Copy link
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

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

With the triggering paths being restricted further, this probably will have a more limited blast radius. I still would probably lean towards putting it in Buildkite, but given that this job is triggered in so few circumstances, it might not end up making too much difference either way.

We can move this to Buildkite later if we want.

@giordano giordano marked this pull request as ready for review January 8, 2025 08:29
@giordano giordano requested a review from a team as a code owner January 8, 2025 08:29
Copy link
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

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

Per my comment in #56976 (review)

@IanButterworth
Copy link
Member

Should we hold off merging this until BumpStdlibs is updated to update the Manifest?

DilumAluthge and others added 2 commits January 8, 2025 19:44
Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
pull_request:
paths:
- 'stdlib/*.version'
- 'stdlib/*/Project.toml'
Copy link
Member

Choose a reason for hiding this comment

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

Presumably we want to also trigger this if stdlib/Project.toml is changed:

Suggested change
- 'stdlib/*/Project.toml'
- 'stdlib/*/Project.toml'
- 'stdlib/Project.toml'

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

Successfully merging this pull request may close these issues.

TODO: CI check to make sure stdlib manifest is up-to-date
3 participants