-
Notifications
You must be signed in to change notification settings - Fork 122
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
Fix incorrect type check. #203
Fix incorrect type check. #203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write a simple test for this too?
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @chrisstaite-menlo)
edb3d20
to
2b6eb14
Compare
Yes, and it turns out there's a bug in |
2b6eb14
to
c74a698
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @chrisstaite-menlo)
cas/scheduler/action_messages.rs
line 75 at r2 (raw file):
pub fn action_name(&self) -> String { format!( "{}/{}-{}/{:X}",
🤦 I thought .str()
encoded size_bytes
. I think this should be renamed: .hash_str()
to remove confusion.
When re-factoring the GrpcScheduler change, a dodgy copy-paste made it in. Fix up the type check to the correct type. Also fixes an issue in the action_name() implementation that was detected when writing a test. The size is not encoded but is expected for decoding.
c74a698
to
8c3d228
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 12 files reviewed, 1 unresolved discussion (waiting on @allada)
cas/scheduler/action_messages.rs
line 75 at r2 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
🤦 I thought
.str()
encodedsize_bytes
. I think this should be renamed:.hash_str()
to remove confusion.
That function is used in a lot of places! Funny how this simple one string change turned into a 91 line 12 file diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 11 of 11 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), 4 unresolved discussions (waiting on @chrisstaite-menlo)
cas/scheduler/action_messages.rs
line 780 at r2 (raw file):
} fn from_any<T>(message: &Any) -> Result<T, Error>
clever! 💯
cas/scheduler/action_messages.rs
line 840 at r2 (raw file):
}; println!("Operation name: {}", operation.name);
nit: debug artifact.
cas/scheduler/action_messages.rs
line 899 at r2 (raw file):
Self { name: val.unique_qualifier.action_name(), metadata: Some(to_any(&metadata)),
nit: Here (and above) Don't we need to deal with the result of to_any()
? I'm kinda confused on how this is compiling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @chrisstaite-menlo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @chrisstaite-menlo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @allada)
cas/scheduler/action_messages.rs
line 780 at r2 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
clever! 💯
Can't claim the credit here, all from tokio-rs/prost#299....
cas/scheduler/action_messages.rs
line 840 at r2 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
nit: debug artifact.
Yeah, already gone.
cas/scheduler/action_messages.rs
line 899 at r2 (raw file):
Previously, allada (Nathan (Blaise) Bruer) wrote…
nit: Here (and above) Don't we need to deal with the result of
to_any()
? I'm kinda confused on how this is compiling.
to_any
can't fail... only from_any
can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @chrisstaite-menlo)
cas/scheduler/action_messages.rs
line 899 at r2 (raw file):
Previously, chrisstaite-menlo (Chris Staite) wrote…
to_any
can't fail... onlyfrom_any
can.
aaah, need more coffee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @chrisstaite-menlo)
When re-factoring the GrpcScheduler change, a dodgy copy-paste made it in. Fix up the type check to the correct type.
This change is