Skip to content

test: accept GitHub's rate-limit 403 in BindingIT - #1846

Merged
siri-varma merged 1 commit into
dapr:masterfrom
javier-aliaga:fix/binding-it-github-rate-limit
Oct 15, 2026
Merged

siri-varma merged 1 commit into
dapr:masterfrom
javier-aliaga:fix/binding-it-github-rate-limit

Conversation

@javier-aliaga

Copy link
Copy Markdown
Contributor

Description

BindingIT.httpOutputBindingError and BindingIT.httpOutputBindingErrorIgnoredByComponent call https://api.github.com/unknown_path without a token and expect a 404. When the runner's IP has used up GitHub's unauthenticated rate limit (60 requests per hour, shared by runners on the same IP), GitHub answers 403 and both tests fail with expected: <404> but was: <403>.

This happened in dapr/dapr's dapr-test-sdk run: https://github.com/dapr/dapr/actions/runs/38647323498/job/116137307808

The tests now accept 404 or 403:

  • httpOutputBindingError checks the error message for the status code that was actually returned.
  • httpOutputBindingErrorIgnoredByComponent checks the body for Not Found on a 404, or API rate limit exceeded on a 403.

Both cases still check that the binding passes the upstream status and body through to the client.

Issue reference

No issue. CI flake.

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Verified locally: both tests pass (GitHub answered 404). The 403 path was not exercised locally.

The two HTTP output binding error tests call api.github.com without a
token and expected a 404. When the runner's IP has used up GitHub's
unauthenticated rate limit, GitHub answers 403 instead and both tests
fail. Accept either status and check the body that matches it.

Signed-off-by: Javier Aliaga <javier@diagrid.io>
@javier-aliaga
javier-aliaga requested review from a team as code owners October 15, 2026 09:49
Copilot AI balanced review requested due to automatic review settings October 15, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.69%. Comparing base (ef525c8) to head (5089cef).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1846   +/-   ##
=========================================
  Coverage     79.69%   79.69%           
  Complexity     2687     2687           
=========================================
  Files           267      267           
  Lines          7933     7933           
  Branches        842      842           
=========================================
  Hits           6322     6322           
  Misses         1255     1255           
  Partials        356      356           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siri-varma
siri-varma merged commit 0d993ca into dapr:master Oct 15, 2026
16 checks passed
dapr-bot added a commit that referenced this pull request Oct 16, 2026
The two HTTP output binding error tests call api.github.com without a
token and expected a 404. When the runner's IP has used up GitHub's
unauthenticated rate limit, GitHub answers 403 instead and both tests
fail. Accept either status and check the body that matches it.


(cherry picked from commit 0d993ca)

Signed-off-by: Javier Aliaga <javier@diagrid.io>
Co-authored-by: Javier Aliaga <javier@diagrid.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants