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

[Feature]: Log paths of all files included in deployment archive #930

Closed
1 task done
jonaro00 opened this issue May 21, 2023 · 5 comments
Closed
1 task done

[Feature]: Log paths of all files included in deployment archive #930

jonaro00 opened this issue May 21, 2023 · 5 comments
Labels
T-Feature Request A request for a new feature

Comments

@jonaro00
Copy link
Member

jonaro00 commented May 21, 2023

Describe the feature

Many questions are posted regarding which files are uploaded to Shuttle.
The answer is quite simple (This should be listed in the docs btw), but it is hard to verify exactly which files are uploaded. The code for handling this is in an obscure place and not very straight forward.
Therefore, either cargo-shuttle or the logs from deployment should log all files that were included in the archive, i.e. either when making the archive or unpacking it.

Perhaps this will spam the logs a bit, so perhaps a --verbose flag could be introduced for deployments?

Alternatively, it could be a development build logging feature.

Suggestion or Example of how the feature would be used

Packing file .gitignore
Packing file Cargo.toml
...
Packing file src/main.rs
...

Duplicate declaration

  • I have searched the issues and this feature has not been requested before.
@imor
Copy link
Contributor

imor commented May 21, 2023

@jonaro00 How about adding a trace! log when appending all file entries to the archive? For example in cargo-shuttle/src/lib.rs:

// Append all the entries to the archive.
for (k, v) in entries {
    trace!("Packing {k:?}");
    tar.append_path_with_name(k, v)?;
}

@imor
Copy link
Contributor

imor commented May 21, 2023

Another idea might be to write the archive to disk locally for debugging. Users can then inspect the archive to confirm which files are included in it.

@hseeberger
Copy link
Contributor

I already considered running the deployer locally and add logging. So I like this idea. trace level makes sense for me for this use case.

I also like the alternative. Write the archive to disk and log (info level) the path.

@jonaro00
Copy link
Member Author

I like the idea with a tracing log in cargo-shuttle. It show up for the end user if they ran deploy with RUST_LOG, right? In that case, perhaps an info level log would be good.

@imor
Copy link
Contributor

imor commented May 21, 2023

Yes these logs can be enabled by setting the RUST_LOG env variable. E.g. to see only cargo_shuttle info logs, set RUST_LOG=cargo_shuttle=info. Added PR #931 for it.

@oddgrd oddgrd closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Feature Request A request for a new feature
Projects
None yet
Development

No branches or pull requests

4 participants