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

ClaimReadyExchangeStepRequest does not specify which resource or collection it is operating on. #140

Closed
2 tasks done
Tracked by #152
SanjayVas opened this issue May 30, 2023 · 2 comments
Closed
2 tasks done
Tracked by #152
Labels
bug Something isn't working

Comments

@SanjayVas
Copy link
Member

SanjayVas commented May 30, 2023

This is similar to #138.

The ClaimReadyExchangeStep method appears to operate on a resource collection (the same way that a standard Create method does). This means it needs a parent field referencing the parent resource. This request message only has a oneof party field.

Alternatively the method can be changed to operate on a single resource by name, using a separate method to find the resource to operate on (e.g. List). An etag field can be added as per AIP-154 if needed to provide freshness validation.

The latter option is more flexible at the cost of needing to make two RPCs.

See AIP-136

@SanjayVas SanjayVas added the bug Something isn't working label May 30, 2023
@SanjayVas SanjayVas changed the title ClaimReadyExchangeStepRequest has a party field instead of a parent field ClaimReadyExchangeStepRequest has a party field instead of a parent or name field May 30, 2023
@SanjayVas SanjayVas changed the title ClaimReadyExchangeStepRequest has a party field instead of a parent or name field ClaimReadyExchangeStepRequest has a party field instead of a parent May 30, 2023
@SanjayVas SanjayVas changed the title ClaimReadyExchangeStepRequest has a party field instead of a parent ClaimReadyExchangeStepRequest has a party field instead of a parent or name field May 30, 2023
@SanjayVas
Copy link
Member Author

There's a complication here in that Exchanges and ExchangeSteps appear to be created lazily. An Exchange resource for a given date will never exist before that date. Moreover, this lazy initialization does not occur in the current implementation until ClaimReadyExchangeStep is called. Even then, an Exchange might not be created if there's still a claimable ExchangeStep on any RecurringExchange for the caller.

@SanjayVas SanjayVas mentioned this issue Jun 21, 2023
12 tasks
@SanjayVas
Copy link
Member Author

There's a further complication: while a RecurringExchange has two owners, an ExchangeStep descendant of that RecurringExchange only has one of these as its owner. A ready ExchangeStep is only claimable by this owner. This owner is not exposed in the public API.

This means that even if one were to use a resource name that indicated an appropriate parent of the RecurringExchange, the ExchangeStep claimed by ClaimReadyExchangeStep would still vary by the authenticated principal.

@SanjayVas SanjayVas changed the title ClaimReadyExchangeStepRequest has a party field instead of a parent or name field ClaimReadyExchangeStepRequest does not specify which resource or collection it is operating on. Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant