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

Replace dapr packages to use the official crate instead of personal forks #47

Merged
merged 12 commits into from
Sep 16, 2024

Conversation

ruokun-niu
Copy link
Contributor

Description

As our previous contributions to the Dapr Rust SDK repo have been merged and a new version was released, we should replace the source of the dapr package in our Cargo.toml files to use the official crate.

Currently, we are setting the version to be fixed at 0.15.1. We also had to update axum to the latest version to ensure that everything is compatible (which includes some code changes, see view-svc).

Type of change

  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Drasi (issue link optional).

Fixes: #issue_number

// Introduce delay so that dapr grpc port is assigned before app tries to connect
std::thread::sleep(std::time::Duration::new(3, 0));

let dapr_client = dapr::Client::<dapr::client::TonicClient>::connect(dapr_addr)
let addr = "https://127.0.0.1".to_string();

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
let mongo_uri = std::env::var("MONGO_URI").unwrap_or("mongodb://rg-mongo:27017".to_string());
let mongo_db = std::env::var("MONGO_DB").unwrap_or("api".to_string());
let redis_url = std::env::var("REDIS_URL").unwrap_or("redis://rg-redis:6379".to_string());

// Introduce delay so that dapr grpc port is assigned before app tries to connect
std::thread::sleep(std::time::Duration::new(5, 0));

let dapr_client = dapr::Client::<dapr::client::TonicClient>::connect(dapr_addr)
let addr = "https://127.0.0.1".to_string();

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
@@ -86,9 +83,10 @@
pubsub,
));

let dapr_client = dapr::Client::<dapr::client::TonicClient>::connect(dapr_addr)
let addr = "https://127.0.0.1".to_string();

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
@ruokun-niu ruokun-niu force-pushed the drasi-project-dapr-fork branch from 3937026 to b6fa80a Compare September 11, 2024 22:53
@ruokun-niu ruokun-niu merged commit 96add1f into main Sep 16, 2024
32 checks passed
@danielgerlag danielgerlag deleted the drasi-project-dapr-fork branch September 26, 2024 00:11
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