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

Webhook delivery timeout issue for the validate_maintenance_branch_pr route handler #254

Open
Mariatta opened this issue Aug 11, 2020 · 10 comments
Labels

Comments

@Mariatta
Copy link
Member

Mariatta commented Aug 11, 2020

While looking into python/cpython#21830, I noticed several failed webhook deliveries.

I attempted to re-deliver the same webhook payloads, but it seems that the webhook event consistently timed out for the payload below. I think we need to further investigate.

I found that if I removed the [3.9] from the title, then the status got posted immediately. (no timeout). And if I removed the (GH-21773), it also succeeds without timeout.

Click to see delivery details
{
  "action": "edited",
  "number": 21830,
  "pull_request": {
    "url": "https://api.github.com/repos/python/cpython/pulls/21830",
    "id": 466150827,
    "node_id": "MDExOlB1bGxSZXF1ZXN0NDY2MTUwODI3",
    "html_url": "https://github.com/python/cpython/pull/21830",
    "diff_url": "https://github.com/python/cpython/pull/21830.diff",
    "patch_url": "https://github.com/python/cpython/pull/21830.patch",
    "issue_url": "https://api.github.com/repos/python/cpython/issues/21830",
    "number": 21830,
    "state": "open",
    "locked": false,
    "title": "[3.9] bpo-41504: Add links to asttokens, leoAst, LibCST and parso to ast docs (GH-21773)",
    "user": {
      "login": "gvanrossum",
      "id": 2894642,
      "node_id": "MDQ6VXNlcjI4OTQ2NDI=",
      "avatar_url": "https://avatars3.githubusercontent.com/u/2894642?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/gvanrossum",
      "html_url": "https://github.com/gvanrossum",
      "followers_url": "https://api.github.com/users/gvanrossum/followers",
      "following_url": "https://api.github.com/users/gvanrossum/following{/other_user}",
      "gists_url": "https://api.github.com/users/gvanrossum/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/gvanrossum/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/gvanrossum/subscriptions",
      "organizations_url": "https://api.github.com/users/gvanrossum/orgs",
      "repos_url": "https://api.github.com/users/gvanrossum/repos",
      "events_url": "https://api.github.com/users/gvanrossum/events{/privacy}",
      "received_events_url": "https://api.github.com/users/gvanrossum/received_events",
      "type": "User",
      "site_admin": false
    },
    "body": "(cherry picked from commit e3c971ccfa58afcb2656b71b95e10b9703f2ad32)\r\n\r\nCo-authored-by: Edward K. Ream <edreamleo@gmail.com>\r\n\r\nhttps://bugs.python.org/issue41504\n\n<!-- issue-number: [bpo-41504](https://bugs.python.org/issue41504) -->\nhttps://bugs.python.org/issue41504\n<!-- /issue-number -->\n",
    "created_at": "2020-08-11T14:43:30Z",
    "updated_at": "2020-08-11T19:39:41Z",
    "closed_at": null,
    "merged_at": null,
    "merge_commit_sha": "de7bb884a6f201f860f9120bfde7f56556696cee",
    "assignee": null,
    "assignees": [

    ],
    "requested_reviewers": [

    ],
    "requested_teams": [

    ],
    "labels": [
      {
        "id": 536945472,
        "node_id": "MDU6TGFiZWw1MzY5NDU0NzI=",
        "url": "https://api.github.com/repos/python/cpython/labels/CLA%20signed",
        "name": "CLA signed",
        "color": "0e8a16",
        "default": false,
        "description": null
      },
      {
        "id": 647202665,
        "node_id": "MDU6TGFiZWw2NDcyMDI2NjU=",
        "url": "https://api.github.com/repos/python/cpython/labels/skip%20issue",
        "name": "skip issue",
        "color": "000000",
        "default": false,
        "description": null
      },
      {
        "id": 667924166,
        "node_id": "MDU6TGFiZWw2Njc5MjQxNjY=",
        "url": "https://api.github.com/repos/python/cpython/labels/skip%20news",
        "name": "skip news",
        "color": "000000",
        "default": false,
        "description": null
      }
    ],
    "milestone": null,
    "draft": false,
    "commits_url": "https://api.github.com/repos/python/cpython/pulls/21830/commits",
    "review_comments_url": "https://api.github.com/repos/python/cpython/pulls/21830/comments",
    "review_comment_url": "https://api.github.com/repos/python/cpython/pulls/comments{/number}",
    "comments_url": "https://api.github.com/repos/python/cpython/issues/21830/comments",
    "statuses_url": "https://api.github.com/repos/python/cpython/statuses/ebb7f34670b42f26cc9a7b25fe584f7d332c4ae1",
    "head": {
      "label": "gvanrossum:backport-e3c971c-3.9",
      "ref": "backport-e3c971c-3.9",
      "sha": "ebb7f34670b42f26cc9a7b25fe584f7d332c4ae1",
      "user": {
        "login": "gvanrossum",
        "id": 2894642,
        "node_id": "MDQ6VXNlcjI4OTQ2NDI=",
        "avatar_url": "https://avatars3.githubusercontent.com/u/2894642?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/gvanrossum",
        "html_url": "https://github.com/gvanrossum",
        "followers_url": "https://api.github.com/users/gvanrossum/followers",
        "following_url": "https://api.github.com/users/gvanrossum/following{/other_user}",
        "gists_url": "https://api.github.com/users/gvanrossum/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/gvanrossum/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/gvanrossum/subscriptions",
        "organizations_url": "https://api.github.com/users/gvanrossum/orgs",
        "repos_url": "https://api.github.com/users/gvanrossum/repos",
        "events_url": "https://api.github.com/users/gvanrossum/events{/privacy}",
        "received_events_url": "https://api.github.com/users/gvanrossum/received_events",
        "type": "User",
        "site_admin": false
      },
      "repo": {
        "id": 141325483,
        "node_id": "MDEwOlJlcG9zaXRvcnkxNDEzMjU0ODM=",
        "name": "cpython",
        "full_name": "gvanrossum/cpython",
        "private": false,
        "owner": {
          "login": "gvanrossum",
          "id": 2894642,
          "node_id": "MDQ6VXNlcjI4OTQ2NDI=",
          "avatar_url": "https://avatars3.githubusercontent.com/u/2894642?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/gvanrossum",
          "html_url": "https://github.com/gvanrossum",
          "followers_url": "https://api.github.com/users/gvanrossum/followers",
          "following_url": "https://api.github.com/users/gvanrossum/following{/other_user}",
          "gists_url": "https://api.github.com/users/gvanrossum/gists{/gist_id}",
          "starred_url": "https://api.github.com/users/gvanrossum/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/gvanrossum/subscriptions",
          "organizations_url": "https://api.github.com/users/gvanrossum/orgs",
          "repos_url": "https://api.github.com/users/gvanrossum/repos",
          "events_url": "https://api.github.com/users/gvanrossum/events{/privacy}",
          "received_events_url": "https://api.github.com/users/gvanrossum/received_events",
          "type": "User",
          "site_admin": false
        },
        "html_url": "https://github.com/gvanrossum/cpython",
        "description": "The Python programming language",
        "fork": true,
        "url": "https://api.github.com/repos/gvanrossum/cpython",
        "forks_url": "https://api.github.com/repos/gvanrossum/cpython/forks",
        "keys_url": "https://api.github.com/repos/gvanrossum/cpython/keys{/key_id}",
        "collaborators_url": "https://api.github.com/repos/gvanrossum/cpython/collaborators{/collaborator}",
        "teams_url": "https://api.github.com/repos/gvanrossum/cpython/teams",
        "hooks_url": "https://api.github.com/repos/gvanrossum/cpython/hooks",
        "issue_events_url": "https://api.github.com/repos/gvanrossum/cpython/issues/events{/number}",
        "events_url": "https://api.github.com/repos/gvanrossum/cpython/events",
        "assignees_url": "https://api.github.com/repos/gvanrossum/cpython/assignees{/user}",
        "branches_url": "https://api.github.com/repos/gvanrossum/cpython/branches{/branch}",
        "tags_url": "https://api.github.com/repos/gvanrossum/cpython/tags",
        "blobs_url": "https://api.github.com/repos/gvanrossum/cpython/git/blobs{/sha}",
        "git_tags_url": "https://api.github.com/repos/gvanrossum/cpython/git/tags{/sha}",
        "git_refs_url": "https://api.github.com/repos/gvanrossum/cpython/git/refs{/sha}",
        "trees_url": "https://api.github.com/repos/gvanrossum/cpython/git/trees{/sha}",
        "statuses_url": "https://api.github.com/repos/gvanrossum/cpython/statuses/{sha}",
        "languages_url": "https://api.github.com/repos/gvanrossum/cpython/languages",
        "stargazers_url": "https://api.github.com/repos/gvanrossum/cpython/stargazers",
        "contributors_url": "https://api.github.com/repos/gvanrossum/cpython/contributors",
        "subscribers_url": "https://api.github.com/repos/gvanrossum/cpython/subscribers",
        "subscription_url": "https://api.github.com/repos/gvanrossum/cpython/subscription",
        "commits_url": "https://api.github.com/repos/gvanrossum/cpython/commits{/sha}",
        "git_commits_url": "https://api.github.com/repos/gvanrossum/cpython/git/commits{/sha}",
        "comments_url": "https://api.github.com/repos/gvanrossum/cpython/comments{/number}",
        "issue_comment_url": "https://api.github.com/repos/gvanrossum/cpython/issues/comments{/number}",
        "contents_url": "https://api.github.com/repos/gvanrossum/cpython/contents/{+path}",
        "compare_url": "https://api.github.com/repos/gvanrossum/cpython/compare/{base}...{head}",
        "merges_url": "https://api.github.com/repos/gvanrossum/cpython/merges",
        "archive_url": "https://api.github.com/repos/gvanrossum/cpython/{archive_format}{/ref}",
        "downloads_url": "https://api.github.com/repos/gvanrossum/cpython/downloads",
        "issues_url": "https://api.github.com/repos/gvanrossum/cpython/issues{/number}",
        "pulls_url": "https://api.github.com/repos/gvanrossum/cpython/pulls{/number}",
        "milestones_url": "https://api.github.com/repos/gvanrossum/cpython/milestones{/number}",
        "notifications_url": "https://api.github.com/repos/gvanrossum/cpython/notifications{?since,all,participating}",
        "labels_url": "https://api.github.com/repos/gvanrossum/cpython/labels{/name}",
        "releases_url": "https://api.github.com/repos/gvanrossum/cpython/releases{/id}",
        "deployments_url": "https://api.github.com/repos/gvanrossum/cpython/deployments",
        "created_at": "2018-07-17T18:01:14Z",
        "updated_at": "2020-08-01T22:34:02Z",
        "pushed_at": "2020-08-11T14:42:36Z",
        "git_url": "git://github.com/gvanrossum/cpython.git",
        "ssh_url": "git@github.com:gvanrossum/cpython.git",
        "clone_url": "https://github.com/gvanrossum/cpython.git",
        "svn_url": "https://github.com/gvanrossum/cpython",
        "homepage": "https://www.python.org/",
        "size": 320141,
        "stargazers_count": 73,
        "watchers_count": 73,
        "language": "Python",
        "has_issues": false,
        "has_projects": true,
        "has_downloads": true,
        "has_wiki": false,
        "has_pages": false,
        "forks_count": 6,
        "mirror_url": null,
        "archived": false,
        "disabled": false,
        "open_issues_count": 0,
        "license": {
          "key": "other",
          "name": "Other",
          "spdx_id": "NOASSERTION",
          "url": null,
          "node_id": "MDc6TGljZW5zZTA="
        },
        "forks": 6,
        "open_issues": 0,
        "watchers": 73,
        "default_branch": "master",
        "allow_squash_merge": true,
        "allow_merge_commit": true,
        "allow_rebase_merge": true,
        "delete_branch_on_merge": false
      }
    },
    "base": {
      "label": "python:3.9",
      "ref": "3.9",
      "sha": "2cd58d8bb15c1afaeef59106941d6db697074ce8",
      "user": {
        "login": "python",
        "id": 1525981,
        "node_id": "MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=",
        "avatar_url": "https://avatars3.githubusercontent.com/u/1525981?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/python",
        "html_url": "https://github.com/python",
        "followers_url": "https://api.github.com/users/python/followers",
        "following_url": "https://api.github.com/users/python/following{/other_user}",
        "gists_url": "https://api.github.com/users/python/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/python/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/python/subscriptions",
        "organizations_url": "https://api.github.com/users/python/orgs",
        "repos_url": "https://api.github.com/users/python/repos",
        "events_url": "https://api.github.com/users/python/events{/privacy}",
        "received_events_url": "https://api.github.com/users/python/received_events",
        "type": "Organization",
        "site_admin": false
      },
      "repo": {
        "id": 81598961,
        "node_id": "MDEwOlJlcG9zaXRvcnk4MTU5ODk2MQ==",
        "name": "cpython",
        "full_name": "python/cpython",
        "private": false,
        "owner": {
          "login": "python",
          "id": 1525981,
          "node_id": "MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=",
          "avatar_url": "https://avatars3.githubusercontent.com/u/1525981?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/python",
          "html_url": "https://github.com/python",
          "followers_url": "https://api.github.com/users/python/followers",
          "following_url": "https://api.github.com/users/python/following{/other_user}",
          "gists_url": "https://api.github.com/users/python/gists{/gist_id}",
          "starred_url": "https://api.github.com/users/python/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/python/subscriptions",
          "organizations_url": "https://api.github.com/users/python/orgs",
          "repos_url": "https://api.github.com/users/python/repos",
          "events_url": "https://api.github.com/users/python/events{/privacy}",
          "received_events_url": "https://api.github.com/users/python/received_events",
          "type": "Organization",
          "site_admin": false
        },
        "html_url": "https://github.com/python/cpython",
        "description": "The Python programming language",
        "fork": false,
        "url": "https://api.github.com/repos/python/cpython",
        "forks_url": "https://api.github.com/repos/python/cpython/forks",
        "keys_url": "https://api.github.com/repos/python/cpython/keys{/key_id}",
        "collaborators_url": "https://api.github.com/repos/python/cpython/collaborators{/collaborator}",
        "teams_url": "https://api.github.com/repos/python/cpython/teams",
        "hooks_url": "https://api.github.com/repos/python/cpython/hooks",
        "issue_events_url": "https://api.github.com/repos/python/cpython/issues/events{/number}",
        "events_url": "https://api.github.com/repos/python/cpython/events",
        "assignees_url": "https://api.github.com/repos/python/cpython/assignees{/user}",
        "branches_url": "https://api.github.com/repos/python/cpython/branches{/branch}",
        "tags_url": "https://api.github.com/repos/python/cpython/tags",
        "blobs_url": "https://api.github.com/repos/python/cpython/git/blobs{/sha}",
        "git_tags_url": "https://api.github.com/repos/python/cpython/git/tags{/sha}",
        "git_refs_url": "https://api.github.com/repos/python/cpython/git/refs{/sha}",
        "trees_url": "https://api.github.com/repos/python/cpython/git/trees{/sha}",
        "statuses_url": "https://api.github.com/repos/python/cpython/statuses/{sha}",
        "languages_url": "https://api.github.com/repos/python/cpython/languages",
        "stargazers_url": "https://api.github.com/repos/python/cpython/stargazers",
        "contributors_url": "https://api.github.com/repos/python/cpython/contributors",
        "subscribers_url": "https://api.github.com/repos/python/cpython/subscribers",
        "subscription_url": "https://api.github.com/repos/python/cpython/subscription",
        "commits_url": "https://api.github.com/repos/python/cpython/commits{/sha}",
        "git_commits_url": "https://api.github.com/repos/python/cpython/git/commits{/sha}",
        "comments_url": "https://api.github.com/repos/python/cpython/comments{/number}",
        "issue_comment_url": "https://api.github.com/repos/python/cpython/issues/comments{/number}",
        "contents_url": "https://api.github.com/repos/python/cpython/contents/{+path}",
        "compare_url": "https://api.github.com/repos/python/cpython/compare/{base}...{head}",
        "merges_url": "https://api.github.com/repos/python/cpython/merges",
        "archive_url": "https://api.github.com/repos/python/cpython/{archive_format}{/ref}",
        "downloads_url": "https://api.github.com/repos/python/cpython/downloads",
        "issues_url": "https://api.github.com/repos/python/cpython/issues{/number}",
        "pulls_url": "https://api.github.com/repos/python/cpython/pulls{/number}",
        "milestones_url": "https://api.github.com/repos/python/cpython/milestones{/number}",
        "notifications_url": "https://api.github.com/repos/python/cpython/notifications{?since,all,participating}",
        "labels_url": "https://api.github.com/repos/python/cpython/labels{/name}",
        "releases_url": "https://api.github.com/repos/python/cpython/releases{/id}",
        "deployments_url": "https://api.github.com/repos/python/cpython/deployments",
        "created_at": "2017-02-10T19:23:51Z",
        "updated_at": "2020-08-11T19:22:51Z",
        "pushed_at": "2020-08-11T19:14:53Z",
        "git_url": "git://github.com/python/cpython.git",
        "ssh_url": "git@github.com:python/cpython.git",
        "clone_url": "https://github.com/python/cpython.git",
        "svn_url": "https://github.com/python/cpython",
        "homepage": "https://www.python.org/",
        "size": 338387,
        "stargazers_count": 32948,
        "watchers_count": 32948,
        "language": "Python",
        "has_issues": false,
        "has_projects": false,
        "has_downloads": true,
        "has_wiki": false,
        "has_pages": false,
        "forks_count": 15726,
        "mirror_url": null,
        "archived": false,
        "disabled": false,
        "open_issues_count": 1310,
        "license": {
          "key": "other",
          "name": "Other",
          "spdx_id": "NOASSERTION",
          "url": null,
          "node_id": "MDc6TGljZW5zZTA="
        },
        "forks": 15726,
        "open_issues": 1310,
        "watchers": 32948,
        "default_branch": "master",
        "allow_squash_merge": true,
        "allow_merge_commit": false,
        "allow_rebase_merge": false,
        "delete_branch_on_merge": true
      }
    },
    "_links": {
      "self": {
        "href": "https://api.github.com/repos/python/cpython/pulls/21830"
      },
      "html": {
        "href": "https://github.com/python/cpython/pull/21830"
      },
      "issue": {
        "href": "https://api.github.com/repos/python/cpython/issues/21830"
      },
      "comments": {
        "href": "https://api.github.com/repos/python/cpython/issues/21830/comments"
      },
      "review_comments": {
        "href": "https://api.github.com/repos/python/cpython/pulls/21830/comments"
      },
      "review_comment": {
        "href": "https://api.github.com/repos/python/cpython/pulls/comments{/number}"
      },
      "commits": {
        "href": "https://api.github.com/repos/python/cpython/pulls/21830/commits"
      },
      "statuses": {
        "href": "https://api.github.com/repos/python/cpython/statuses/ebb7f34670b42f26cc9a7b25fe584f7d332c4ae1"
      }
    },
    "author_association": "MEMBER",
    "active_lock_reason": null,
    "merged": false,
    "mergeable": true,
    "rebaseable": true,
    "mergeable_state": "unstable",
    "merged_by": null,
    "comments": 3,
    "review_comments": 0,
    "maintainer_can_modify": true,
    "commits": 1,
    "additions": 21,
    "deletions": 2,
    "changed_files": 1
  },
  "changes": {
    "title": {
      "from": "bpo-41504: Add links to asttokens, leoAst, LibCST and parso to ast docs (GH-21773)"
    }
  },
  "repository": {
    "id": 81598961,
    "node_id": "MDEwOlJlcG9zaXRvcnk4MTU5ODk2MQ==",
    "name": "cpython",
    "full_name": "python/cpython",
    "private": false,
    "owner": {
      "login": "python",
      "id": 1525981,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=",
      "avatar_url": "https://avatars3.githubusercontent.com/u/1525981?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/python",
      "html_url": "https://github.com/python",
      "followers_url": "https://api.github.com/users/python/followers",
      "following_url": "https://api.github.com/users/python/following{/other_user}",
      "gists_url": "https://api.github.com/users/python/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/python/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/python/subscriptions",
      "organizations_url": "https://api.github.com/users/python/orgs",
      "repos_url": "https://api.github.com/users/python/repos",
      "events_url": "https://api.github.com/users/python/events{/privacy}",
      "received_events_url": "https://api.github.com/users/python/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "html_url": "https://github.com/python/cpython",
    "description": "The Python programming language",
    "fork": false,
    "url": "https://api.github.com/repos/python/cpython",
    "forks_url": "https://api.github.com/repos/python/cpython/forks",
    "keys_url": "https://api.github.com/repos/python/cpython/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/python/cpython/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/python/cpython/teams",
    "hooks_url": "https://api.github.com/repos/python/cpython/hooks",
    "issue_events_url": "https://api.github.com/repos/python/cpython/issues/events{/number}",
    "events_url": "https://api.github.com/repos/python/cpython/events",
    "assignees_url": "https://api.github.com/repos/python/cpython/assignees{/user}",
    "branches_url": "https://api.github.com/repos/python/cpython/branches{/branch}",
    "tags_url": "https://api.github.com/repos/python/cpython/tags",
    "blobs_url": "https://api.github.com/repos/python/cpython/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/python/cpython/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/python/cpython/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/python/cpython/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/python/cpython/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/python/cpython/languages",
    "stargazers_url": "https://api.github.com/repos/python/cpython/stargazers",
    "contributors_url": "https://api.github.com/repos/python/cpython/contributors",
    "subscribers_url": "https://api.github.com/repos/python/cpython/subscribers",
    "subscription_url": "https://api.github.com/repos/python/cpython/subscription",
    "commits_url": "https://api.github.com/repos/python/cpython/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/python/cpython/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/python/cpython/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/python/cpython/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/python/cpython/contents/{+path}",
    "compare_url": "https://api.github.com/repos/python/cpython/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/python/cpython/merges",
    "archive_url": "https://api.github.com/repos/python/cpython/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/python/cpython/downloads",
    "issues_url": "https://api.github.com/repos/python/cpython/issues{/number}",
    "pulls_url": "https://api.github.com/repos/python/cpython/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/python/cpython/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/python/cpython/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/python/cpython/labels{/name}",
    "releases_url": "https://api.github.com/repos/python/cpython/releases{/id}",
    "deployments_url": "https://api.github.com/repos/python/cpython/deployments",
    "created_at": "2017-02-10T19:23:51Z",
    "updated_at": "2020-08-11T19:22:51Z",
    "pushed_at": "2020-08-11T19:14:53Z",
    "git_url": "git://github.com/python/cpython.git",
    "ssh_url": "git@github.com:python/cpython.git",
    "clone_url": "https://github.com/python/cpython.git",
    "svn_url": "https://github.com/python/cpython",
    "homepage": "https://www.python.org/",
    "size": 338387,
    "stargazers_count": 32948,
    "watchers_count": 32948,
    "language": "Python",
    "has_issues": false,
    "has_projects": false,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": false,
    "forks_count": 15726,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 1310,
    "license": {
      "key": "other",
      "name": "Other",
      "spdx_id": "NOASSERTION",
      "url": null,
      "node_id": "MDc6TGljZW5zZTA="
    },
    "forks": 15726,
    "open_issues": 1310,
    "watchers": 32948,
    "default_branch": "master"
  },
  "organization": {
    "login": "python",
    "id": 1525981,
    "node_id": "MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=",
    "url": "https://api.github.com/orgs/python",
    "repos_url": "https://api.github.com/orgs/python/repos",
    "events_url": "https://api.github.com/orgs/python/events",
    "hooks_url": "https://api.github.com/orgs/python/hooks",
    "issues_url": "https://api.github.com/orgs/python/issues",
    "members_url": "https://api.github.com/orgs/python/members{/member}",
    "public_members_url": "https://api.github.com/orgs/python/public_members{/member}",
    "avatar_url": "https://avatars3.githubusercontent.com/u/1525981?v=4",
    "description": "Repositories related to the Python Programming language"
  },
  "sender": {
    "login": "Mariatta",
    "id": 5844587,
    "node_id": "MDQ6VXNlcjU4NDQ1ODc=",
    "avatar_url": "https://avatars1.githubusercontent.com/u/5844587?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/Mariatta",
    "html_url": "https://github.com/Mariatta",
    "followers_url": "https://api.github.com/users/Mariatta/followers",
    "following_url": "https://api.github.com/users/Mariatta/following{/other_user}",
    "gists_url": "https://api.github.com/users/Mariatta/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/Mariatta/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/Mariatta/subscriptions",
    "organizations_url": "https://api.github.com/users/Mariatta/orgs",
    "repos_url": "https://api.github.com/users/Mariatta/repos",
    "events_url": "https://api.github.com/users/Mariatta/events{/privacy}",
    "received_events_url": "https://api.github.com/users/Mariatta/received_events",
    "type": "User",
    "site_admin": false
  }
}
@Mariatta
Copy link
Member Author

One thing that could be taking up time and causing timeout is when it tries to lookup the original master PR, and to remove the needs backport to X.Y label from that PR. Perhaps we need to look into optimizing that somehow.

@gvanrossum
Copy link
Member

There were some funny things going on in that backport -- the original commit failed to mention the bpo issue (I missed this when merging it) and the backports created by Miss Islington also missed that. I added it back to the PR subject and body but maybe the damage was done. I also tried to close+open one of the backports (I think 3.9) but somehow one of the bots considered the closing permanent, so I closed it and created a new backport with cherry-picker -- but of course it also failed to have the bpo issue in the subject.

(And thanks for unblocking the commit.)

@Amyth07
Copy link

Amyth07 commented Oct 27, 2020

Hey, If this issue is beginner friendly. I can pick this up.

@brettcannon
Copy link
Member

@Amyth07 my guess is it's not beginner-friendly as this seems to be a finicky issue.

@DanielNoord
Copy link
Contributor

@Mariatta Is there anyway to get a log or payload from these delivery errors? I have been making some PRs to bedevere so I might be able to have a look, but it's difficult to debug a 2 year old issue without the old context becoming removed 😅

@brettcannon
Copy link
Member

@DanielNoord unfortunately all we ever have is the delivery details from Settings in GitHub itself, and even then we have to notice and go digging them out in the list of every payload delivered.

@DanielNoord
Copy link
Contributor

@DanielNoord unfortunately all we ever have is the delivery details from Settings in GitHub itself, and even then we have to notice and go digging them out in the list of every payload delivered.

That's too bad.

One thing that could be taking up time and causing timeout is when it tries to lookup the original master PR, and to remove the needs backport to X.Y label from that PR. Perhaps we need to look into optimizing that somehow.

I'm not sure what this is referring to, see:

async def validate_maintenance_branch_pr(event, gh, *args, **kwargs):
"""Check the PR title for maintenance branch pull requests.
If the PR was made against maintenance branch, and the title does not
match the maintenance branch PR pattern, then post a failure status.
The maintenance branch PR has to start with `[X.Y]`
"""
if event.data["action"] == "edited" and "title" not in event.data["changes"]:
return
pull_request = event.data["pull_request"]
base_branch = pull_request["base"]["ref"]
if not is_maintenance_branch(base_branch):
return
title = util.normalize_title(pull_request["title"],
pull_request["body"])
title_match = MAINTENANCE_BRANCH_TITLE_RE.match(title)
if title_match is None:
status = create_status(util.StatusState.FAILURE,
description="Not a valid maintenance branch PR title.",
target_url=BACKPORT_TITLE_DEVGUIDE_URL)
else:
status = create_status(util.StatusState.SUCCESS,
description="Valid maintenance branch PR title.")
await util.post_status(gh, event, status)

def is_maintenance_branch(ref):
"""
Return True if the ref refers to a maintenance branch.
>>> is_maintenance_branch("3.11")
True
>>> is_maintenance_branch("main")
False
>>> is_maintenance_branch("gh-1234/something-completely-different")
False
"""
maintenance_branch_pattern = r'\d+\.\d+'
return bool(re.fullmatch(maintenance_branch_pattern, ref))

bedevere/bedevere/util.py

Lines 142 to 148 in 83a2d22

def normalize_title(title, body):
"""Normalize the title if it spills over into the PR's body."""
if not (title.endswith("…") and body.startswith("…")):
return title
else:
# Being paranoid in case \r\n is used.
return title[:-1] + body[1:].partition("\r\n")[0]

As far as I can see this handler is only doing lookups in payload dictionaries and some regex matching.
create_status and post_status also shouldn't really be an issue here I think.

I checked the history of the file but that also doesn't give any hints.

Without any further details I think it might be hard to debug this. Perhaps others that are subscribed to this issue have more details? Otherwise I fear this might go stale due to a lack of details.

@ezio-melotti
Copy link
Member

Here is another failed delivery. I tried to re-deliver and got another 500 error:

Click to see delivery details
{
  "ref": "refs/heads/backport-9b3f779-3.10",
  "before": "0000000000000000000000000000000000000000",
  "after": "9d5c175cc93d8c81a6a754781f9f9a77fc5b8f5a",
  "repository": {
    "id": 81598961,
    "node_id": "MDEwOlJlcG9zaXRvcnk4MTU5ODk2MQ==",
    "name": "cpython",
    "full_name": "python/cpython",
    "private": false,
    "owner": {
      "name": "python",
      "email": null,
      "login": "python",
      "id": 1525981,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=",
      "avatar_url": "https://avatars.githubusercontent.com/u/1525981?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/python",
      "html_url": "https://github.com/python",
      "followers_url": "https://api.github.com/users/python/followers",
      "following_url": "https://api.github.com/users/python/following{/other_user}",
      "gists_url": "https://api.github.com/users/python/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/python/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/python/subscriptions",
      "organizations_url": "https://api.github.com/users/python/orgs",
      "repos_url": "https://api.github.com/users/python/repos",
      "events_url": "https://api.github.com/users/python/events{/privacy}",
      "received_events_url": "https://api.github.com/users/python/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "html_url": "https://github.com/python/cpython",
    "description": "The Python programming language",
    "fork": false,
    "url": "https://github.com/python/cpython",
    "forks_url": "https://api.github.com/repos/python/cpython/forks",
    "keys_url": "https://api.github.com/repos/python/cpython/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/python/cpython/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/python/cpython/teams",
    "hooks_url": "https://api.github.com/repos/python/cpython/hooks",
    "issue_events_url": "https://api.github.com/repos/python/cpython/issues/events{/number}",
    "events_url": "https://api.github.com/repos/python/cpython/events",
    "assignees_url": "https://api.github.com/repos/python/cpython/assignees{/user}",
    "branches_url": "https://api.github.com/repos/python/cpython/branches{/branch}",
    "tags_url": "https://api.github.com/repos/python/cpython/tags",
    "blobs_url": "https://api.github.com/repos/python/cpython/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/python/cpython/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/python/cpython/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/python/cpython/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/python/cpython/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/python/cpython/languages",
    "stargazers_url": "https://api.github.com/repos/python/cpython/stargazers",
    "contributors_url": "https://api.github.com/repos/python/cpython/contributors",
    "subscribers_url": "https://api.github.com/repos/python/cpython/subscribers",
    "subscription_url": "https://api.github.com/repos/python/cpython/subscription",
    "commits_url": "https://api.github.com/repos/python/cpython/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/python/cpython/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/python/cpython/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/python/cpython/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/python/cpython/contents/{+path}",
    "compare_url": "https://api.github.com/repos/python/cpython/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/python/cpython/merges",
    "archive_url": "https://api.github.com/repos/python/cpython/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/python/cpython/downloads",
    "issues_url": "https://api.github.com/repos/python/cpython/issues{/number}",
    "pulls_url": "https://api.github.com/repos/python/cpython/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/python/cpython/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/python/cpython/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/python/cpython/labels{/name}",
    "releases_url": "https://api.github.com/repos/python/cpython/releases{/id}",
    "deployments_url": "https://api.github.com/repos/python/cpython/deployments",
    "created_at": 1486754631,
    "updated_at": "2022-07-14T22:13:47Z",
    "pushed_at": 1657841612,
    "git_url": "git://github.com/python/cpython.git",
    "ssh_url": "git@github.com:python/cpython.git",
    "clone_url": "https://github.com/python/cpython.git",
    "svn_url": "https://github.com/python/cpython",
    "homepage": "https://www.python.org/",
    "size": 494555,
    "stargazers_count": 46176,
    "watchers_count": 46176,
    "language": "Python",
    "has_issues": true,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": false,
    "forks_count": 23992,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 8248,
    "license": {
      "key": "other",
      "name": "Other",
      "spdx_id": "NOASSERTION",
      "url": null,
      "node_id": "MDc6TGljZW5zZTA="
    },
    "allow_forking": true,
    "is_template": false,
    "web_commit_signoff_required": false,
    "topics": [

    ],
    "visibility": "public",
    "forks": 23992,
    "open_issues": 8248,
    "watchers": 46176,
    "default_branch": "main",
    "stargazers": 46176,
    "master_branch": "main",
    "organization": "python"
  },
  "pusher": {
    "name": "nascheme",
    "email": "nas-github@arctrix.com"
  },
  "organization": {
    "login": "python",
    "id": 1525981,
    "node_id": "MDEyOk9yZ2FuaXphdGlvbjE1MjU5ODE=",
    "url": "https://api.github.com/orgs/python",
    "repos_url": "https://api.github.com/orgs/python/repos",
    "events_url": "https://api.github.com/orgs/python/events",
    "hooks_url": "https://api.github.com/orgs/python/hooks",
    "issues_url": "https://api.github.com/orgs/python/issues",
    "members_url": "https://api.github.com/orgs/python/members{/member}",
    "public_members_url": "https://api.github.com/orgs/python/public_members{/member}",
    "avatar_url": "https://avatars.githubusercontent.com/u/1525981?v=4",
    "description": "Repositories related to the Python Programming language"
  },
  "sender": {
    "login": "nascheme",
    "id": 690853,
    "node_id": "MDQ6VXNlcjY5MDg1Mw==",
    "avatar_url": "https://avatars.githubusercontent.com/u/690853?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/nascheme",
    "html_url": "https://github.com/nascheme",
    "followers_url": "https://api.github.com/users/nascheme/followers",
    "following_url": "https://api.github.com/users/nascheme/following{/other_user}",
    "gists_url": "https://api.github.com/users/nascheme/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/nascheme/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/nascheme/subscriptions",
    "organizations_url": "https://api.github.com/users/nascheme/orgs",
    "repos_url": "https://api.github.com/users/nascheme/repos",
    "events_url": "https://api.github.com/users/nascheme/events{/privacy}",
    "received_events_url": "https://api.github.com/users/nascheme/received_events",
    "type": "User",
    "site_admin": false
  },
  "created": true,
  "deleted": false,
  "forced": false,
  "base_ref": null,
  "compare": "https://github.com/python/cpython/commit/9d5c175cc93d",
  "commits": [
    {
      "id": "9d5c175cc93d8c81a6a754781f9f9a77fc5b8f5a",
      "tree_id": "d541c49ac1cf6e6323e13bfa7d0875437ae78f19",
      "distinct": true,
      "message": "[3.10] gh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (GH-94842)\n(cherry picked from commit 9b3f7792093c533608f70043aa2a7daf7f903a16)\n\nCo-authored-by: neonene <53406459+neonene@users.noreply.github.com>",
      "timestamp": "2022-07-14T16:33:22-07:00",
      "url": "https://github.com/python/cpython/commit/9d5c175cc93d8c81a6a754781f9f9a77fc5b8f5a",
      "author": {
        "name": "neonene",
        "email": "53406459+neonene@users.noreply.github.com",
        "username": "neonene"
      },
      "committer": {
        "name": "Neil Schemenauer",
        "email": "nas@arctrix.com",
        "username": "nascheme"
      },
      "added": [
        "Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst"
      ],
      "removed": [

      ],
      "modified": [
        "Objects/obmalloc.c"
      ]
    }
  ],
  "head_commit": {
    "id": "9d5c175cc93d8c81a6a754781f9f9a77fc5b8f5a",
    "tree_id": "d541c49ac1cf6e6323e13bfa7d0875437ae78f19",
    "distinct": true,
    "message": "[3.10] gh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (GH-94842)\n(cherry picked from commit 9b3f7792093c533608f70043aa2a7daf7f903a16)\n\nCo-authored-by: neonene <53406459+neonene@users.noreply.github.com>",
    "timestamp": "2022-07-14T16:33:22-07:00",
    "url": "https://github.com/python/cpython/commit/9d5c175cc93d8c81a6a754781f9f9a77fc5b8f5a",
    "author": {
      "name": "neonene",
      "email": "53406459+neonene@users.noreply.github.com",
      "username": "neonene"
    },
    "committer": {
      "name": "Neil Schemenauer",
      "email": "nas@arctrix.com",
      "username": "nascheme"
    },
    "added": [
      "Misc/NEWS.d/next/Build/2022-07-14-02-45-44.gh-issue-94841.lLRTdf.rst"
    ],
    "removed": [

    ],
    "modified": [
      "Objects/obmalloc.c"
    ]
  }
}

This is the only failure of the last 48h. Given that this issue is fairly old, it might be that the original failure was caused by something else, and the one I found is unrelated.

@DanielNoord
Copy link
Contributor

@ezio-melotti Do you have the url to which you tried to deliver? Based on the tests I have one potential idea:
The statuses url requires appending the {/sha} but in the tests we don't actually test this and in the gh.post() call we also don't supply the sha of the commit to which the status should be applied. Could that be the issue here?

@ezio-melotti
Copy link
Member

The delivery I pasted above is the one visible from the GitHub webhook page of the cpython repo, so it's the payload sent by GitHub to https://bedevere.herokuapp.com/. I don't have access to the logs of the requests sent back from bedevere to GitHub (if they exist at all).

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

No branches or pull requests

6 participants