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

Optional fields in proto IDL requests #3989

Conversation

vytautas-karpavicius
Copy link
Contributor

@vytautas-karpavicius vytautas-karpavicius commented Feb 17, 2021

What changed?
Added google.protobuf.Int64Value wrappers for some fields in proto IDLs.

Why?
Those fields can have different behavior if not set.

  • inclusive_end_message_id for DLQ operations. If not set, operate on all messages in the queue. Check here
  • last_retrieved_message_id for GetDomainReplicationMessagesRequest. If not set, infer last message id from ack level. Check here
  • last_processed_message_id for GetDomainReplicationMessagesRequest. If not set, do not update ack level Check here

Having these wrappers allows having "not set" semantics.

An alternative solution would be to check for zero value. However message_id=0 can be valid in Cadence, as messages start counting from 0. The usage for such edge case is rather unlikely but still possible.

Additionally, previous_started_event_id fields can be not set Check here

How did you test it?

Potential risks

@coveralls
Copy link

coveralls commented Feb 17, 2021

Coverage Status

Coverage increased (+0.01%) to 64.592% when pulling bdc64c9 on vytautas-karpavicius:proto-message-id into 4b548e2 on uber:master.

@vytautas-karpavicius vytautas-karpavicius changed the title Optional message ids in proto IDL requests Optional fields in proto IDL requests Feb 18, 2021
@vytautas-karpavicius vytautas-karpavicius merged commit cf5c9cc into cadence-workflow:master Feb 22, 2021
yux0 pushed a commit to yux0/cadence that referenced this pull request May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants