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

Upgrade HASH Graph dependencies #1195

Merged
merged 11 commits into from Oct 13, 2022
Merged

Conversation

Alfred-Mountfield
Copy link
Contributor

@Alfred-Mountfield Alfred-Mountfield commented Oct 12, 2022

🌟 What is the purpose of this PR?

We were starting to fall behind on dependency versions, there were a few major (or at least breaking) updates made to our dependencies. This PR upgrades all dependencies (or at least all the ones that were automatically selected by cargo upgrade --workspace).

This also means we are using a proper release of error-stack again rather than a direct git hash.

🔗 Related links

🔍 What does this change?

  • Runs cargo upgrade and updates the versions for packages (look to diff for comprehensive list)
  • Stop depending on a git hash for utoipa and use their newest release
    • Changes our uses of Component to ToSchema
    • Changes our usages of handlers to paths in utoipa (they changed the attribute)
    • Changes some of our own modifying code to accept the new API
  • Upgrades clap to version 4

📜 Does this require a change to the docs?

  • The OpenAPI spec has been regenerated, I don't believe anything else needs changing

⚠️ Known issues

I've added a new dependency on indexmap but we can probably remove it. I've opened a comment to highlight it.

🐾 Next steps

  • Upgrade the engine and other Rust projects to use the new error-stack

🛡 What tests cover this?

All tests that interact with the graph, follow the READMEs, but CI should be good enough.

for content in content.values_mut() {
modify_schema_references(&mut content.schema);
}
}

fn modify_schema_references(schema_component: &mut openapi::Component) {
// TODO: can we avoid importing IndexMap here?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There doesn't seem to be a trait we can rely on? Maybe we can pass a mutable iterator in here instead of taking the map?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I was hoping all Maps would inherit from some Map trait but it turns out there are good reasons for not doing so)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it with IntoIterator

axum = "0.5.11"
clap = { version = "3.2.10", features = ["cargo", "derive", "env", "wrap_help"] }
clap_complete = "3.2.3"
# TODO: Change to `version = "0.2"` as soon as it's released
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 still haven't swapped to 0.2 in the engine and such, didn't want to do it in this pr. cc @TimDiekmann

Copy link
Member

@TimDiekmann TimDiekmann left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Not a requested change, but we could use the opportunity to bump the tools as well:

[tasks.install-cargo-hack]
private = true
install_crate = { crate_name = "cargo-hack", version = "0.5.15", binary = "cargo", test_arg = ["hack", "--version"] }
[tasks.install-cargo-nextest]
private = true
install_crate = { crate_name = "cargo-nextest", version = "0.9.28", binary = "cargo", test_arg = ["nextest", "--version"] }

cargo quickinstall cargo-make --version 0.35.15
cargo quickinstall cargo-hack --version 0.5.15

cargo quickinstall cargo-make --version 0.35.15
cargo quickinstall cargo-hack --version 0.5.15
cargo quickinstall cargo-nextest --version 0.9.28

cargo quickinstall cargo-make --version 0.35.15

cargo quickinstall cargo-make --version 0.35.15
cargo quickinstall cargo-hack --version 0.5.15
cargo quickinstall cargo-nextest --version 0.9.28

@Alfred-Mountfield Alfred-Mountfield merged commit 97e2c28 into main Oct 13, 2022
@Alfred-Mountfield Alfred-Mountfield deleted the am/update-dependencies branch October 13, 2022 12:30
@Alfred-Mountfield
Copy link
Contributor Author

@TimDiekmann

I'll avoid updating the tooling versions just because this is nicely constrained to the graph at the moment, and most of the tools are defined at a repo level. I agree we should probably do that as a follow up (perhaps when migrating the engine and such to use the release of error-stack

@nonparibus nonparibus added type/eng > backend Owned by the @backend team and removed area: backend labels Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deps Relates to third-party dependencies (area) type/eng > backend Owned by the @backend team
Development

Successfully merging this pull request may close these issues.

None yet

3 participants