Skip to content

Conversation

@BenWhitehead
Copy link
Collaborator

No description provided.

@BenWhitehead BenWhitehead added do not merge Indicates a pull request not ready for merge, due to either quality or timing. owlbot:ignore instruct owl-bot to ignore a PR labels May 22, 2023
@BenWhitehead BenWhitehead requested a review from a team as a code owner May 22, 2023 21:21
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels May 22, 2023
@BenWhitehead BenWhitehead force-pushed the req-ids branch 3 times, most recently from 879135e to b90f446 Compare May 25, 2023 20:50
@BenWhitehead BenWhitehead removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 5, 2023
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.

Overall looks great, couple small questions based on my weak understanding of some java stuff...

}

@NonNull
static GrpcCallContext newCallContext() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need a comment or more descriptive name clarifying that it adds the idempotency header? I think it could be confusing otherwise.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since this method is attached to the Retrying class, I feel it carries the context with it that the GrpcCallContext returned from this method contains things related to retries. I think the idempotency token is an implementation detail of what goes into the context.

// 1. start resumable session
// 2. PUT first 256KiB
// 3. PUT second 256KiB
// 4. Finalize session and put final 45B
Copy link
Contributor

Choose a reason for hiding this comment

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

Just figured I'd ask because I am not great at following some of this testing code -- does the test assert that each of these 4 gets its own request ID, and that all retries for each request have the same ID?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mostly correct, we are asserting there is a distinct token for each of the 4 requests that are sent, however we are not inducing any failures in these tests to verify tokens are maintained for the same request across multiple attempts. Instead we are waiting on googleapis/storage-testbench#486 for the retry enforcement piece.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. owlbot:ignore instruct owl-bot to ignore a PR size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants