This repository was archived by the owner on Mar 3, 2026. It is now read-only.
feat(listBuckets): Add support for returning partial success#2678
Merged
chandra-siri merged 15 commits intomainfrom Nov 28, 2025
Merged
feat(listBuckets): Add support for returning partial success#2678chandra-siri merged 15 commits intomainfrom
chandra-siri merged 15 commits intomainfrom
Conversation
Implements the optional parameter `returnPartialSuccess`. If set to `true` and the API response contains an `unreachable` array, the function will return a successful callback (`err: null`) and pass the `unreachable` array as the 5th argument. This allows users to process the available buckets without the entire operation failing on soft errors.
New sample for partial success in ListBuckets (storage_list_buckets_partial_success)
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
ddelgrosso1
reviewed
Nov 10, 2025
|
Warning: This pull request is touching the following templated files:
|
ddelgrosso1
reviewed
Nov 18, 2025
ddelgrosso1
reviewed
Nov 18, 2025
ddelgrosso1
reviewed
Nov 19, 2025
ddelgrosso1
reviewed
Nov 19, 2025
ddelgrosso1
reviewed
Nov 19, 2025
ddelgrosso1
reviewed
Nov 19, 2025
This reverts commit 10a7e87.
ddelgrosso1
reviewed
Nov 20, 2025
39babc7 to
efc0453
Compare
ddelgrosso1
approved these changes
Nov 24, 2025
Contributor
ddelgrosso1
left a comment
There was a problem hiding this comment.
LGTM. Please remind me to merge and release this on December 2 after the code freeze is lifted.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
This change implements the
returnPartialSuccessoption for thegetBuckets(orListBuckets) method to handle scenarios where the external API returns a successful response but includes anunreachablelist of resources.returnPartialSuccessis added to theGetBucketsRequestinterface.true: IfreturnPartialSuccessis set totrueand the API response containsresp.unreachableitems, the method will execute the callback successfully (witherr: null) and pass the array of unreachable bucket IDs as the fifth argument to the callback function.false(or not set) and unreachable items are present, the function follows the existing failure flow (or implicitly returns success, depending on the previous behavior).returnPartialSuccessparameter is correctly included in the query string (qs) sent to the API endpoint, as it is a known API parameter.Impact
This change significantly improves the robustness of the
ListBucketsoperation. Users can now choose to tolerate minor, non-critical failures (like temporary unavailability of a few regions) and successfully retrieve and process the majority of available buckets, preventing a complete application failure.Testing
returnPartialSuccess: trueis set and the API returns anunreachablearray.unreachable) is strictly optional (?) and is only provided when explicitly enabled via the new option.Additional Information
resp.unreachableproperty on a successful HTTP status code.unreachable) was chosen to avoid modifying the primary result type (Bucket[]) and to maintain compatibility with existing consumers who expect the 4-argument signature.Checklist
Fixes # 🦕