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

Experiment: CODENOTIFY #155440

Closed
wants to merge 1 commit into from
Closed

Experiment: CODENOTIFY #155440

wants to merge 1 commit into from

Conversation

piegamesde
Copy link
Member

Motivation for this change

A first step towards #143441. Just an experiment

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@piegamesde piegamesde marked this pull request as ready for review January 18, 2022 00:59
@piegamesde piegamesde requested review from Mic92, zowoq and a team as code owners January 18, 2022 00:59
.github/workflows/codeowners.yml Outdated Show resolved Hide resolved
on:
pull_request:
types: [opened, synchronize, ready_for_review]
push:
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this action work with push events ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know. I figured that I wanted to re-run the action on every push for testing the initial setup. I guess that it'll comment on the PR after every push, but we'll have to find out

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess that it'll comment on the PR after every push, but we'll have to find out

No. push is for stuff that happens outside of PRs. Can't request a review of a commit pushed to master.

Copy link
Contributor

@zowoq zowoq Jan 18, 2022

Choose a reason for hiding this comment

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

Does this action request reviews or post comments?

ofborg used to post comments and it was changed to review requests, IIRC people thought it was too spammy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I understand. In that case, push is indeed kinda useless.

The action posts comments instead of requesting reviews (by design, see their README). There's a lot of configuring to be done, but I wanted to start simple. (Configuring as in "forking modifying the action", since it has no YAML options.)

Copy link
Contributor

@zowoq zowoq Jan 18, 2022

Choose a reason for hiding this comment

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

Posting comments may be a dealbreaker TBH.

Review requests are preferred as they can't be resent, posting/updating comments will notify every time.

IIRC there was another bot before ofborg that also posted comments, might be worthwhile checking what happened to it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that we want review requests. Since the action does not have a lot of code, this shouldn't be too hard to add. But we first need to decide whether we want this at all, or if we prefer some self-written custom solution of some sorts.

Copy link
Contributor

Choose a reason for hiding this comment

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

Having looked at it a bit more I don't think using sourcegraph/codenotify is a good idea.

https://github.com/sourcegraph/codenotify#why-use-codenotify
There can be a CODENOTIFY file in any directory.

IMHO allowing CODENOTIFY files at arbitrary places in the tree that can't be easily inspected without tooling is a negative considering the size of our tree and number of contributors.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can always restrict ourselves to using only the top-level entry first and then discuss that issue later on. IMHO the experiences with large files (all-packages.nix, release notes, …) have taught that they are rather ugly to work with and distributing content from a central file to the place it actually refers to is a good idea.

Copy link
Contributor

@zowoq zowoq Jan 19, 2022

Choose a reason for hiding this comment

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

We can always restrict ourselves to using only the top-level entry first then discuss that issue later on.

How?

If it can't be restricted via tooling to the top-level file it needs to be discussed first.

IMHO the experiences with large files (all-packages.nix, release notes, …) have taught that they are rather ugly to work with and distributing content from a central file to the place it actually refers to is a good idea.

Currently maintainers could be set via meta.maintainers or CODEOWNERS. It is in a predictable position, either at the top or the bottom of the tree. It can be easily inspected manually or for meta.maintainers it can be queried it using nix.

With this approach it can be set anywhere, can't be easily inspected manually and it can only be queried via a custom tool?

.github/workflows/codeowners.yml Outdated Show resolved Hide resolved
.github/workflows/codeowners.yml Outdated Show resolved Hide resolved
ref: ${{ github.event.pull_request.head.sha }}
- uses: sourcegraph/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.CODENOTIFY_GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Who is setting this token?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought I had responded to this but GitHub does not show it anymore. Did you get anything?

Copy link
Contributor

Choose a reason for hiding this comment

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

It needs to be set by an admin.

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought I had responded to this but GitHub does not show it anymore. Did you get anything?

Ah, sorry I misread this. No I didn't see a response.

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting. Anyways, I don't know what I'm doing there and why, I mostly copied some example configuration. If I understand it correctly, the token is required to be able to ping teams. So it should be able to ping individuals even without.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 18, 2022
@piegamesde piegamesde removed request for a team and Mic92 January 18, 2022 01:18
@piegamesde
Copy link
Member Author

@zowoq Thank you for having a look. As you can tell, I don't really know a lot about GitHub actions and I'm just pressing buttons and see what they do ^^.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 31, 2022
@FliegendeWurst FliegendeWurst added the 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions label Nov 17, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 17, 2024
@FliegendeWurst
Copy link
Member

What's the status of this given #347610 (new codeowners mechanism) was merged?

@piegamesde piegamesde closed this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants