Skip to content

Conversation

@Kayanski
Copy link
Contributor

This PR aims at allowing developers to overwrite chain options directly in the daemon Builder.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 15, 2024

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: 29700a8
Status:⚡️  Build in progress...

View logs

@codecov
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.1%. Comparing base (859ba48) to head (bafa9fe).
Report is 3 commits behind head on main.

❗ Current head bafa9fe differs from pull request most recent head 29700a8. Consider uploading reports for the commit 29700a8 to get more accurate results

Additional details and impacted files
Files Coverage Δ
cw-orch-daemon/src/sync/builder.rs 91.1% <100.0%> (+31.1%) ⬆️

... and 2 files with indirect coverage changes

// # Optional
pub(crate) handle: Option<tokio::runtime::Handle>,
pub(crate) deployment_id: Option<String>,
pub(crate) additional_grpc_url: Option<String>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub(crate) additional_grpc_url: Option<String>,
pub(crate) overwrite_grpc_url: Option<String>,

Copy link
Contributor

Choose a reason for hiding this comment

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

Should either rename this or update the URL logic to add the url to the grpc url list instead of replacing it alltogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to be able to replace it in case the current one gives errors (even if we have fallback logic right now)
Choosing for replacing it (works in most cases)

}

pub fn add_grpc_url(&mut self, url: &str) -> &mut Self {
self.additional_grpc_url = Some(url.to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.additional_grpc_url = Some(url.to_string());
self.overwrite_grpc_url = Some(url.to_string());

// Override gas fee
override_fee(&mut chain, self.gas_denom.clone(), self.gas_fee);
// Override grpc_url
override_grpc_url(&mut chain, self.additional_grpc_url.clone());
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
override_grpc_url(&mut chain, self.additional_grpc_url.clone());
override_grpc_url(&mut chain, self.overwrite_grpc_url.clone());

@CyberHoward
Copy link
Contributor

stable clippy is failing

@Kayanski Kayanski merged commit 6665ad8 into main Apr 19, 2024
@Kayanski Kayanski deleted the nicolas/orc-118-add-overwrite-options-to-daemon-builder branch April 19, 2024 12:30
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