Skip to content

Commit

Permalink
Merge pull request #141 from mindvalley/chore/bump-version-2.0.0-alpha1
Browse files Browse the repository at this point in the history
Bump version and update to latest dependencies
  • Loading branch information
onimsha authored Sep 6, 2023
2 parents a62a231 + bd55fa7 commit 366fd84
Show file tree
Hide file tree
Showing 11 changed files with 342 additions and 314 deletions.
622 changes: 324 additions & 298 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wukong"
version = "1.1.3"
version = "2.0.0-alpha1"
edition = "2021"
default-run = "wukong"

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/pipeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl Display for JobBuild {
(self.timestamp % 1000) as u32 * 1_000_000,
)
.unwrap();
let started_at = DateTime::<Utc>::from_utc(naive, Utc);
let started_at = DateTime::<Utc>::from_naive_utc_and_offset(naive, Utc);

let commit_msg = match self.commit_msg {
Some(ref msg) => msg,
Expand Down
8 changes: 4 additions & 4 deletions cli/src/commands/tui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl App {
self.state.logs_vertical_scroll_state = self
.state
.logs_vertical_scroll_state
.position(self.state.logs_vertical_scroll as u16);
.position(self.state.logs_vertical_scroll);

self.state.logs_enable_auto_scroll_to_bottom = false;

Expand All @@ -186,7 +186,7 @@ impl App {
self.state.logs_vertical_scroll_state = self
.state
.logs_vertical_scroll_state
.position(self.state.logs_vertical_scroll as u16);
.position(self.state.logs_vertical_scroll);

self.state.logs_enable_auto_scroll_to_bottom = false;

Expand All @@ -198,7 +198,7 @@ impl App {
self.state.logs_horizontal_scroll_state = self
.state
.logs_horizontal_scroll_state
.position(self.state.logs_horizontal_scroll as u16);
.position(self.state.logs_horizontal_scroll);

self.state.logs_enable_auto_scroll_to_bottom = false;

Expand All @@ -210,7 +210,7 @@ impl App {
self.state.logs_horizontal_scroll_state = self
.state
.logs_horizontal_scroll_state
.position(self.state.logs_horizontal_scroll as u16);
.position(self.state.logs_horizontal_scroll);

self.state.logs_enable_auto_scroll_to_bottom = false;

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/tui/events/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async fn update_logs_entries(app: Arc<Mutex<App>>, log_entries: Option<Vec<LogEn
app_ref.state.logs_vertical_scroll_state = app_ref
.state
.logs_vertical_scroll_state
.position(app_ref.state.log_entries_ids.len() as u16);
.position(app_ref.state.log_entries_ids.len());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/tui/ui/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ fn humanize_timestamp(timestamp: &Option<i64>) -> String {
)
.unwrap();

let dt = DateTime::<Utc>::from_utc(naive, Utc).with_timezone(&Local);
let dt = DateTime::<Utc>::from_naive_utc_and_offset(naive, Utc).with_timezone(&Local);
// convert to std::time::SystemTime as the HumanTime expecting this
format!(
"{}",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/tui/ui/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl LogsWidget {
app.state.logs_vertical_scroll_state = app
.state
.logs_vertical_scroll_state
.content_length(log_entries.len() as u16);
.content_length(log_entries.len());

let paragraph = Paragraph::new(log_entries)
.block(Block::default().padding(Padding::new(1, 1, 0, 0)))
Expand Down
10 changes: 6 additions & 4 deletions cli/src/output/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ pub fn fmt_timestamp(o: &i64) -> String {
// if WUKONG_DEV_TIMEZONE is set, use the timezone
// normally this is only used for development and testing purpose
if let Some(custom_timezone) = CUSTOM_TIMEZONE.as_ref() {
let dt = DateTime::<Utc>::from_utc(naive, Utc).with_timezone(custom_timezone);
let dt = DateTime::<Utc>::from_naive_utc_and_offset(naive, Utc)
.with_timezone(custom_timezone);
format!("{}", dt.format("%Y %b %d %H:%M:%S %p"))
} else {
let dt = DateTime::<Utc>::from_utc(naive, Utc).with_timezone(&Local);
let dt = DateTime::<Utc>::from_naive_utc_and_offset(naive, Utc).with_timezone(&Local);
format!("{}", dt.format("%Y %b %d %H:%M:%S %p"))
}
}
Expand Down Expand Up @@ -115,14 +116,15 @@ pub fn fmt_human_timestamp(o: &i64) -> String {
// if WUKONG_DEV_TIMEZONE is set, use the timezone
// normally this is only used for development and testing purpose
if let Some(custom_timezone) = CUSTOM_TIMEZONE.as_ref() {
let dt = DateTime::<Utc>::from_utc(naive, Utc).with_timezone(custom_timezone);
let dt = DateTime::<Utc>::from_naive_utc_and_offset(naive, Utc)
.with_timezone(custom_timezone);
// convert to std::time::SystemTime as the HumanTime expecting this
format!(
"{}",
HumanTime::from(Into::<std::time::SystemTime>::into(dt))
)
} else {
let dt = DateTime::<Utc>::from_utc(naive, Utc).with_timezone(&Local);
let dt = DateTime::<Utc>::from_naive_utc_and_offset(naive, Utc).with_timezone(&Local);
// convert to std::time::SystemTime as the HumanTime expecting this
format!(
"{}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2008,5 +2008,5 @@ _wukong() {
esac
}

complete -F _wukong -o bashdefault -o default wukong
complete -F _wukong -o nosort -o bashdefault -o default wukong

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
source: cli/tests/wukong.rs
expression: "std::str::from_utf8(&output.stdout).unwrap()"
---
wukong 1.1.3
wukong 2.0.0-alpha1

2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wukong-sdk"
version = "1.1.3"
version = "2.0.0"
edition = "2021"

[features]
Expand Down

0 comments on commit 366fd84

Please sign in to comment.