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

Discuss: should we require Travis and GitHub Actions to succeed before landing PRs #32335

Closed
mmarchini opened this issue Mar 18, 2020 · 13 comments
Labels
meta Issues and PRs related to the general management of the project.

Comments

@mmarchini
Copy link
Contributor

According to our current CI policy, before landing a Pull Request, only Jenkins jobs are required to succeed. While I imagine most of us are careful to not land a PR when Travis/Actions are red, our policy or tooling doesn't reflect that practice. Now that we have Travis and Actions enabled in the repository for a while, the question is: should we consider those as official CI options and consider them as well in our policy?

On one hand, adding more CI results to consider can make our policy more complex. On the other hand, if we treat Actions as an official CI, we can move some tests from Jenkins to here, simplifying our Jenkins infrastructure (for example, tests involving different ./configure options). We would probably still need to test on every platform on Jenkins though.

I don't have strong opinions either way, but I'd like to hear what others think.

@mmarchini mmarchini added the meta Issues and PRs related to the general management of the project. label Mar 18, 2020
@richardlau
Copy link
Member

I personally liked the previous simplicity of only having one thing to check (the Jenkins CI run) but we've since allowed Travis CI for doc-only changes (#30330). Our tooling hasn't caught up (which is why #29770 is still open).

There are advantages to having things in Travis/Actions:

  • It is much easier for collaborators to change the behaviour of a Travis/Actions job (doesn't require having permissions in Jenkins) and such changes have an audit trail (i.e. they are PR'ed like any other change)
  • Run automatically on pull requests (don't need to be started by collaborators)
  • Actions are better integrated with GitHub, allowing things like annotations (we're doing that now for any JavaScript lint failures)

The main downside is Travis/Actions doesn't cover all of our supported platforms.

I'm leaning towards doing less in Travis as it is more restrictive than Actions in terms of things like job running time limit (50 mins on Travis vs 6 hours on Actions) and concurrency (5 concurrent jobs for open source on Travis vs 20 on Actions).

@sam-github
Copy link
Contributor

While I imagine most of us are careful to not land a PR when Travis/Actions are red

I rely heavily on git node land... when it says its good, I land it, I don't even look at github, so whatever our policy ends up being, +1000 on it being what the tooling checks!

@mhdawson
Copy link
Member

I think if we have actions/travis jobs that run automatically for each PR then they should pass and be a blocker for landing, otherwise why are we running them?

@mmarchini
Copy link
Contributor Author

I'm leaning towards doing less in Travis as it is more restrictive than Actions in terms of things like job running time limit (50 mins on Travis vs 6 hours on Actions) and concurrency (5 concurrent jobs for open source on Travis vs 20 on Actions).

Agreed. Also, keeping only one should make maintenance simpler (in theory at least).

I rely heavily on git node land... when it says its good, I land it, I don't even look at github, so whatever our policy ends up being, +1000 on it being what the tooling checks!

We already have the building blocks to check GitHub CI status on ncu, just need to make some changes so that it's possible to check both Jenkins and GitHub CI (we might need to fix something on github-bot first though).

@gengjiawen
Copy link
Member

I am +1 on require those CI.

But travis sometimes being flaky like those https://travis-ci.com/github/nodejs/node/jobs/299678389, I see it mulit times.

@mmarchini
Copy link
Contributor Author

I'll probably send a PR to remove Travis 👀

Just need to double-check that everything we have on Travis is covered on Actions.

@Trott
Copy link
Member

Trott commented Apr 8, 2020

I rely heavily on git node land... when it says its good, I land it, I don't even look at github, so whatever our policy ends up being, +1000 on it being what the tooling checks!

If I'm not mistaken, git node land checks that a CI was run, but does not check that it was green. So, uh, that's at least one thing you should check manually. :-D

@mmarchini
Copy link
Contributor Author

Not sure if it should, but it could require the last CI to be successful before landing.

@targos
Copy link
Member

targos commented Apr 8, 2020

IIRC, it checks that there is a CI: URL kind of command in the comments. What we could (and I think should) add to git node land is a verification using the GitHub checks API, with a prompt to allow landing anyway if everything is not green.

@Trott
Copy link
Member

Trott commented Apr 8, 2020

IIRC, it checks that there is a CI: URL kind of command in the comments. What we could (and I think should) add to git node land is a verification using the GitHub checks API, with a prompt to allow landing anyway if everything is not green.

It might be more robust to only check the green-or-not status of node-test-pull-request. It's often the case that a subtask (e.g., node-test-commit-linux-containered) still shows as red even after a newer run has passed.

@sam-github
Copy link
Contributor

If I'm not mistaken, git node land checks that a CI was run, but does not check that it was green. So, uh, that's at least one thing you should check manually. :-D

git node land's green checkmarks strongly, strongly suggests that it has done that check, it should probably get fixed to make that clear. Its a mystery to me how I haven't landed anything incorrectly yet, perhaps I do tend to look for green in CI before dropping to the shell to land things.

@mmarchini
Copy link
Contributor Author

git node land's green checkmarks strongly, strongly suggests that it has done that check, it should probably get fixed to make that clear

It's a blue i icon, indicating it's informative.

What we could (and I think should) add to git node land is a verification using the GitHub checks API

This is already implemented on ncu, but we need to check that a Jenkins CI was run (today we only check if a GitHub Checks is present). Also, bugs like this can hinder the results collected by ncu.

mmarchini added a commit to mmarchini/node-core-utils that referenced this issue Aug 9, 2020
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs#324
Ref: nodejs/node#32335
@mmarchini
Copy link
Contributor Author

Latest node-core-utils version will have a red X if the last Jenkins CI failed (thanks @codebytere for adding it a few months ago!) and once nodejs/node-core-utils#469 lands we'll also check for Actions, which should cover everything raised in this issue :)

mmarchini added a commit to mmarchini/node-core-utils that referenced this issue Aug 9, 2020
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
mmarchini added a commit to mmarchini/node-core-utils that referenced this issue Aug 15, 2020
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
mmarchini added a commit to mmarchini/node-core-utils that referenced this issue Aug 15, 2020
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
mmarchini added a commit to mmarchini/node-core-utils that referenced this issue Aug 20, 2020
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
johnfrench3 pushed a commit to johnfrench3/core-utils-node that referenced this issue Nov 2, 2022
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs/node-core-utils#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
renawolford6 added a commit to renawolford6/node-dev-build-core-utils that referenced this issue Nov 10, 2022
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs/node-core-utils#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
Developerarif2 pushed a commit to Developerarif2/node-core-utils that referenced this issue Jan 27, 2023
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs/node-core-utils#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
gerkai added a commit to gerkai/node-core-utils-project-build that referenced this issue Jan 27, 2023
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs/node-core-utils#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
patrickm68 added a commit to patrickm68/NodeJS-core-utils that referenced this issue Sep 14, 2023
Doc-only changes don't need a full Jenkins CI, instead we can check
if the last Actions run was successful. Therefore this commit also adds
check for Action runs. Jenkins CI messages were improved as well.

Fix: nodejs/node-core-utils#324
Fix: nodejs/node#32335
Fix: nodejs/node#29770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues and PRs related to the general management of the project.
Projects
None yet
Development

No branches or pull requests

7 participants