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

fix: migration dependency : chrono -> time-rs #194

Merged
merged 13 commits into from
Jun 17, 2022
Merged

fix: migration dependency : chrono -> time-rs #194

merged 13 commits into from
Jun 17, 2022

Conversation

kazuk
Copy link
Contributor

@kazuk kazuk commented Jun 14, 2022

Issue number and link

Fixes: #191

Describe your changes

  • remove dependency to chrono
  • add dependency time

Checklist before requesting a review

  • I follow the Semantic Pull Requests rules (bugfix/feature)
  • I specified links to related issues (must: bugfix, want: feature)
  • I have performed a self-review of my code (bugfix/feature)
  • I have added thorough tests (bugfix/feature)
  • I have edited ## [Unreleased] section in CHANGELOG.md following keep a changelog syntax (bugfix/feature)
  • I {made/will make} a related pull request for documentation repo (feature)

@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #194 (234de98) into main (da16f07) will increase coverage by 0.06%.
The diff coverage is 97.92%.

@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
+ Coverage   87.41%   87.48%   +0.06%     
==========================================
  Files         206      206              
  Lines       12247    12319      +72     
==========================================
+ Hits        10706    10777      +71     
- Misses       1541     1542       +1     
Impacted Files Coverage Δ
...gn-service/src/source/source_input/timed_stream.rs 0.00% <0.00%> (ø)
...vice/src/source/source_input/timed_stream/timer.rs 0.00% <0.00%> (ø)
springql-core/src/api/error.rs 0.00% <ø> (ø)
...ngql-core/src/stream_engine/autonomous_executor.rs 93.67% <0.00%> (ø)
foreign-service/src/source.rs 94.73% <100.00%> (ø)
springql-core/src/expression.rs 74.09% <100.00%> (-1.36%) ⬇️
...sk/query_subtask/group_aggregate_window_subtask.rs 71.42% <100.00%> (+1.42%) ⬆️
...mp_task/pump_subtask/query_subtask/join_subtask.rs 95.45% <100.00%> (+0.21%) ⬆️
...c/stream_engine/autonomous_executor/task/window.rs 100.00% <100.00%> (ø)
...ngine/autonomous_executor/task/window/aggregate.rs 98.12% <100.00%> (+0.13%) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4328adb...234de98. Read the comment docs.

springql-core/src/time.rs Outdated Show resolved Hide resolved
springql-core/src/time.rs Outdated Show resolved Hide resolved
springql-core/src/time.rs Outdated Show resolved Hide resolved
springql-core/src/time.rs Outdated Show resolved Hide resolved
springql-core/src/time.rs Show resolved Hide resolved
@kazuk kazuk marked this pull request as ready for review June 15, 2022 21:49
@kazuk kazuk requested a review from laysakura June 15, 2022 21:49
@kazuk kazuk mentioned this pull request Jun 15, 2022
5 tasks
@laysakura laysakura changed the title migration dependency : chrono -> time-rs refactor: migration dependency : chrono -> time-rs Jun 16, 2022
@laysakura
Copy link
Contributor

[nits]

I follow the Semantic Pull Requests rules (bugfix/feature)

I edited the title.

@laysakura laysakura changed the title refactor: migration dependency : chrono -> time-rs fix: migration dependency : chrono -> time-rs Jun 16, 2022
pub fn panes_to_dispatch(
&mut self,
rowtime: SpringTimestamp,
) -> Result<impl Iterator<Item = &mut P>, SpringError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

[nits] We can use crate::api::error::Result here

@@ -74,10 +79,10 @@ where
self.panes.clear()
}

fn generate_panes_if_not_exist(&mut self, rowtime: SpringTimestamp) {
fn generate_panes_if_not_exist(&mut self, rowtime: SpringTimestamp) -> Result<(), SpringError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

[nits] We can use crate::api::error::Result here

fn valid_open_at_s(
&self,
rowtime: SpringTimestamp,
) -> Result<Vec<SpringTimestamp>, SpringError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

[nits] We can use crate::api::error::Result here

springql-core/src/time.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@laysakura laysakura left a comment

Choose a reason for hiding this comment

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

Final request:

Want to remove springql/tests/ for now.

( #193 is not merged yet)

@@ -53,6 +53,7 @@ ignore = [
# temporary turn off : [Potential segfault in the time crate](https://rustsec.org/advisories/RUSTSEC-2020-0071)
# tracking issue : https://github.com/SpringQL/SpringQL/issues/173
"RUSTSEC-2020-0071",

Copy link
Contributor

Choose a reason for hiding this comment

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

I heard from @kazuk we cannot remove it for now because simple-server crate depends on chrono.

I will fix the dependency and remove the line here.

laysakura
laysakura previously approved these changes Jun 17, 2022
Copy link
Contributor

@laysakura laysakura left a comment

Choose a reason for hiding this comment

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

💯 🕙

@laysakura
Copy link
Contributor

@kazuk ah, sorry. I found the test with rust 1.56.0 failed.

[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "-eux" "/tmp/runner/fsio/sxL2R1rpV2.sh"
+ RUST_LOG=springql_core=info,warn
+ RUSTFLAGS='-D warnings'
+ cargo test --workspace --all-targets --all-features
error: package `indexmap v1.9.0` cannot be built because it requires rustc 1.56.1 or newer, while the currently active rustc version is 1.56.0
[cargo-make] ERROR - Unable to execute script.

I will do the following:

  1. Bump up the MSRV to 1.56.1
  2. merge main branch into this topic branch
  3. merge this PR

@laysakura laysakura deleted the chrono_time branch June 17, 2022 03:38
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.

chrono to time
2 participants