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

Secondary Rate Limits #19

Closed
0x4007 opened this issue Sep 30, 2024 · 19 comments · Fixed by #20 or ubiquity/ts-template#59
Closed

Secondary Rate Limits #19

0x4007 opened this issue Sep 30, 2024 · 19 comments · Fixed by #20 or ubiquity/ts-template#59

Comments

@0x4007
Copy link
Member

0x4007 commented Sep 30, 2024

Been getting this a lot. We need to run Find associated pull request with authentication. We can authenticate as our app as we do in some of the other CI/CD.

Run ubiquity/cloudflare-deploy-action@main
Run actions/setup-node@v4
Attempting to download 20.10.0...
Acquiring 20.10.0 - x64 from https://github.com/actions/node-versions/releases/download/20.10.0-6972104774/node-20.10.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/02ddd055-ac64-455c-a47e-8689c59c5216 -f /home/runner/work/_temp/8609a306-01ae-4aa8-a7d3-bf05bcc491dd
Adding to the cache ...
Environment details
Run actions/github-script@v7
  with:
    script: const response = await github.rest.search.issuesAndPullRequests({
    q: 'repo:ubiquity/work.ubq.fi is:pr sha:02fc36d24c14d68f65d0fca6b7abaa022a2980e9',
    per_page: 1,
  })
  const items = response.data.items
  if (items.length < 1) {
    console.error('No PRs found')
    return {forcePreviewDeploy: false, pullRequestNumber: null }
  }
  const pullRequestNumber = items[0].number
  const forcePreviewDeploy = pullRequestNumber > 0  && items[0].pull_request.merged_at == null
  console.info("Pull request number is", pullRequestNumber)
  console.info("forcePreviewDeploy", forcePreviewDeploy)
  return {forcePreviewDeploy: forcePreviewDeploy, pullRequestNumber: pullRequestNumber }
  
    github-token: ***
    debug: false
    user-agent: actions/github-script
    result-encoding: json
    retries: 0
    retry-exempt-status-codes: 400,401,403,404,422
RequestError [HttpError]: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 2410:34C107:144A7C4:27B0A69:66FAB445.
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:9537:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:3:[18](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:20))
    at async main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:[20](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:22)) {
  status: 403,
  response: {
    url: 'https://api.github.com/search/issues?q=repo%3Aubiquity%2Fwork.ubq.fi%20is%3Apr%20sha%3A02fc36d24c14d68f65d0fca6b7abaa022a2980e9&per_page=1',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Mon, 30 Sep 2024 14:23:01 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'github.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '20[22](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:24)-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '2410:34C107:144A7C4:[27](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:30)B0A69:66FAB445',
      'x-ratelimit-limit': '30',
      'x-ratelimit-remaining': '[29](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:32)',
      'x-ratelimit-reset': '1727706241',
      'x-ratelimit-resource': 'search',
      'x-ratelimit-used': '1',
      'x-xss-protection': '0'
    },
    data: {
      documentation_url: 'https://docs.github.com/free-pro-team@latest/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits',
      message: 'You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 2410:[34](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:37)C107:144A7C4:27B0A69:66FAB445.'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/search/issues?q=repo%3Aubiquity%2Fwork.ubq.fi%20is%3Apr%20sha%3A02fc[36](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:39)d24c14d68f65d0fca6b7abaa022a2980e9&per_page=1',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'actions/github-script octokit-core.js/5.0.1 Node.js/20.13.1 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: {
      agent: [Agent],
      fetch: [Function: proxyFetch],
      hook: [Function: bound bound register]
    }
  }
}
Error: Unhandled error: HttpError: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 2[41](https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343#step:2:44)0:34C107:144A7C4:27B0A69:66FAB445.

From https://github.com/ubiquity/work.ubq.fi/actions/runs/11108125855/job/30860345343

Copy link

ubiquity-os bot commented Sep 30, 2024

Deadline Mon, Sep 30, 3:39 PM UTC
Beneficiary 0x4007CE2083c7F3E18097aeB3A39bb8eC149a341d

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

Copy link

ubiquity-os bot commented Sep 30, 2024

+ Evaluating results. Please wait...

@0x4007 0x4007 mentioned this issue Sep 30, 2024
@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

Unfortunately I realized the best solution is to pass in the APP_ID and APP_PRIVATE_KEY secrets from within every repository's action. That means I need to push changes to all of them. The alternative is I hard code an app's credentials in here so that we can get higher rate limits.

@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

Just added to ts-template so hopefully it syncs and we can add authentication to all repo deploys!

@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

@0x4007 0x4007 reopened this Sep 30, 2024
@0x4007 0x4007 closed this as completed Sep 30, 2024
@gentlementlegen
Copy link
Member

gentlementlegen commented Sep 30, 2024

@0x4007 That's one hell of a reward lol. I guess it counted the content within the code which should not have happened, I can look into it. Edit 2: it is not using the latest changes that got merged regarding the rewards.

It didn't throw because technically the configuration defaulted to a valid version omitting the invalid parts. We cannot throw otherwise we cannot disable modules partially within this plugin, which is why it was acting this way.

@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

Yeah the old count is broken cause of the code inside the code block. I am trying to use a different version of the plugin now.

@gentlementlegen
Copy link
Member

@0x4007 Since you moved everything to main we have to start merging things into the main branch again.

@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

I'm deciding the lesser of evils. Its nice to use an organization to fully test production (kernel and plugins) and then other orgs to test development.

We could set a weekly cron to semver and merge to main maybe

@ubiquity ubiquity deleted a comment from ubiquity-os bot Sep 30, 2024
@0x4007 0x4007 reopened this Sep 30, 2024
@0x4007 0x4007 closed this as completed Sep 30, 2024
@0x4007 0x4007 reopened this Sep 30, 2024
@0x4007 0x4007 closed this as completed Sep 30, 2024
@0x4007 0x4007 reopened this Sep 30, 2024
@0x4007 0x4007 closed this as completed Sep 30, 2024
Copy link

ubiquity-os bot commented Sep 30, 2024

+ Evaluating results. Please wait...

@ubiquity ubiquity deleted a comment from ubiquity-os bot Sep 30, 2024
Copy link

ubiquity-os bot commented Sep 30, 2024

 [ 118.091 WXDAI ] 

@0x4007
Contributions Overview
ViewContributionCountReward
IssueTask1100
IssueSpecification16.9
IssueComment511.191
ReviewComment10
Conversation Incentives
CommentFormattingRelevanceReward
Been getting this a lot. We need to run `Find associated pul…
0
content:
  content:
    p:
      score: 0
      elementCount: 2
    pre:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 40
  wordValue: 0.1
  result: 2.3
16.9
Unfortunately I realized the best solution is to pass in the …
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 50
  wordValue: 0.2
  result: 5.56
15.56
Just added to ts-template so hopefully it syncs and we can add a…
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 18
  wordValue: 0.2
  result: 2.33
0.81.864
@gentlementlegenThis should have thrown a failure https://gith…
0
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 20
  wordValue: 0.2
  result: 2.55
0.20.51
Yeah the old count is broken cause of the code inside the code b…
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 26
  wordValue: 0.2
  result: 3.19
0.30.957
I'm deciding the lesser of evils. Its nice to use an organizatio…
0
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 40
  wordValue: 0.2
  result: 4.6
0.52.3
Resolves https://github.com/ubiquity/cloudflare-deploy-action/is…
0
content:
  content:
    p:
      score: 0
      elementCount: 6
  result: 0
regex:
  wordCount: 46
  wordValue: 0
  result: 0
0.8-

 [ 0.931 WXDAI ] 

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueComment20.931
Conversation Incentives
CommentFormattingRelevanceReward
@0x4007 That's one hell of a reward lol. I guess it counted the …
0
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 79
  wordValue: 0.1
  result: 4.1
0.20.82
@0x4007 Since you moved everything to `main` we have to …
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 17
  wordValue: 0.1
  result: 1.11
0.10.111

@gentlementlegen
Copy link
Member

@0x4007 Here you go, seems to make much more sense.

@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

Formatting in analytics should total the score correctly. This is not rendering the correct number.

@gentlementlegen
Copy link
Member

That's a new, will have a look. Too many manual merges happened recently.

@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

Specifically it looks like its not including the "word counter" in the formatting overview score.

@gentlementlegen
Copy link
Member

Hard to tell but that's possible. Since the regex have been deleted and taken out on a higher level the parser might not pick it up.

@ubiquity ubiquity deleted a comment from ubiquity-os bot Oct 1, 2024
@ubiquity ubiquity deleted a comment from ubiquity-os bot Oct 1, 2024
@gentlementlegen
Copy link
Member

Adding some content to test the results:

content
  • content 1
  • content 2
  • content 3

Copy link

ubiquity-os bot commented Oct 1, 2024

 [ 117.475 WXDAI ] 

@0x4007
Contributions Overview
ViewContributionCountReward
IssueTask1100
IssueSpecification16.9
IssueComment710.575
ReviewComment10
Conversation Incentives
CommentFormattingRelevanceReward
Been getting this a lot. We need to run `Find associated pul…
2.3
content:
  content:
    p:
      score: 0
      elementCount: 2
    pre:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 40
  wordValue: 0.1
  result: 2.3
16.9
Unfortunately I realized the best solution is to pass in the …
5.56
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 50
  wordValue: 0.2
  result: 5.56
0.95.004
Just added to ts-template so hopefully it syncs and we can add a…
2.33
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 18
  wordValue: 0.2
  result: 2.33
0.81.864
@gentlementlegenThis should have thrown a failure https://gith…
2.55
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 20
  wordValue: 0.2
  result: 2.55
0.20.51
Yeah the old count is broken cause of the code inside the code b…
3.19
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 26
  wordValue: 0.2
  result: 3.19
0.30.957
I'm deciding the lesser of evils. Its nice to use an organizatio…
4.6
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 40
  wordValue: 0.2
  result: 4.6
0.41.84
Formatting in analytics should total the score correctly. This i…
2
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 15
  wordValue: 0.2
  result: 2
0.10.2
Specifically it looks like its not including the "word counter" …
2
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 15
  wordValue: 0.2
  result: 2
0.10.2
Resolves https://github.com/ubiquity/cloudflare-deploy-action/is…
0
content:
  content:
    p:
      score: 0
      elementCount: 6
  result: 0
regex:
  wordCount: 46
  wordValue: 0
  result: 0
0.7-

 [ 3.855 WXDAI ] 

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueComment63.855
Conversation Incentives
CommentFormattingRelevanceReward
@0x4007 That's one hell of a reward lol. I guess it counted the …
4.1
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 79
  wordValue: 0.1
  result: 4.1
0.20.82
@0x4007 Since you moved everything to `main` we have to …
1.11
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 17
  wordValue: 0.1
  result: 1.11
0.10.111
@0x4007 Here you go, seems to make much more sense.
0.71
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 10
  wordValue: 0.1
  result: 0.71
--
That's a new, will have a look. Too many manual merges happened …
0.94
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 14
  wordValue: 0.1
  result: 0.94
0.10.094
Hard to tell but that's possible. Since the regex have been dele…
1.65
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 27
  wordValue: 0.1
  result: 1.65
0.20.33
Adding some `content` to test the results:``&#…
3.33
content:
  content:
    p:
      score: 0
      elementCount: 4
    pre:
      score: 0
      elementCount: 1
    ul:
      score: 1
      elementCount: 1
    li:
      score: 0.5
      elementCount: 3
  result: 2.5
regex:
  wordCount: 12
  wordValue: 0.1
  result: 0.83
-2.5

Copy link

ubiquity-os bot commented Oct 10, 2024

 [ 106.9 WXDAI ] 

@0x4007
Contributions Overview
ViewContributionCountReward
IssueTask1100
IssueSpecification16.9
IssueComment70
ReviewComment10
Conversation Incentives
CommentFormattingRelevanceReward
Been getting this a lot. We need to run `Find associated pul…
2.3
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 40
  wordValue: 0.1
  result: 2.3
16.9
Unfortunately I realized the best solution is to pass in the …
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.9-
Just added to ts-template so hopefully it syncs and we can add a…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.8-
@gentlementlegenThis should have thrown a failure https://gith…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 19
  wordValue: 0
  result: 0
0.4-
Yeah the old count is broken cause of the code inside the code b…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.3-
I'm deciding the lesser of evils. Its nice to use an organizatio…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 13
  wordValue: 0
  result: 0
0.4-
Formatting in analytics should total the score correctly. This i…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.1-
Specifically it looks like its not including the "word counter" …
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.1-
Resolves https://github.com/ubiquity/cloudflare-deploy-action/is…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 30
  wordValue: 0
  result: 0
0.8-

 [ 0 WXDAI ] 

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueComment60
Conversation Incentives
CommentFormattingRelevanceReward
@0x4007 That's one hell of a reward lol. I guess it counted the …
0
content:
  content: {}
  result: 0
regex:
  wordCount: 37
  wordValue: 0
  result: 0
0.85-
@0x4007 Since you moved everything to `main` we have to …
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.8-
@0x4007 Here you go, seems to make much more sense.
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.75-
That's a new, will have a look. Too many manual merges happened …
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.7-
Hard to tell but that's possible. Since the regex have been dele…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.65-
Adding some `content` to test the results:``&#…
0
content:
  content: {}
  result: 0
regex:
  wordCount: 0
  wordValue: 0
  result: 0
0.6-

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