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

Bump crates to the latest versions #2638

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Conversation

m-lord-renkse
Copy link
Contributor

@m-lord-renkse m-lord-renkse commented Apr 19, 2024

Description

Bump crates to the latest versions

Changes

  • Bump crates to the latest versions
  • Unify in the workspace all the crates which are used in at least twice

How to test

  1. Regression tests

@m-lord-renkse m-lord-renkse requested a review from a team as a code owner April 19, 2024 13:42
rand = "0.8.5"
regex = "1.10.4"
reqwest = "0.11.27"
secp256k1 = "0.27.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We cannot update to 0.29.0 until web3 crate is not updated to the aforementioned version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PR for the crate ethceontract-rs : cowprotocol/ethcontract-rs#969

async-trait = "0.1"
anyhow = "1.0.82"
async-trait = "0.1.80"
axum = "0.6"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating axum is a rabbit hole, but we need to do it sooner or later. The reason is that in order to update axum we need to update altogether:

  • hyper
  • every http crate
  • reqwest
  • warp (we are using our own forked version 3 years old...)

I'd recommend to fully delete warp dependency (latest versions of axum basically do everything which warp does anyway). And then update axum + hyper which both have decent breaking changes.

What do you guys think? should I create a task for it since it will be tricky to do?

I need to do this sooner or later, because we cannot update any of those crates.

async-trait = "0.1"
anyhow = "1.0.82"
async-trait = "0.1.80"
axum = "0.6"
bigdecimal = "0.3"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We cannot update bigdecimal so easily, they removed the sqlx immediate support, very likely it is solved by just converting it into a primitive, but it needs more research to really check this, otherwise we can make break our database. What's more, this crate update is really not that needed at the moment.

@m-lord-renkse m-lord-renkse force-pushed the bump-to-latest-versions branch from d465227 to d2a0ce2 Compare April 19, 2024 14:05
@@ -1248,7 +1248,7 @@ mod tests {
assert_eq!(time, order.cancellation_timestamp.unwrap());

// Cancel again and verify that cancellation timestamp was not changed.
let irrelevant_time = Utc.timestamp_opt(1234567890, 1_000_000_000).unwrap();
let irrelevant_time = Utc.timestamp_opt(1234564319, 1_000_000_000).unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

From chrono:

The nanosecond part can exceed 1,000,000,000 in order to represent a leap second, but only when secs % 60 == 59. (The true "UNIX timestamp" cannot represent a leap second unambiguously.)

So I needed to change the main timestamp to have as the second part % 60 = 59

@m-lord-renkse m-lord-renkse force-pushed the bump-to-latest-versions branch from d2a0ce2 to c9cafef Compare April 23, 2024 07:26
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Nice initiative.
Looks good overall just a bit concerned with updating the AWS dependencies. Could you please do a test run for those. I think none of that is covered by any integration tests.

Cargo.toml Outdated Show resolved Hide resolved
crates/driver/Cargo.toml Outdated Show resolved Hide resolved
crates/driver/Cargo.toml Outdated Show resolved Hide resolved
@m-lord-renkse m-lord-renkse force-pushed the bump-to-latest-versions branch from c9cafef to 493af00 Compare April 23, 2024 08:54
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Since testing the AWS change it pretty elaborate without merging this PR we agreed in DMs that testing in staging (by settling a test trade) and reverting if it doesn't work is fine.

@m-lord-renkse m-lord-renkse merged commit b482f79 into main Apr 23, 2024
9 checks passed
@m-lord-renkse m-lord-renkse deleted the bump-to-latest-versions branch April 23, 2024 10:46
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants