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

Add socker error handling for r11s #22864

Merged
merged 4 commits into from
Oct 28, 2024
Merged

Add socker error handling for r11s #22864

merged 4 commits into from
Oct 28, 2024

Conversation

jatgarg
Copy link
Contributor

@jatgarg jatgarg commented Oct 21, 2024

Description

AB#18937

Implement error handling for the following errors sent by AFR over the socket.

1.) For Cluster Draining:
error = {
code: 503,
canRetry?: true;
message?: "Cluster is not available. Please retry later.";
retryAfter?: number;
retryAfterMs?: number;
internalErrorCode?:ClusterDraining;
}

2.) Token Revoked:
error = {
code: 401/403,
canRetry?: false;
message?: "Permission denied. Token has been revoked.";
internalErrorCode?:TokenRevoked;
}

@jatgarg jatgarg self-assigned this Oct 21, 2024
@jatgarg jatgarg marked this pull request as draft October 21, 2024 23:47
@github-actions github-actions bot added base: main PRs targeted against main branch area: driver Driver related issues labels Oct 21, 2024
Copy link
Collaborator

@msfluid-bot msfluid-bot left a comment

Choose a reason for hiding this comment

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

Code Coverage Summary

↓ packages.drivers.routerlicious-driver.src:
Line Coverage Change: -3.92%    Branch Coverage Change: -8.74%
Metric NameBaseline coveragePR coverageCoverage Diff
Branch Coverage 83.40% 74.66% ↓ -8.74%
Line Coverage 58.25% 54.33% ↓ -3.92%

Baseline commit: 55bed2d
Baseline build: 302815
Happy Coding!!

Code coverage comparison check failed!!
More Details: Readme

  • Skip This Check!!

What to do if the code coverage check fails:

  • Ideally, add more tests to increase the code coverage for the package(s) whose code-coverage regressed.

  • If a regression is causing the build to fail and is due to removal of tests, removal of code with lots of tests or any other valid reason, there is a checkbox further up in this comment that determines if the code coverage check should fail the build or not. You can check the box and trigger the build again. The test coverage analysis will still be done, but it will not fail the build if a regression is detected.

  • Unchecking the checkbox and triggering another build should go back to failing the build if a test-coverage regression is detected.

  • You can check which lines are covered or not covered by your tests with these steps:

    • Go to the PR ADO build.
    • Click on the link to see its published artifacts. You will see an artifact named codeCoverageAnalysis, which you can expand to reach to a particular source file's coverage html which will show which lines are covered/not covered by your tests.
    • You can also run different kind of tests locally with :coverage tests commands to find out the coverage.

Copy link
Contributor

@znewton znewton left a comment

Choose a reason for hiding this comment

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

Couple testing comments

@jatgarg
Copy link
Contributor Author

jatgarg commented Oct 28, 2024

Code Coverage Summary

↓ packages.drivers.routerlicious-driver.src:
Line Coverage Change: -5.29%    Branch Coverage Change: -8.73%
Baseline commit: 0ef059c Baseline build: 301641 Happy Coding!!

Code coverage comparison check failed!!

More Details: Readme

  • Skip This Check!!

What to do if the code coverage check fails:

  • Ideally, add more tests to increase the code coverage for the package(s) whose code-coverage regressed.

  • If a regression is causing the build to fail and is due to removal of tests, removal of code with lots of tests or any other valid reason, there is a checkbox further up in this comment that determines if the code coverage check should fail the build or not. You can check the box and trigger the build again. The test coverage analysis will still be done, but it will not fail the build if a regression is detected.

  • Unchecking the checkbox and triggering another build should go back to failing the build if a test-coverage regression is detected.

  • You can check which lines are covered or not covered by your tests with these steps:

    • Go to the PR ADO build.
    • Click on the link to see its published artifacts. You will see an artifact named codeCoverageAnalysis, which you can expand to reach to a particular source file's coverage html which will show which lines are covered/not covered by your tests.
    • You can also run different kind of tests locally with :coverage tests commands to find out the coverage.

Skipping the check since, the decrease is due to the removal of mocha:esm version tests because of mocks are not permitted there and we run same test with mocha:cjs.

@jatgarg jatgarg marked this pull request as ready for review October 28, 2024 21:45
@msfluid-bot
Copy link
Collaborator

@fluid-example/bundle-size-tests: +691 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 461.09 KB 461.13 KB +35 Bytes
azureClient.js 558.24 KB 558.72 KB +495 Bytes
connectionState.js 724 Bytes 724 Bytes No change
containerRuntime.js 260.71 KB 260.73 KB +14 Bytes
fluidFramework.js 405.97 KB 405.98 KB +14 Bytes
loader.js 134.16 KB 134.18 KB +14 Bytes
map.js 42.46 KB 42.46 KB +7 Bytes
matrix.js 148.29 KB 148.29 KB +7 Bytes
odspClient.js 525.2 KB 525.25 KB +49 Bytes
odspDriver.js 97.84 KB 97.86 KB +21 Bytes
odspPrefetchSnapshot.js 42.81 KB 42.82 KB +14 Bytes
sharedString.js 164.48 KB 164.49 KB +7 Bytes
sharedTree.js 396.43 KB 396.43 KB +7 Bytes
Total Size 3.31 MB 3.31 MB +691 Bytes

Baseline commit: 55bed2d

Generated by 🚫 dangerJS against c5de718

@jatgarg jatgarg merged commit 59441f3 into microsoft:main Oct 28, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: driver Driver related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants