Skip to content

Commit faa35d2

Browse files
committed
update
1 parent 40eb67a commit faa35d2

11 files changed

Lines changed: 23 additions & 34 deletions

File tree

crates/kube-manager/src/manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ impl KubeManager {
139139
tokio::select! {
140140
result = tunnel_task => {
141141
tracing::error!("Tunnel task completed unexpectedly: {:?}", result);
142-
return Err(anyhow!("Tunnel task completed unexpectedly"));
142+
Err(anyhow!("Tunnel task completed unexpectedly"))
143143
}
144144
result = main_task => {
145145
tracing::error!("Main task completed unexpectedly: {:?}", result);
146-
return Err(anyhow!("Main task completed unexpectedly"));
146+
Err(anyhow!("Main task completed unexpectedly"))
147147
}
148148
}
149149
}

crates/kube-sidecar-proxy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ url = "2.5"
6464
httparse = "1.8"
6565
http = "1.0"
6666

67-
# System level networking for iptables redirection
67+
# Low-level networking support
6868
libc = "0.2"
6969
nix = { version = "0.29", features = ["socket", "net"] }
7070

crates/kube-sidecar-proxy/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use uuid::Uuid;
1919
/// Immutable settings for the sidecar proxy determined at boot time.
2020
#[derive(Debug, Clone, Serialize, Deserialize)]
2121
pub struct SidecarSettings {
22-
/// Address the sidecar listens on for iptables redirected traffic.
22+
/// Address the sidecar listens on for redirected service traffic.
2323
pub listen_addr: SocketAddr,
2424
/// Namespace the sidecar is running in.
2525
pub namespace: Option<String>,

crates/kube/src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ impl KubeClusterServer {
14881488
for (catalog_id, workload_ids) in workloads_by_catalog {
14891489
let new_version = self
14901490
.db
1491-
.bump_app_catalog_sync_version(catalog_id, synced_at.clone())
1491+
.bump_app_catalog_sync_version(catalog_id, synced_at)
14921492
.await
14931493
.with_context(|| {
14941494
format!(

crates/tunnel/src/error.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ impl From<TunnelError> for io::Error {
1717
TunnelError::ConnectionClosed => {
1818
io::Error::new(io::ErrorKind::BrokenPipe, TunnelError::ConnectionClosed)
1919
}
20-
TunnelError::Remote(reason) => {
21-
io::Error::new(io::ErrorKind::Other, TunnelError::Remote(reason))
22-
}
20+
TunnelError::Remote(reason) => io::Error::other(TunnelError::Remote(reason)),
2321
}
2422
}
2523
}

crates/tunnel/src/relay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ where
368368
{
369369
let (sink, stream) = websocket.split();
370370

371-
let sink = sink.sink_map_err(|err| io::Error::other(err));
371+
let sink = sink.sink_map_err(io::Error::other);
372372

373373
let stream = stream.filter_map(|msg| {
374374
future::ready(match msg {

crates/tunnel/src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl TunnelConnector for TcpConnector {
6464
}
6565

6666
pub async fn run_tunnel_server(connection: Connection) -> Result<(), TunnelError> {
67-
run_tunnel_server_with_connector(connection, TcpConnector::default()).await
67+
run_tunnel_server_with_connector(connection, TcpConnector).await
6868
}
6969

7070
pub async fn run_tunnel_server_with_connector<C>(
@@ -145,7 +145,7 @@ async fn pipe_streams(
145145

146146
tokio_io::copy_bidirectional(&mut quic_stream, &mut target)
147147
.await
148-
.map_err(|err| TunnelError::Transport(err))?;
148+
.map_err(TunnelError::Transport)?;
149149
Ok(())
150150
}
151151

crates/tunnel/src/websocket.rs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ where
7979
let buf = BytesMut::from(bytes.as_ref());
8080
match this.codec.as_mut().deserialize(&buf) {
8181
Ok(item) => Poll::Ready(Some(Ok(item))),
82-
Err(err) => Poll::Ready(Some(Err(io::Error::new(io::ErrorKind::Other, err)))),
82+
Err(err) => Poll::Ready(Some(Err(io::Error::other(err)))),
8383
}
8484
}
8585
Some(Err(err)) => Poll::Ready(Some(Err(err))),
@@ -110,7 +110,7 @@ where
110110
.codec
111111
.as_mut()
112112
.serialize(&item)
113-
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
113+
.map_err(|err| io::Error::other(err))?;
114114
this.inner.start_send(bytes)
115115
}
116116

@@ -137,7 +137,7 @@ where
137137
loop {
138138
match futures::ready!(inner.0.poll_next_unpin(cx)) {
139139
Some(Ok(Message::Binary(data))) => {
140-
return Poll::Ready(Some(Ok(Bytes::from(data))));
140+
return Poll::Ready(Some(Ok(data)));
141141
}
142142
Some(Ok(Message::Close(_))) => return Poll::Ready(None),
143143
Some(Ok(_)) => continue,
@@ -157,30 +157,21 @@ where
157157
type Error = io::Error;
158158

159159
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
160-
self.project()
161-
.0
162-
.poll_ready(cx)
163-
.map_err(|err| io::Error::other(err))
160+
self.project().0.poll_ready(cx).map_err(io::Error::other)
164161
}
165162

166163
fn start_send(self: Pin<&mut Self>, item: Bytes) -> io::Result<()> {
167164
self.project()
168165
.0
169166
.start_send(Message::Binary(item))
170-
.map_err(|err| io::Error::other(err))
167+
.map_err(io::Error::other)
171168
}
172169

173170
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
174-
self.project()
175-
.0
176-
.poll_flush(cx)
177-
.map_err(|err| io::Error::other(err))
171+
self.project().0.poll_flush(cx).map_err(io::Error::other)
178172
}
179173

180174
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
181-
self.project()
182-
.0
183-
.poll_close(cx)
184-
.map_err(|err| io::Error::other(err))
175+
self.project().0.poll_close(cx).map_err(io::Error::other)
185176
}
186177
}

docs/core-concepts/architecture/branch-environment-architecture.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ const response = await axios.get('http://other-service:8080/api', {
9696

9797
**3. Routing Decision**
9898

99-
The Lapdev Sidecar Proxy (automatically injected by Lapdev into each pod in managed environments):
99+
The Lapdev Sidecar Proxy (automatically injected by Lapdev into each pod in managed environments) sits in front of your workload traffic:
100100

101-
1. Intercepts outgoing HTTP requests from your service
101+
1. Intercepts incoming requests headed to your service
102102
2. Reads the `tracestate` header to identify the branch
103103
3. Checks if the target service has a branch override for this branch
104-
4. Routes to the branched version if it exists
105-
5. Routes to the shared environment if no override exists
106-
6. The header continues to propagate to the next service
104+
4. If a Devbox intercept is active for this branch/service, routes to the developer’s local process; otherwise routes to the branched service if present
105+
5. Falls back to the shared environment if no branch-specific target exists
106+
6. The header continues downstream, so the next hop can repeat the decision
107107

108108
> **Note:** The sidecar proxy is automatically added when Lapdev creates your environment. No manual configuration needed. For more details, see [Traffic Routing Architecture](traffic-routing-architecture.md).
109109

pkg/image/vnc/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM debian:12
22

3-
RUN apt-get update && apt-mark hold iptables && \
3+
RUN apt-get update && \
44
env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
55
dbus-x11 \
66
psmisc \

0 commit comments

Comments
 (0)