-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[aptos-workspace-server] various fixes and improvements #15571
base: main
Are you sure you want to change the base?
Conversation
⏱️ 51m total CI duration on this PR
|
aptos-move/aptos-workspace-server/src/services/docker_common.rs
Outdated
Show resolved
Hide resolved
future::Future, | ||
net::{IpAddr, Ipv4Addr}, | ||
sync::Arc, | ||
}; | ||
|
||
/// An wrapper to ensure propagation of chain of errors. |
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.
nit
/// An wrapper to ensure propagation of chain of errors. | |
/// A wrapper to ensure propagation of chain of errors. |
#[arg(long, default_value_t = 1800)] | ||
timeout: u64, |
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.
A comment and maybe better naming could be nice here. My first thought was that this would be a startup or shutdown timeout, but it really seems like a "max lifespan".
I don't fully know exactly how you use workspace, but I suppose there is a good reason that we always do this, vs making it optional?
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.
Also it'd be good to suffix whatever name we choose with _secs
bollard::errors::Error::DockerResponseServerError { | ||
status_code: 409, .. | ||
} => { | ||
println!("Docker network {} already exists, not creating it", name); |
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.
Nice.
|
||
handle | ||
.await | ||
.map_err(|err| anyhow!("failed to join task handle: {}", err))? |
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.
.map_err(|err| anyhow!("failed to join task handle: {}", err))? | |
.map_err(|err| anyhow!("failed to join task handle: {:#}", err))? |
I think this is the best way to get the most context? Not 100% sure though.
}, | ||
Err(_err) => { | ||
println!( | ||
"Docker image {} does not exist. Pulling image..", |
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.
tiny nit
"Docker image {} does not exist. Pulling image..", | |
"Docker image {} does not exist. Pulling image...", |
This PR implements several fixes and improvements to
aptos-workspace-server
: