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 on binary checksum fields #3943

Conversation

vytautas-karpavicius
Copy link
Contributor

What changed?
Drop pointer on binary checksum fields within internal types.

Why?
This is one of PRs planned to drop pointers for always required fields in internal types. It will make them more idiomatic and easier to use. These pointer are legacy of Thrift types that were used previously through our codebase. This will also allow safer migration to grpc, as proto primitive types don't have nils by default.

How did you test it?
Passing build and existing tests.

Potential risks

@vytautas-karpavicius vytautas-karpavicius requested a review from a team January 28, 2021 14:09
@coveralls
Copy link

coveralls commented Jan 28, 2021

Coverage Status

Coverage increased (+0.05%) to 61.555% when pulling 1fe87e7 on vytautas-karpavicius:drop-ptr-binary-checksum into ece6cac on uber:master.

Copy link
Member

@Groxx Groxx left a comment

Choose a reason for hiding this comment

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

Check the comment, but assuming that's fine: LGTM

BinaryChecksum: t.BinaryChecksum,
BinaryChecksum: &t.BinaryChecksum,
Copy link
Member

Choose a reason for hiding this comment

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

Broad Q on this one: what happens for old clients that don't send this field? or have they been cut off?
And how is this stored, could we be inserting "" for them now, or no? (which isn't really wrong, but maybe different / possibly an issue for edge cases?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bad binaries are checked on PollForDecisionTask request. If client don't send this field (nil) we treat it as empty string and pass it to the check function. It then checks against domain config for bad binaries.

So, client that do not set this field will be allowed. Unless "" binary is explicitly configured as bad binary, then it would be denied. It seems, that empty binary is valid, I see no validations checks for that.

@vytautas-karpavicius vytautas-karpavicius merged commit b22be7c into cadence-workflow:master Feb 1, 2021
github-actions bot pushed a commit to vytautas-karpavicius/cadence that referenced this pull request Feb 4, 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