-
Notifications
You must be signed in to change notification settings - Fork 9
Verify third-party contribution - Fix issues with the retry logic in the OktaApiClient and OktaRetryApi classes (#61) #62 #78
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
Merged
laura-rodriguez
merged 10 commits into
main
from
lr-TriggerAu-Bug_RetryApiIssues-patch-7
Feb 13, 2025
Merged
Verify third-party contribution - Fix issues with the retry logic in the OktaApiClient and OktaRetryApi classes (#61) #62 #78
laura-rodriguez
merged 10 commits into
main
from
lr-TriggerAu-Bug_RetryApiIssues-patch-7
Feb 13, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…OktaRetryApi classes * The OktaApiClient class was not correctly handling a non 200 response code * The OktaRetryApi class was searching for a header field using incorrect classes * The OktaRetryApi class was trying to parse a Unix Epoch number as a string date * Also added a verbose message so teh user knows how long they waiting for the retry
…affect the pipeline - Add unit tests that verify that IWR doesn't throw with 4xx responses so retry logic can be executed if it's applicable - Drop support for PS 6.x version Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
…s 4xx/5xx responses - Add tests to verify that Okta Api Exceptions are properly constructed and thrown - Add additional tests to cover rate limit scenarios - Add (and skip) an E2E test to verify we're properly handling rate limit locally - Update readme with error handling info
aniket-okta
previously approved these changes
Feb 10, 2025
bryanapellanes-okta
previously approved these changes
Feb 12, 2025
Contributor
bryanapellanes-okta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion, but LGTM
Co-authored-by: Bryan Apellanes <63638027+bryanapellanes-okta@users.noreply.github.com>
1822e1b
bryanapellanes-okta
approved these changes
Feb 13, 2025
Contributor
bryanapellanes-okta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This was referenced Feb 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ℹ️ I've also performed manual E2E tests to verify the proper handling of rate limits when hitting a real server.
Executed manual E2E test: https://github.com/okta/okta-powershell-cli/pull/78/files#diff-732ef03de60594f5094809340a1e6971f5e3f57eefdf712f5970a998e4c0e5b8R357
Fiddler log
A limited Fiddler report is attached to avoid sharing the test org details.
The E2E performs a loop of 20 calls to
/api/v1/apps(Invoke-OktaListApplications). The report shows that after 10 subsequent calls to the apps API, the request fails with a 429. The Okta.PowerShell module waits and retries accordingly, and the Okta API returns 200 responses for the 10 subsequent calls after the 429 response. In the end, the Okta.PowerShell module made 21 requests to the Okta API (20 successful responses + 1 429 response)