Skip to content
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

feat(deployer): StateChangeLayer, DeploymentLogLayer, new log item structure #1171

Conversation

jonaro00
Copy link
Member

@jonaro00 jonaro00 commented Aug 23, 2023

Description of change

  • Renamed deploy_layer, added new generic layer for deployment logs from all backends
  • Deployer sends logs to Logger
  • Update tests

How has this been tested? (if applicable)

@jonaro00 jonaro00 force-pushed the feat/shuttle-logger-service branch 2 times, most recently from cf9f0ad to 0255379 Compare August 25, 2023 22:03
@jonaro00 jonaro00 changed the title [logger] shuttle logger service [logger] update deploy_layer Aug 28, 2023
@jonaro00 jonaro00 force-pushed the feat/shuttle-logger-service branch from 557b9bd to bb0c8c1 Compare August 29, 2023 00:06
Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few early comments

common/src/log.rs Show resolved Hide resolved
common/src/log.rs Outdated Show resolved Hide resolved
common/src/log.rs Outdated Show resolved Hide resolved
common/src/log.rs Outdated Show resolved Hide resolved
common/src/log.rs Outdated Show resolved Hide resolved
deployer/src/deployment/queue.rs Outdated Show resolved Hide resolved
deployer/src/deployment/state_change_layer.rs Show resolved Hide resolved
deployer/src/deployment/state_change_layer.rs Outdated Show resolved Hide resolved
deployer/src/persistence/deployment.rs Show resolved Hide resolved
deployer/src/persistence/mod.rs Show resolved Hide resolved
common/src/log.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, seems about done 🥳

deployer/src/deployment/queue.rs Outdated Show resolved Hide resolved
deployer/src/deployment/state_change_layer.rs Outdated Show resolved Hide resolved
deployer/src/deployment/state_change_layer.rs Show resolved Hide resolved
deployer/src/deployment/state_change_layer.rs Show resolved Hide resolved
deployer/src/persistence/log.rs Outdated Show resolved Hide resolved
proto/src/lib.rs Outdated Show resolved Hide resolved
@jonaro00 jonaro00 force-pushed the feat/shuttle-logger-service branch from e0a97fe to b06eaf8 Compare September 1, 2023 11:47
@jonaro00 jonaro00 changed the title [logger] update deploy_layer feat(deployer): StateChangeLayer, DeploymentLogLayer, new log item structure Sep 1, 2023
@jonaro00 jonaro00 marked this pull request as ready for review September 1, 2023 20:49
Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we just have to match the crash correctly and can then merge

cargo-shuttle/src/lib.rs Outdated Show resolved Hide resolved
common/src/log.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@oddgrd oddgrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just a few small comments.

common/src/log.rs Outdated Show resolved Hide resolved
deployer/src/deployment/queue.rs Show resolved Hide resolved
deployer/src/main.rs Show resolved Hide resolved
Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +31 to +39
pub const DEPLOYER_END_MSG_STARTUP_ERR: &str = "Service startup encountered an error";
pub const DEPLOYER_END_MSG_CRASHED: &str = "Service encountered an error and crashed";
pub const DEPLOYER_END_MSG_STOPPED: &str = "Service was stopped by the user";
pub const DEPLOYER_END_MSG_COMPLETED: &str = "Service finished running all on its own";

pub const DEPLOYER_END_MESSAGES_BAD: &[&str] =
&[DEPLOYER_END_MSG_STARTUP_ERR, DEPLOYER_END_MSG_CRASHED];
pub const DEPLOYER_END_MESSAGES_GOOD: &[&str] =
&[DEPLOYER_END_MSG_STOPPED, DEPLOYER_END_MSG_COMPLETED];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice!! 🥳

@chesedo chesedo merged commit 7ab8d11 into shuttle-hq:feat/shuttle-logger-service Sep 6, 2023
@jonaro00 jonaro00 deleted the feat/shuttle-logger-service branch September 6, 2023 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants