Skip to content

Commit

Permalink
use valid format for dummy uris connect through UDS channel (#668)
Browse files Browse the repository at this point in the history
* use valid format for dummy uris connect through UDS channel

Signed-off-by: Johnson Shih <jshih@microsoft.com>

* update patch version

Signed-off-by: Johnson Shih <jshih@microsoft.com>

* update patch version

Signed-off-by: Johnson Shih <jshih@microsoft.com>

* update node version

Signed-off-by: Johnson Shih <jshih@microsoft.com>

---------

Signed-off-by: Johnson Shih <jshih@microsoft.com>
  • Loading branch information
johnsonshih authored Oct 19, 2023
1 parent 172eb2b commit 12e66e7
Show file tree
Hide file tree
Showing 30 changed files with 61 additions and 49 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-agent-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-controller-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-discovery-handlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-opencv-base-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-rust-crossbuild-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-udev-video-broker-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-webhook-configuration-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Prepare To Install
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 18
- name: Install Deps
run: |
yarn install
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"
Expand Down
5 changes: 4 additions & 1 deletion agent/src/util/device_plugin_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ impl DevicePluginBuilder {
};

// We will ignore this dummy uri because UDS does not use it.
// Some servers will check the uri content so the uri needs to
// be in valid format even it's not used, the scheme part is used
// to specific what scheme to use, such as http or https
let kubelet_socket_closure = kubelet_socket.to_string();
let channel = Endpoint::try_from("http://[::]:50051")?
let channel = Endpoint::try_from("http://[::1]:50051")?
.connect_with_connector(service_fn(move |_: Uri| {
UnixStream::connect(kubelet_socket_closure.clone())
}))
Expand Down
5 changes: 4 additions & 1 deletion agent/src/util/discovery_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ impl DiscoveryOperator {
// Clone socket for closure which has static lifetime
let socket = socket.clone();
// We will ignore this dummy uri because UDS does not use it.
match Endpoint::try_from("http://[::]:50051")
// Some servers will check the uri content so the uri needs to
// be in valid format even it's not used, the scheme part is used
// to specific what scheme to use, such as http or https
match Endpoint::try_from("http://[::1]:50051")
.unwrap()
.connect_with_connector(tower::service_fn(move |_: Uri| {
let endpoint = socket.clone();
Expand Down
2 changes: 1 addition & 1 deletion agent/src/util/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ mod tests {
.await
.is_ok());
// Connect to registration service
let channel = Endpoint::try_from("http://[::]:50051")
let channel = Endpoint::try_from("http://[::1]:50051")
.unwrap()
.connect_with_connector(tower::service_fn(move |_: Uri| {
UnixStream::connect(registration_socket_path_string.clone())
Expand Down
2 changes: 1 addition & 1 deletion controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "controller"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["<bfjelds@microsoft.com>", "<kagold@microsoft.com>"]
edition = "2018"
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.12.13
version: 0.12.14

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.12.13
appVersion: 0.12.14
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "debug-echo-discovery-handler"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "onvif-discovery-handler"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opcua-discovery-handler"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-discovery-handler"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/debug-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-debug-echo"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/onvif/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-onvif"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/opcua/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-opcua"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/udev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-udev"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-discovery-utils"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>"]
edition = "2018"
Expand Down
2 changes: 1 addition & 1 deletion discovery-utils/src/discovery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ pub mod server {
Vec::new(),
)
.await;
let channel = Endpoint::try_from("http://[::]:50051")
let channel = Endpoint::try_from("http://[::1]:50051")
.unwrap()
.connect_with_connector(tower::service_fn(move |_: Uri| {
UnixStream::connect(discovery_handler_socket.clone())
Expand Down
5 changes: 4 additions & 1 deletion discovery-utils/src/registration_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ pub async fn register_discovery_handler(
info!("register_discovery_handler - entered");
loop {
// We will ignore this dummy uri because UDS does not use it.
if let Ok(channel) = Endpoint::try_from("http://[::]:50051")?
// Some servers will check the uri content so the uri needs to
// be in valid format even it's not used, the scheme part is used
// to specific what scheme to use, such as http or https
if let Ok(channel) = Endpoint::try_from("http://[::1]:50051")?
.connect_with_connector(tower::service_fn(move |_: Uri| {
tokio::net::UnixStream::connect(super::get_registration_socket())
}))
Expand Down
2 changes: 1 addition & 1 deletion samples/brokers/udev-video-broker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-video-broker"
version = "0.12.13"
version = "0.12.14"
license = "Apache-2.0"
authors = ["Kate Goldenring <kate.goldenring@microsoft.com>", "<bfjelds@microsoft.com>"]
edition = "2018"
Expand Down
Loading

0 comments on commit 12e66e7

Please sign in to comment.