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

smoke_test: Run git commit to work around cargo bug #9405

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Sep 6, 2024

This is a workaround for rust-lang/cargo#14354, which currently prevents us from running our smoke tests.

cargo currently (Rust 1.81) crashes when cargo publish (or cargo package) is used on a git repository that has no commits yet. Since that is the setup we had been using for our smoke tests we are currently running into this issue. The solution in this PR runs git add --all and git commit as part of creating our dummy project, which resolves the problem on our end. As a nice bonus, this allows us to remove the --allow-dirty argument from the cargo publish call, since we have now committed all of our changes.

This now comes as close to publishing as possible without actually publishing anything.
Now that we commit our changes to the temporary git repository we don't need to use `--allow-dirty` anymore.
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Sep 6, 2024
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 54 lines in your changes missing coverage. Please review.

Project coverage is 89.14%. Comparing base (3672ffa) to head (334ee11).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
crates/crates_io_smoke_test/src/main.rs 0.00% 25 Missing ⚠️
crates/crates_io_smoke_test/src/git.rs 0.00% 18 Missing ⚠️
crates/crates_io_smoke_test/src/cargo.rs 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9405      +/-   ##
==========================================
- Coverage   89.27%   89.14%   -0.13%     
==========================================
  Files         284      285       +1     
  Lines       28872    28914      +42     
==========================================
  Hits        25775    25775              
- Misses       3097     3139      +42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Turbo87 Turbo87 merged commit 5bc5796 into rust-lang:main Sep 6, 2024
10 checks passed
@Turbo87 Turbo87 deleted the smoky branch September 6, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant