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

Evaluate every push to nixpkgs #27

Closed
grahamc opened this issue Dec 22, 2017 · 6 comments
Closed

Evaluate every push to nixpkgs #27

grahamc opened this issue Dec 22, 2017 · 6 comments

Comments

@grahamc
Copy link
Member

grahamc commented Dec 22, 2017

No description provided.

@grahamc
Copy link
Member Author

grahamc commented Jan 29, 2018

We'd want to remove the labeling feature and the pre-merge parts, and just run the post-merge steps. Here is an event to the routing key push.nixos/nixpkgs:

{
  "ref": "refs/heads/master",
  "before": "f5e39b2c26d3e423bc6af8441233da28274a4495",
  "after": "9a6aa3cccb40cd5dcd491f67adf690fede7f0280",
  "created": false,
  "deleted": false,
  "forced": false,
  "base_ref": null,
  "compare": "https://github.com/NixOS/nixpkgs/compare/f5e39b2c26d3...9a6aa3cccb40",
  "commits": [
    {
      "id": "9ad529e5c4208235a336033216476d5b5982ce5e",
      "tree_id": "161072027c2819e14cbbf29d23d4c98011166c80",
      "distinct": true,
      "message": "datadiff: don't restrict to python2",
      "timestamp": "2018-01-10T14:48:20-06:00",
      "url": "https://github.com/NixOS/nixpkgs/commit/9ad529e5c4208235a336033216476d5b5982ce5e",
      "author": {
        "name": "Allen Nelson",
        "email": "anelson@narrativescience.com",
        "username": "adnelson"
      },
      "committer": {
        "name": "Allen Nelson",
        "email": "anelson@narrativescience.com",
        "username": "adnelson"
      },
      "added": [],
      "removed": [],
      "modified": [
        "pkgs/top-level/python-packages.nix"
      ]
    },
    {
      "id": "9a6aa3cccb40cd5dcd491f67adf690fede7f0280",
      "tree_id": "33d0cde963b2ea5e0c3dc8a6798a7492f01111f6",
      "distinct": true,
      "message": "Merge pull request #33721 from adnelson\\/datadiff_python3\n\ndatadiff: don't restrict to python2",
      "timestamp": "2018-01-11T10:47:21+08:00",
      "url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs\\/commit\\/9a6aa3cccb40cd5dcd491f67adf690fede7f0280",
      "author": {
        "name": "adisbladis",
        "email": "adisbladis@gmail.com",
        "username": "adisbladis"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "username": "web-flow"
      },
      "added": [],
      "removed": [],
      "modified": [
        "pkgs\\/top-level\\/python-packages.nix"
      ]
    }
  ],
  "head_commit": {
    "id": "9a6aa3cccb40cd5dcd491f67adf690fede7f0280",
    "tree_id": "33d0cde963b2ea5e0c3dc8a6798a7492f01111f6",
    "distinct": true,
    "message": "Merge pull request #33721 from adnelson\\/datadiff_python3\n\ndatadiff: don't restrict to python2",
    "timestamp": "2018-01-11T10:47:21+08:00",
    "url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs\\/commit\\/9a6aa3cccb40cd5dcd491f67adf690fede7f0280",
    "author": {
      "name": "adisbladis",
      "email": "adisbladis@gmail.com",
      "username": "adisbladis"
    },
    "committer": {
      "name": "GitHub",
      "email": "noreply@github.com",
      "username": "web-flow"
    },
    "added": [],
    "removed": [],
    "modified": [
      "pkgs\\/top-level\\/python-packages.nix"
    ]
  },
  "repository": {
    "id": 4542716,
    "name": "nixpkgs",
    "full_name": "NixOS\\/nixpkgs",
    "owner": {
      "name": "NixOS",
      "email": "",
      "login": "NixOS",
      "id": 487568,
      "avatar_url": "https:\\/\\/avatars3.githubusercontent.com\\/u\\/487568?v=4",
      "gravatar_id": "",
      "url": "https:\\/\\/api.github.com\\/users\\/NixOS",
      "html_url": "https:\\/\\/github.com\\/NixOS",
      "followers_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/followers",
      "following_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/following{\\/other_user}",
      "gists_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/gists{\\/gist_id}",
      "starred_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/starred{\\/owner}{\\/repo}",
      "subscriptions_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/subscriptions",
      "organizations_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/orgs",
      "repos_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/repos",
      "events_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/events{\\/privacy}",
      "received_events_url": "https:\\/\\/api.github.com\\/users\\/NixOS\\/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "private": false,
    "html_url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs",
    "description": "Nix Packages collection",
    "fork": false,
    "url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs",
    "forks_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/forks",
    "keys_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/keys{\\/key_id}",
    "collaborators_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/collaborators{\\/collaborator}",
    "teams_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/teams",
    "hooks_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/hooks",
    "issue_events_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/issues\\/events{\\/number}",
    "events_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/events",
    "assignees_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/assignees{\\/user}",
    "branches_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/branches{\\/branch}",
    "tags_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/tags",
    "blobs_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/git\\/blobs{\\/sha}",
    "git_tags_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/git\\/tags{\\/sha}",
    "git_refs_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/git\\/refs{\\/sha}",
    "trees_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/git\\/trees{\\/sha}",
    "statuses_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/statuses\\/{sha}",
    "languages_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/languages",
    "stargazers_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/stargazers",
    "contributors_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/contributors",
    "subscribers_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/subscribers",
    "subscription_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/subscription",
    "commits_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/commits{\\/sha}",
    "git_commits_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/git\\/commits{\\/sha}",
    "comments_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/comments{\\/number}",
    "issue_comment_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/issues\\/comments{\\/number}",
    "contents_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/contents\\/{+path}",
    "compare_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/compare\\/{base}...{head}",
    "merges_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/merges",
    "archive_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/{archive_format}{\\/ref}",
    "downloads_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/downloads",
    "issues_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/issues{\\/number}",
    "pulls_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/pulls{\\/number}",
    "milestones_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/milestones{\\/number}",
    "notifications_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/notifications{?since,all,participating}",
    "labels_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/labels{\\/name}",
    "releases_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/releases{\\/id}",
    "deployments_url": "https:\\/\\/api.github.com\\/repos\\/NixOS\\/nixpkgs\\/deployments",
    "created_at": 1338778186,
    "updated_at": "2018-01-10T19:06:48Z",
    "pushed_at": 1515638841,
    "git_url": "git:\\/\\/github.com\\/NixOS\\/nixpkgs.git",
    "ssh_url": "git@github.com:NixOS\\/nixpkgs.git",
    "clone_url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs.git",
    "svn_url": "https:\\/\\/github.com\\/NixOS\\/nixpkgs",
    "homepage": null,
    "size": 731779,
    "stargazers_count": 2141,
    "watchers_count": 2141,
    "language": "Nix",
    "has_issues": true,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": false,
    "forks_count": 2489,
    "mirror_url": null,
    "archived": false,
    "open_issues_count": 2750,
    "license": {
      "key": "other",
      "name": "Other",
      "spdx_id": null,
      "url": null
    },
    "forks": 2489,
    "open_issues": 2765,
    "watchers": 2141,
    "default_branch": "master",
    "stargazers": 2141,
    "master_branch": "master",
    "organization": "NixOS"
  },
  "pusher": {
    "name": "adisbladis",
    "email": "adisbladis@gmail.com"
  },
  "organization": {
    "login": "NixOS",
    "id": 487568,
    "url": "https:\\/\\/api.github.com\\/orgs\\/NixOS",
    "repos_url": "https:\\/\\/api.github.com\\/orgs\\/NixOS\\/repos",
    "events_url": "https:\\/\\/api.github.com\\/orgs\\/NixOS\\/events",
    "hooks_url": "https:\\/\\/api.github.com\\/orgs\\/NixOS\\/hooks",
    "issues_url": "https:\\/\\/api.github.com\\/orgs\\/NixOS\\/issues",
    "members_url": "https:\\/\\/api.github.com\\/orgs\\/NixOS\\/members{\\/member}",
    "public_members_url": "https:\\/\\/api.github.com\\/orgs\\/NixOS\\/public_members{\\/member}",
    "avatar_url": "https:\\/\\/avatars3.githubusercontent.com\\/u\\/487568?v=4",
    "description": ""
  },
  "sender": {
    "login": "adisbladis",
    "id": 63286,
    "avatar_url": "https:\\/\\/avatars3.githubusercontent.com\\/u\\/63286?v=4",
    "gravatar_id": "",
    "url": "https:\\/\\/api.github.com\\/users\\/adisbladis",
    "html_url": "https:\\/\\/github.com\\/adisbladis",
    "followers_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/followers",
    "following_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/following{\\/other_user}",
    "gists_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/gists{\\/gist_id}",
    "starred_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/starred{\\/owner}{\\/repo}",
    "subscriptions_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/subscriptions",
    "organizations_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/orgs",
    "repos_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/repos",
    "events_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/events{\\/privacy}",
    "received_events_url": "https:\\/\\/api.github.com\\/users\\/adisbladis\\/received_events",
    "type": "User",
    "site_admin": false
  }
}

@domenkozar
Copy link
Member

This would be really good for preventing master to fail.

Currently dev workflow is:

  • make a change in nixpkgs
  • eval + tests locally
  • git push

There are two ways to prevent breakage on master:

a) Enforce PRs, this has a major drawback of adding a few extra steps for each change - I think much of the success of nixpkgs is that it's so simple to work with

b) auto-revert commits that break master, this way good commits are not punished, and if eval breaks, commit is reverted (and user gets a github ping and thus an email)

@Ericson2314
Copy link
Member

I am for enforcing PRs. That's what I myself do (i.e. merging little PRs right after ofborg passes). Not only is it totally worth the extra testing, but it provides a nicer way to comment on GitHub post merge.

@domenkozar
Copy link
Member

Depends on the type of work. If you do huge refactorings, it's basically a must. But some folks do lots of package bumps and it quickly gets annoying. Note that auto-revert doesn't prevent you from doing PRs, while enforce-PRs does change development workflow.

@7c6f434c
Copy link
Member

7c6f434c commented Nov 4, 2018

Personally, I also want small additions and near-leaf package bumps as far from the PR list bottleneck as possible, even if they do not compete for the review resources.

On the other hand, I think both enforcing PRs and trying to auto-revert anything would be better to try after #112 gets an implementation and some usage.

@cole-h
Copy link
Member

cole-h commented Aug 15, 2023

ofborg runs on all PRs, there are no more direct pushes (to protected branches): NixOS/nixpkgs#249117

@cole-h cole-h closed this as completed Aug 15, 2023
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

No branches or pull requests

5 participants