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

ofborg: post a finished check if evaluation starts #527

Merged
merged 1 commit into from Jan 29, 2021
Merged

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Aug 5, 2020

We need this for better integration into github.

@cole-h
Copy link
Member

cole-h commented Aug 5, 2020

This wouldn't give a PR the "all clear" (green check) because overall_status would still be pending, correct?

@Mic92
Copy link
Member Author

Mic92 commented Aug 5, 2020

This wouldn't give a PR the "all clear" (green check) because overall_status would still be pending, correct?

Exactly it's posted right after the initial pending status.

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

Should be fine, but I'd like to hear what @grahamc has to say (if anything).

@cole-h cole-h requested a review from grahamc August 6, 2020 17:23
@zowoq
Copy link
Contributor

zowoq commented Aug 6, 2020

Didn't Graham say he'd be AFK for a while this month? Hasn't been active on github or irc for a week.

@Mic92
Copy link
Member Author

Mic92 commented Aug 6, 2020

cc @LnL7

@zowoq
Copy link
Contributor

zowoq commented Aug 7, 2020

NixOS/nixpkgs@5ca7be3

I've bumped the timeout from 30min to 45min as we're still getting builds going red.

Update: I've just reset a bunch of PRs that timed out at 45mins.

@cole-h
Copy link
Member

cole-h commented Aug 11, 2020

Just a quick note: I'm in favor of merging this, but I just tried to redeploy to get our 3rd evaluator back, which failed.

Even if I did merge this, nothing would change until Graham has time to look into the deployment problem, so I'll just wait for him to be available again and 1) have him look at that; and 2) comment on this PR (if necessary).

@zowoq
Copy link
Contributor

zowoq commented Aug 11, 2020

NixOS/nixpkgs#95126

Lets disable the actions until this is resolved so we don't have pages of red PRs.

@zowoq
Copy link
Contributor

zowoq commented Aug 21, 2020

What do we think about using actions to manually set a pending status without a timeout that is then cleared as part of this step?

There would be two actions statuses, one for the pending job and another from the job that sets it.

@Mic92
Copy link
Member Author

Mic92 commented Aug 21, 2020

What do we think about using actions to manually set a pending status without a timeout that is then cleared as part of this step?

There would be two actions statuses, one for the pending job and another from the job that sets it.

That would work too and is probably the better solution.

@Mic92
Copy link
Member Author

Mic92 commented Aug 21, 2020

What do we think about using actions to manually set a pending status without a timeout that is then cleared as part of this step?
There would be two actions statuses, one for the pending job and another from the job that sets it.

That would work too and is probably the better solution.

I am not quite sure if it is possible so because the github token in github actions comes from the user that opens the pull request.

@zowoq
Copy link
Contributor

zowoq commented Aug 21, 2020

https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target

This event is similar to pull_request, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run.

Hopefully this would allow us to use a token in PRs?

@Mic92
Copy link
Member Author

Mic92 commented Aug 21, 2020

docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
This event is similar to pull_request, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run.

Hopefully this would allow us to use a token in PRs?

Yes. This sounds great. We could also use this for cachix. We could even implement this without using ofborg:

  1. Having a workflow that just creates a Waiting for ofborg task
  2. Use a second action that mark the first as complete if the ofborg suite is complete https://docs.github.com/en/actions/reference/events-that-trigger-workflows#check_suite

@Mic92
Copy link
Member Author

Mic92 commented Aug 25, 2020

I will update this PR to mark the Wait for ofborg as non-pending once this project is maintained again.

@worldofpeace
Copy link
Contributor

ping @grahamc

@zowoq
Copy link
Contributor

zowoq commented Dec 2, 2020

@grahamc If we're going to start running more actions in PRs it would be nice to get this resolved.

@zowoq
Copy link
Contributor

zowoq commented Jan 28, 2021

Ping @cole-h @grahamc

cc @SuperSandro2000

@SuperSandro2000
Copy link
Member

Why did you ping me?

@zowoq
Copy link
Contributor

zowoq commented Jan 28, 2021

Sorry, meant to link to IRC. This PR would address your comment about wait for ofborg: https://logs.nix.samueldr.com/nixos-borg/2021-01-27#4546552

ofborg/src/tasks/evaluate.rs Outdated Show resolved Hide resolved
Copy link
Member

@andir andir left a comment

Choose a reason for hiding this comment

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

It is a bit unfortunate that we need this bit of code at all. Thanks to GitHubs limited external CI API. That being said this looks simple enough and solves a real-world pain that several people have noticed and disliked (myself included).

Until we have a way to signal that we started doing our job this seems like the best solution.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

If yall don't merge this 🤣

We need this for better integration into github.
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

Diff LGTM, thanks.

Ok(CommitStatus::new(
api,
commit,
"ofborg-eval-started".to_owned(),
Copy link
Member

Choose a reason for hiding this comment

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

Graham has expressed the desire to remove the grahamc prefix from all the ofborg checks (https://twitter.com/grhmc/status/1353171107550027776 as a recent example), so I decided to do that for this new one here.

@cole-h cole-h merged commit 16355e1 into NixOS:released Jan 29, 2021
@cole-h
Copy link
Member

cole-h commented Jan 29, 2021

Note that I haven't deployed this change yet. In order to streamline this: which PR, if any, needs to be merged after the deploy succeeds?

@zowoq
Copy link
Contributor

zowoq commented Jan 30, 2021

which PR, if any, needs to be merged after the deploy succeeds?

NixOS/nixpkgs#96707

@cole-h
Copy link
Member

cole-h commented Jan 30, 2021

Done.

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

Successfully merging this pull request may close these issues.

None yet

6 participants