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

Improve shuttle-runtime out-of-date hint #1533

Merged
merged 3 commits into from
Jan 23, 2024
Merged

Improve shuttle-runtime out-of-date hint #1533

merged 3 commits into from
Jan 23, 2024

Conversation

beyarkay
Copy link
Contributor

Description of change

Hey there! This change just adds a copy-paste friendly command for when the
shuttle runtime is out of date. It looks something like cargo add shuttle-runtime@{version}.

This lets the user quickly copy-paste the given line, instead of having to
manually edit Cargo.toml. Note that if the user is using other shuttle
crates (ie shuttle-aws-rds, shuttle-rocket, etc), this copy-paste line will
not update those, and the user will have to update them by manually editing
Cargo.toml. I didn't add shuttle-* crates to the cargo update
command, because that would install every crate, even if the user isn't using
them.

Maybe someone on the team knows if it's easy enough to tell which shuttle-*
crates a project is using, and then we can amend the command to explicitly
include those crates?

@jonaro00
Copy link
Member

Thanks for the initiative!
I have thought about this as well, and so far I've had the idea of adding a cargo-shuttle command that uses cargo-edit under the hood to update all shuttle dependencies simultaneously. It's not fully thought through, so there might be rough edges. (I will create an issue for it soon)

For this PR, I think we can add the cargo add command as a suggestion by extending the last sentence: ..., or run cargo add shuttle-runtime@{}

@beyarkay
Copy link
Contributor Author

uses cargo-edit under the hood to update all shuttle dependencies simultaneously

Ahh this would be nice.

I'll modify the PR to amend the final sentence

@beyarkay beyarkay marked this pull request as ready for review January 23, 2024 07:14
cargo-shuttle/src/lib.rs Outdated Show resolved Hide resolved
@beyarkay
Copy link
Contributor Author

Ah, sorry for the formatting bug. Is there anything else required for this PR to be merged?

@beyarkay
Copy link
Contributor Author

The CI errors look like they're network related?:

https://app.circleci.com/pipelines/github/shuttle-hq/shuttle/5569/workflows/268d4039-b446-4d17-9d54-9170e439b5c2/jobs/138073:

#!/bin/bash -eo pipefail
~/.cargo/bin/sccache --start-server

sccache: Starting the server...
sccache: error: Timed out waiting for server startup

Exited with code exit status 2

CircleCI received exit code 2

https://app.circleci.com/pipelines/github/shuttle-hq/shuttle/5569/workflows/268d4039-b446-4d17-9d54-9170e439b5c2/jobs/138089:

     Running tests/integration/main.rs (target/debug/deps/integration-4644d55ee736d30c)

running 3 tests
test run::needs_docker::rocket_postgres ... ignored
INFO: Targeting non-standard API: http://shuttle.invalid:80
INFO: Targeting non-standard API: http://shuttle.invalid:80
waiting for '/home/circleci/project/examples/poem/postgres' to start up...
waiting for '/home/circleci/project/examples/poem/mongodb' to start up...
    Building /home/circleci/project/examples/poem/mongodb
    Building /home/circleci/project/examples/poem/postgres
      Failed to fetch crates
      Failed to fetch crates
run test for '/home/circleci/project/examples/poem/postgres' exited early. Did it fail to compile/run?
error: test failed, to rerun pass `-p cargo-shuttle --test integration`

Caused by:
  process didn't exit successfully: `/home/circleci/project/target/debug/deps/integration-4644d55ee736d30c needs_docker --nocapture` (exit status: 1)

@jonaro00
Copy link
Member

Yeah, don't worry about them. All looks good now. Thanks!

@jonaro00 jonaro00 merged commit be2198c into shuttle-hq:main Jan 23, 2024
35 of 37 checks passed
jonaro00 added a commit that referenced this pull request Jan 24, 2024
* Improve shuttle-runtime out-of-date hint

* Update lib.rs

* fix: string formatting

---------

Co-authored-by: jonaro00 <[email protected]>
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.

2 participants