Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::apis::{ApplicationAttributes, ApplicationSchema, Shim};

#[derive(Error, Debug)]
pub enum FlameError {
#[error("'{0}' not found")]
#[error("{0}")]
NotFound(String),

#[error("{0}")]
Expand All @@ -45,7 +45,7 @@ pub enum FlameError {
#[error("{0}")]
InvalidConfig(String),

#[error("'{0}' is not initialized")]
#[error("{0}")]
Uninitialized(String),

#[error("{0}")]
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.console
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY --from=builder /usr/local/cargo/bin/flmping /usr/local/bin/flmping
COPY --from=builder /usr/local/cargo/bin/flmctl /usr/local/bin/flmctl
COPY --from=builder /usr/local/cargo/bin/flmexec /usr/local/bin/flmexec

COPY --from=ghcr.io/astral-sh/uv:0.8.15 /uv /uvx /bin/
COPY --from=ghcr.io/astral-sh/uv:0.9.18 /uv /uvx /bin/

RUN chmod +x /usr/local/bin/*

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.fem
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN mkdir -p /usr/local/flame/bin /usr/local/flame/work /usr/local/flame/sdk

WORKDIR /usr/local/flame/work

COPY --from=ghcr.io/astral-sh/uv:0.8.4 /uv /uvx /bin/
COPY --from=ghcr.io/astral-sh/uv:0.9.18 /uv /uvx /bin/

COPY --from=builder /usr/local/cargo/bin/flame-executor-manager /usr/local/flame/bin/flame-executor-manager
COPY --from=builder /usr/local/cargo/bin/flmping-service /usr/local/flame/bin/flmping-service
Expand Down
5 changes: 4 additions & 1 deletion examples/pi/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ impl flame::service::FlameService for PiService {

ctx.record_event(
256,
Some(format!("Task <{}> completed with sum: {}", ctx.task_id, sum)),
Some(format!(
"Task <{}> completed with sum: {}",
ctx.task_id, sum
)),
)?;

Ok(Some(TaskOutput::from(util::u32_to_bytes(sum))))
Expand Down
6 changes: 5 additions & 1 deletion executor_manager/src/shims/grpc_shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,27 @@ impl Shim for GrpcShim {

if let Some(ref mut client) = self.client {
let req = Request::new(EmptyRequest::default());
tracing::debug!("req: {:?}", req);
let resp = client.on_session_leave(req).await?;
tracing::debug!("on_session_leave response: {:?}", resp);
let output = resp.into_inner();
if output.return_code != 0 {
tracing::error!("on_session_leave failed: {:?}", output);
return Err(FlameError::Internal(output.message.unwrap_or_default()));
}
} else {
tracing::error!("no connection to service at <{}>", self.endpoint);
return Err(FlameError::Internal(format!(
"no connection to service at <{}>",
self.endpoint
)));
}

if let Some(ref mut event_handler) = self.event_handler {
tracing::debug!("waiting for event handler to complete");
event_handler
.await
.map_err(|e| FlameError::Internal(format!("event handler failed: {e}")))?;
tracing::debug!("event handler completed successfully");
}

Ok(())
Expand Down
1 change: 1 addition & 0 deletions executor_manager/src/states/idle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl WatchEventHandler {
#[async_trait]
impl shims::EventHandler for WatchEventHandler {
async fn on_event(&mut self, owner: EventOwner, event: Event) -> Result<(), FlameError> {
tracing::debug!("on_event: {:?}, event: {:?}", owner, event);
self.client.record_event(owner, event).await
}
}
92 changes: 46 additions & 46 deletions sdk/python/src/flamepy/frontend_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading