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

feat: add retry test inject failure midway in gRPC ReadObject #533

Merged
merged 24 commits into from
Sep 18, 2023

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Sep 5, 2023

  • Add Retry Test API support for injecting failure midway in gRPC ReadObject

    • Testbench will fail with UNAVAILABLE after a few downloaded data with retry instructions return-broken-stream
    • Testbench will fail with UNAVAILABLE after YKiB of downloaded data with retry instructions return-broken-stream-after-YK
  • Update README

  • Enable methods that have Retry Test support in gRPC

    •   "storage.buckets.get",
        "storage.buckets.getIamPolicy",
        "storage.buckets.list",
        "storage.hmacKey.get",
        "storage.hmacKey.list",
        "storage.notifications.get",
        "storage.notifications.list",
        "storage.objects.list",
        "storage.objects.get",
        "storage.serviceaccount.get",
      
  • Tests pass

  • Appropriate changes to README are included in PR

@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f929482) 98.68% compared to head (daa81b6) 98.69%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #533   +/-   ##
=======================================
  Coverage   98.68%   98.69%           
=======================================
  Files          50       50           
  Lines        7898     7956   +58     
=======================================
+ Hits         7794     7852   +58     
  Misses        104      104           
Flag Coverage Δ
unittests 98.69% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
testbench/common.py 96.75% <100.00%> (+0.05%) ⬆️
testbench/database.py 100.00% <100.00%> (ø)
testbench/grpc_server.py 100.00% <100.00%> (ø)
testbench/rest_server.py 97.84% <100.00%> (ø)
tests/test_common.py 99.79% <100.00%> (ø)
tests/test_testbench_retry.py 99.61% <100.00%> (+0.04%) ⬆️

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

@cojenco cojenco marked this pull request as ready for review September 6, 2023 16:20
@cojenco cojenco requested review from coryan and a team as code owners September 6, 2023 16:20
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

One high level question about the approach; let me know what you think.

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@cojenco cojenco requested a review from tritone September 12, 2023 22:07
@cojenco
Copy link
Contributor Author

cojenco commented Sep 12, 2023

As discussed offline, I updated Retry Test API Forced Failures Support description by transport and clarified how retry instructions result in the gRPC context. @tritone PTAL, thank you!

Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

Looks good to me; thanks for the updates.

README.md Outdated Show resolved Hide resolved
@cojenco cojenco changed the title feat: add retry test inject broken-stream in gRPC feat: add retry test inject failure midway in gRPC ReadObject Sep 13, 2023
@cojenco
Copy link
Contributor Author

cojenco commented Sep 18, 2023

@coryan Wanted to check with you for future planning if there is any need to support x-goog-emulator-instructions force failures (e.g. return-503-after-256K) in the grpc server?

This PR adds support to the Retry Test API. Planning to merge today if no issues, thanks!

@coryan
Copy link
Contributor

coryan commented Sep 18, 2023

@coryan Wanted to check with you for future planning if there is any need to support x-goog-emulator-instructions force failures (e.g. return-503-after-256K) in the grpc server?

No, and we can always add the support if it becomes needed.

@cojenco cojenco merged commit bd0e3fd into googleapis:main Sep 18, 2023
12 checks passed
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

Successfully merging this pull request may close these issues.

3 participants