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

Fix CI issues #5

Merged
merged 5 commits into from
Mar 1, 2024
Merged

Conversation

evshary
Copy link
Contributor

@evshary evshary commented Mar 1, 2024

As titled, the PR is to fix the lint and build issue.
But we need to wait for the following PR to be merged.
eclipse-uprotocol/up-rust#52

@evshary
Copy link
Contributor Author

evshary commented Mar 1, 2024

Since the PR is merged, this can be reviewed

@@ -20,5 +20,5 @@ log = "0.4.17"
prost = "0.12"
prost-types = "0.12"
protobuf = { version = "3.3" }
up-rust = { git = "https://github.com/eclipse-uprotocol/up-rust", branch = "main" }
up-rust = { git = "https://github.com/eclipse-uprotocol/up-rust", rev = "68c8a1d94f0006daf4ba135c9cbbfddcd793108d" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah okay, and then if there's a tag, we can use that instead. I'm always super impressed by Rust tooling. Using a git tag has been supported since 2014 🙂

UStatus::fail_with_code(UCode::INVALID_ARGUMENT, "Wrong authority")
})?;
}
let buf: Vec<u8> = authority.try_into().map_err(|_| {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

}

// The UURI format should be "upr/<UAuthority id or ip>/<the rest of remote UUri>" or "upl/<local UUri>"
fn to_zenoh_key_string(uri: &UUri) -> Result<String, UStatus> {
if uri.authority.is_some() && uri.entity.is_none() && uri.resource.is_none() {
Ok(String::from("upr/") + &UPClientZenoh::get_uauth_from_uuri(uri)? + "/**")
} else {
let micro_uuri = MicroUriSerializer::serialize(uri).map_err(|_| {
let micro_uuri: Vec<u8> = uri.try_into().map_err(|_| {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

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

LGTM!

let mut uattributes =
UAttributesBuilder::request(UPriority::UPRIORITY_CS4, topic.clone(), 255).build();
// TODO: How to create the source address for Response
let uuid_builder = UUIDBuilder::new();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this RPC flow still needs some thought though.

We should not be creating a new UUIDBuilder here and getting the reqid from it. I believe this is where the UUIDBuilder that's been constructed already for the uE sending the request should be used.

As is stated over here in the UUID spec, the rand_b portion of the UUID is used to uniquely identify the uE, thus it should be "stable" and thus we should use the UUIDBuilder already associated with this uE.

I suppose that may mean that on construction, you'd need to construct a UUIDBuilder and then use it within RpcClient::invoke_method().

WDYT?

@stevenhartley stevenhartley merged commit cca6bdb into eclipse-uprotocol:main Mar 1, 2024
4 checks passed
@evshary evshary deleted the fix_ci_issue branch March 2, 2024 00:01
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