Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
a4c49fe5
Unverified
Commit
a4c49fe5
authored
May 23, 2025
by
Graham King
Committed by
GitHub
May 23, 2025
Browse files
chore: Upgrade Rust to 1.87 (#1189)
parent
3f9c3ffe
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
37 deletions
+30
-37
Earthfile
Earthfile
+2
-2
container/Dockerfile.none
container/Dockerfile.none
+1
-1
container/Dockerfile.tensorrt_llm
container/Dockerfile.tensorrt_llm
+1
-1
container/Dockerfile.vllm
container/Dockerfile.vllm
+1
-1
lib/llm/src/block_manager/layout.rs
lib/llm/src/block_manager/layout.rs
+1
-5
lib/llm/src/recorder.rs
lib/llm/src/recorder.rs
+22
-25
lib/runtime/examples/rust-toolchain.toml
lib/runtime/examples/rust-toolchain.toml
+1
-1
rust-toolchain.toml
rust-toolchain.toml
+1
-1
No files found.
Earthfile
View file @
a4c49fe5
...
...
@@ -91,13 +91,13 @@ rust-base:
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=/usr/local/cargo/bin:$PATH
ENV RUST_VERSION=1.8
6
.0
ENV RUST_VERSION=1.8
7
.0
ENV RUSTARCH=x86_64-unknown-linux-gnu
RUN wget --tries=3 --waitretry=5 "https://static.rust-lang.org/rustup/archive/1.28.1/x86_64-unknown-linux-gnu/rustup-init" && \
echo "a3339fb004c3d0bb9862ba0bce001861fe5cbde9c10d16591eb3f39ee6cd3e7f *rustup-init" | sha256sum -c - && \
chmod +x rustup-init && \
./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.8
6
.0 --default-host x86_64-unknown-linux-gnu && \
./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.8
7
.0 --default-host x86_64-unknown-linux-gnu && \
rm rustup-init && \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
...
...
container/Dockerfile.none
View file @
a4c49fe5
...
...
@@ -26,7 +26,7 @@ RUN apt update -y && \
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.8
6
.0 \
RUST_VERSION=1.8
7
.0 \
RUSTARCH=x86_64-unknown-linux-gnu
RUN wget --tries=3 --waitretry=5 "https://static.rust-lang.org/rustup/archive/1.28.1/${RUSTARCH}/rustup-init" && \
...
...
container/Dockerfile.tensorrt_llm
View file @
a4c49fe5
...
...
@@ -194,7 +194,7 @@ RUN apt-get update && \
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.8
6
.0
RUST_VERSION=1.8
7
.0
# Define Rust target based on ARCH_ALT ARG
ARG RUSTARCH=${ARCH_ALT}-unknown-linux-gnu
...
...
container/Dockerfile.vllm
View file @
a4c49fe5
...
...
@@ -246,7 +246,7 @@ RUN apt update -y && \
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.8
6
.0
RUST_VERSION=1.8
7
.0
# Define Rust target based on ARCH_ALT ARG
ARG RUSTARCH=${ARCH_ALT}-unknown-linux-gnu
...
...
lib/llm/src/block_manager/layout.rs
View file @
a4c49fe5
...
...
@@ -357,11 +357,7 @@ impl FullyContiguousConfig {
/// Calculate the total number of bytes required for allocation, including initial alignment padding.
/// Panics if the provided configuration is invalid.
pub
fn
required_allocation_size
(
&
self
)
->
usize
{
let
initial_padding
=
if
self
.inner.alignment
>
1
{
self
.inner.alignment
-
1
}
else
{
0
};
let
initial_padding
=
self
.inner.alignment
.saturating_sub
(
1
);
self
.layout_data_bytes
+
initial_padding
}
}
...
...
lib/llm/src/recorder.rs
View file @
a4c49fe5
...
...
@@ -22,7 +22,6 @@ use tokio::fs::{self, File, OpenOptions};
use
tokio
::
io
::{
AsyncBufReadExt
,
AsyncWriteExt
,
BufReader
,
BufWriter
};
use
tokio
::
sync
::{
mpsc
,
Mutex
};
use
tokio_util
::
sync
::
CancellationToken
;
use
tracing
as
log
;
/// Record entry that will be serialized to JSONL
#[derive(Serialize,
Deserialize)]
...
...
@@ -116,10 +115,10 @@ where
// Check time limit if set
if
let
Some
(
deadline
)
=
max_time_deadline
{
if
Instant
::
now
()
>=
deadline
{
lo
g
::
info!
(
"Recorder reached max time limit, shutting down"
);
tracin
g
::
info!
(
"Recorder reached max time limit, shutting down"
);
// Flush and cancel
if
let
Err
(
e
)
=
writer
.flush
()
.await
{
lo
g
::
error!
(
"Failed to flush on time limit shutdown: {}"
,
e
);
tracin
g
::
error!
(
"Failed to flush on time limit shutdown: {}"
,
e
);
}
cancel_clone
.cancel
();
return
;
...
...
@@ -132,10 +131,10 @@ where
_
=
cancel_clone
.cancelled
()
=>
{
// Flush any pending writes before shutting down
if
let
Err
(
e
)
=
writer
.flush
()
.await
{
lo
g
::
error!
(
"Failed to flush on shutdown: {}"
,
e
);
tracin
g
::
error!
(
"Failed to flush on shutdown: {}"
,
e
);
}
lo
g
::
debug!
(
"Recorder task shutting down"
);
tracin
g
::
debug!
(
"Recorder task shutting down"
);
return
;
}
...
...
@@ -161,20 +160,20 @@ where
let
json
=
match
serde_json
::
to_string
(
&
entry
)
{
Ok
(
json
)
=>
json
,
Err
(
e
)
=>
{
lo
g
::
error!
(
"Failed to serialize event: {}"
,
e
);
tracin
g
::
error!
(
"Failed to serialize event: {}"
,
e
);
continue
;
}
};
// Write JSON line
if
let
Err
(
e
)
=
writer
.write_all
(
json
.as_bytes
())
.await
{
lo
g
::
error!
(
"Failed to write event: {}"
,
e
);
tracin
g
::
error!
(
"Failed to write event: {}"
,
e
);
continue
;
}
// Add a newline
if
let
Err
(
e
)
=
writer
.write_all
(
b
"
\n
"
)
.await
{
lo
g
::
error!
(
"Failed to write newline: {}"
,
e
);
tracin
g
::
error!
(
"Failed to write newline: {}"
,
e
);
continue
;
}
...
...
@@ -186,7 +185,7 @@ where
if
line_count
>=
max_lines
{
// Flush the current file
if
let
Err
(
e
)
=
writer
.flush
()
.await
{
lo
g
::
error!
(
"Failed to flush file before rotation: {}"
,
e
);
tracin
g
::
error!
(
"Failed to flush file before rotation: {}"
,
e
);
}
// Create new filename with suffix
...
...
@@ -204,10 +203,10 @@ where
Ok
(
new_file
)
=>
{
writer
=
BufWriter
::
with_capacity
(
32768
,
new_file
);
line_count
=
0
;
lo
g
::
info!
(
"Rotated to new file: {}"
,
new_path
.display
());
tracin
g
::
info!
(
"Rotated to new file: {}"
,
new_path
.display
());
},
Err
(
e
)
=>
{
lo
g
::
error!
(
"Failed to open rotated file {}: {}"
,
new_path
.display
(),
e
);
tracin
g
::
error!
(
"Failed to open rotated file {}: {}"
,
new_path
.display
(),
e
);
// Continue with the existing file if rotation fails
}
}
...
...
@@ -221,10 +220,10 @@ where
// Check if we've reached the maximum count
if
let
Some
(
max
)
=
max_count
{
if
*
count
>=
max
{
lo
g
::
info!
(
"Recorder reached max event count ({}), shutting down"
,
max
);
tracin
g
::
info!
(
"Recorder reached max event count ({}), shutting down"
,
max
);
// Flush buffer before shutting down
if
let
Err
(
e
)
=
writer
.flush
()
.await
{
lo
g
::
error!
(
"Failed to flush on count limit shutdown: {}"
,
e
);
tracin
g
::
error!
(
"Failed to flush on count limit shutdown: {}"
,
e
);
}
// Drop the lock before cancelling
drop
(
count
);
...
...
@@ -262,10 +261,7 @@ where
let
first_time
=
self
.first_event_time
.lock
()
.await
;
match
*
first_time
{
Some
(
time
)
=>
Ok
(
time
.elapsed
()),
None
=>
Err
(
io
::
Error
::
new
(
io
::
ErrorKind
::
Other
,
"No events received yet"
,
)),
None
=>
Err
(
io
::
Error
::
other
(
"No events received yet"
)),
}
}
...
...
@@ -324,7 +320,7 @@ where
// Check if we've reached the maximum count
if
let
Some
(
max
)
=
max_count
{
if
count
>=
max
{
lo
g
::
info!
(
"Reached maximum event count ({}), stopping"
,
max
);
tracin
g
::
info!
(
"Reached maximum event count ({}), stopping"
,
max
);
break
;
}
}
...
...
@@ -332,7 +328,7 @@ where
// Check if we've exceeded the time limit
if
let
Some
(
end_time
)
=
deadline
{
if
Instant
::
now
()
>=
end_time
{
lo
g
::
info!
(
"Reached maximum time limit, stopping"
);
tracin
g
::
info!
(
"Reached maximum time limit, stopping"
);
break
;
}
}
...
...
@@ -348,7 +344,7 @@ where
let
record
:
RecordEntry
<
T
>
=
match
serde_json
::
from_str
(
&
line
)
{
Ok
(
record
)
=>
record
,
Err
(
e
)
=>
{
lo
g
::
warn!
(
tracin
g
::
warn!
(
"Failed to parse JSON on line {}: {}. Skipping."
,
line_number
,
e
...
...
@@ -370,9 +366,10 @@ where
}
// Send the event
event_tx
.send
(
event
)
.await
.map_err
(|
e
|
{
io
::
Error
::
new
(
io
::
ErrorKind
::
Other
,
format!
(
"Failed to send event: {}"
,
e
))
})
?
;
event_tx
.send
(
event
)
.await
.map_err
(|
e
|
io
::
Error
::
other
(
format!
(
"Failed to send event: {e}"
)))
?
;
// Update previous timestamp and count
prev_timestamp
=
Some
(
timestamp
);
...
...
@@ -380,9 +377,9 @@ where
}
if
count
==
0
{
lo
g
::
warn!
(
"No events to send from file: {}"
,
display_name
);
tracin
g
::
warn!
(
"No events to send from file: {}"
,
display_name
);
}
else
{
lo
g
::
info!
(
"Sent {} events from {}"
,
count
,
display_name
);
tracin
g
::
info!
(
"Sent {} events from {}"
,
count
,
display_name
);
}
Ok
(
count
)
...
...
lib/runtime/examples/rust-toolchain.toml
View file @
a4c49fe5
[toolchain]
channel
=
"1.8
6
.0"
channel
=
"1.8
7
.0"
rust-toolchain.toml
View file @
a4c49fe5
[toolchain]
channel
=
"1.8
6
.0"
channel
=
"1.8
7
.0"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment