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

Drop pointer for shard id fields #3996

Conversation

vytautas-karpavicius
Copy link
Contributor

What changed?
Dropping pointer for shard id fields.

This change have an implication that failing to specify shard id in the request, will default to zero shard. ShardID=0 is a valid shard in cadence see here. This is not a huge issue as all those fields are within internal APIs which we can control.

An alternative solution could be to update proto IDLs to make shard_id optional by wrapping it with either google.protobuf.Int32Value or introducing separate wrapper message for it, such as ShardID.

Why?
To revise internal types for more idiomatic use and prepare for proto conversion.

How did you test it?
Existing tests.

Potential risks
Future changes that fails to specify required shard id will be interpreted as shard 0.

@vytautas-karpavicius vytautas-karpavicius requested a review from a team February 18, 2021 09:50
@coveralls
Copy link

coveralls commented Feb 18, 2021

Coverage Status

Coverage increased (+0.002%) to 64.624% when pulling 04c7e82 on vytautas-karpavicius:drop-ptr-shard-id into 456286a on uber:master.

@vytautas-karpavicius vytautas-karpavicius merged commit b877308 into cadence-workflow:master Feb 19, 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