Skip to content

Commit 677875f

Browse files
authored
fix(build): restore Windows lint and trim the image build context (#5021)
* fix(windows): restore Windows lint on main The Windows-only host proxy passed 18 arguments to ProxyHandle::start_with_bind_addr after #4276 added reserved_destination. It hosts no OTLP relay, so it passes None. The network supervisor trust artifact helpers only act on Unix, so Clippy flags their Result as unnecessary on Windows; allow it there, as other cfg-dependent helpers do. Signed-off-by: Kris Hicks <khicks@nvidia.com> * build(docker): exclude nested build outputs from the image build context .dockerignore excluded only the top-level target directory, so image builds from the repository root also sent nested Cargo target directories (e2e/rust, tests, examples), node_modules, and the .jj store as context: about 15 GB in a local checkout, which a remote Podman machine copies on every build. Exclude target and node_modules at any depth, and .jj. The images copy only prebuilt binaries from deploy/docker/.build. Signed-off-by: Kris Hicks <khicks@nvidia.com> --------- Signed-off-by: Kris Hicks <khicks@nvidia.com>
1 parent 2fb8d78 commit 677875f

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎.dockerignore‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Git
1+
# Version control
22
.git
33
.gitignore
4+
.jj
45

56
# Rust build artifacts (use BuildKit cache mounts instead)
6-
target
7+
**/target
78

89
# Python
910
__pycache__
@@ -37,3 +38,6 @@ kubeconfig
3738
*.log
3839
*.tmp
3940
.DS_Store
41+
42+
# Node
43+
**/node_modules

‎crates/openshell-server/src/network_trust.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ fn verify_existing_artifact(path: &Path, normalized: &[u8], digest: &str) -> Res
413413
})
414414
}
415415

416+
#[cfg_attr(not(unix), allow(clippy::unnecessary_wraps))]
416417
fn set_artifact_directory_permissions(path: &Path) -> Result<()> {
417418
#[cfg(unix)]
418419
{
@@ -429,6 +430,7 @@ fn set_artifact_directory_permissions(path: &Path) -> Result<()> {
429430
Ok(())
430431
}
431432

433+
#[cfg_attr(not(unix), allow(clippy::unnecessary_wraps))]
432434
fn set_artifact_file_permissions(file: &fs::File, path: &Path) -> Result<()> {
433435
#[cfg(unix)]
434436
{
@@ -449,6 +451,7 @@ fn set_artifact_file_permissions(file: &fs::File, path: &Path) -> Result<()> {
449451
/// Durably record a successful hard-link publication on platforms that permit
450452
/// syncing directories. This follows the same `File::open(...).sync_all()`
451453
/// pattern used for other atomic state writes in the repository.
454+
#[cfg_attr(not(unix), allow(clippy::unnecessary_wraps))]
452455
fn sync_artifact_directory(path: &Path) -> Result<()> {
453456
#[cfg(unix)]
454457
{

‎crates/openshell-supervisor-network/src/host.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ pub async fn start_host_proxy(config: HostProxyConfig) -> Result<HostProxyHandle
224224
None,
225225
Some(direct_listener_identity),
226226
None,
227+
None,
227228
)
228229
.await?;
229230

0 commit comments

Comments
 (0)