Skip to content

fix(kms-connector): poll KMS response if request already exists#856

Merged
eudelins-zama merged 1 commit intomainfrom
simon/fix/418/retry-poll-if-request-already-sent
Sep 24, 2025
Merged

fix(kms-connector): poll KMS response if request already exists#856
eudelins-zama merged 1 commit intomainfrom
simon/fix/418/retry-poll-if-request-already-sent

Conversation

@eudelins-zama
Copy link
Copy Markdown
Contributor

@eudelins-zama eudelins-zama self-assigned this Sep 11, 2025
@cla-bot cla-bot bot added the cla-signed label Sep 11, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes KMS connector error handling to properly handle cases where a KMS request already exists. Instead of treating AlreadyExists errors as recoverable and retrying, the code now recognizes this as a successful condition and proceeds to poll for the response.

  • Updates error classification to treat AlreadyExists as recoverable for requests but not for responses
  • Modifies retry logic to immediately return success when encountering AlreadyExists status
  • Removes NotFound from recoverable response errors as it's no longer needed

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
processor.rs Updates error classification logic for request and response status codes
kms_client.rs Modifies retry loop to handle AlreadyExists as immediate success case

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@eudelins-zama eudelins-zama marked this pull request as ready for review September 11, 2025 08:42
@eudelins-zama eudelins-zama removed the request for review from dartdart26 September 11, 2025 08:42
@eudelins-zama eudelins-zama force-pushed the simon/fix/418/retry-poll-if-request-already-sent branch from c76f7ac to c157b28 Compare September 11, 2025 10:08
Copy link
Copy Markdown
Collaborator

@dartdart26 dartdart26 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!

@eudelins-zama eudelins-zama force-pushed the simon/fix/418/retry-poll-if-request-already-sent branch from c157b28 to 5494850 Compare September 24, 2025 09:21
@eudelins-zama eudelins-zama merged commit 1e921c2 into main Sep 24, 2025
103 of 104 checks passed
@eudelins-zama eudelins-zama deleted the simon/fix/418/retry-poll-if-request-already-sent branch September 24, 2025 12:05
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