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

CI: investigate network errors on macOS CI runs #38

Open
miraclx opened this issue Aug 27, 2022 · 4 comments
Open

CI: investigate network errors on macOS CI runs #38

miraclx opened this issue Aug 27, 2022 · 4 comments
Assignees

Comments

@miraclx
Copy link
Contributor

miraclx commented Aug 27, 2022

Opening this for visibility.

Been seeing this issue come up again and again in the macOS CI runs. And it doesn't happen in the Linux runs.

CleanShot 2022-08-27 at 18 28 59@2x

At the moment, we're compiling 39 generated examples as part of our integration tests. And in many cases, at least one would have this error, causing the whole job to fail.

Of course, you can retry and, often, that works, but it's an issue nonetheless.

It seems the error might originate from git2, cargo uses this internally, and we do too.

In [this CI run| https://github.com/near/cargo-near/runs/8051012360?check_suite_focus=true#step:3:499], cargo included a suggestion that I'll investigate ```console test cargo::test_dependency_explicit ... FAILED Caused by: `cargo metadata` exited with an error: Updating git repository `[https://github.com/near/near-sdk-rs.git`](https://github.com/near/near-sdk-rs.git%60) warning: spurious network error (2 tries remaining): SecureTransport error: connection closed via error; class=Net (12) warning: spurious network error (1 tries remaining): SecureTransport error: connection closed via error; class=Net (12) error: failed to get `near-sdk` as a dependency of package `test_dependency_explicit v0.1.0 (/Users/runner/work/cargo-near/cargo-near/target/_abi-integration-tests/test_dependency_explicit)` Caused by: failed to load source for dependency `near-sdk` Caused by: Unable to update https://github.com/near/near-sdk-rs.git?rev=03bab8db6145e038626c4b15b34b0bd8a33fba44 Caused by: failed to clone into: /Users/runner/.cargo/git/db/near-sdk-rs-7ba52202f378a9d9 Caused by: network failure seems to have happened if a proxy or similar is necessary `net.git-fetch-with-cli` may help here https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli Caused by: SecureTransport error: connection closed via error; class=Net (12) ```

If that works, we might have to favor the git CLI over the use of git2.

Some other failed runs from this error, to list a few:

@miraclx
Copy link
Contributor Author

miraclx commented Aug 28, 2022

Just ran into this issue while running our tests locally. So it's not a CI thing. But it's macOS only afaik.

@itegulov
Copy link
Contributor

It seems the error might originate from git2, cargo uses this internally, and we do too.

So you suspect this is some sort of concurrency issue between us and cargo (via git2)?

@miraclx
Copy link
Contributor Author

miraclx commented Aug 29, 2022

Seeing as we're cloning to a temp directory different from what cargo uses, I won't have expected a concurrency issue (at least not on the part of cloning the same repo to the same directory). Especially since this behavior is not observed in non-macOS tests. But the common denominator between us, and cargo is that dependency. Perhaps the concurrency issue might be the https protocol via OpenSSL, but that's even weirder of an issue. One request causing the other to fail.

@itegulov
Copy link
Contributor

Yeah, that is my intuition as well, was just wondering if you had a specific issue in mind. Yet to experience it myself, but I will keep my eyes open to see if there is a way to reproduce it consistently.

@exalate-issue-sync exalate-issue-sync bot changed the title CI: network errors on macOS CI runs CI: investigate network errors on macOS CI runs Aug 29, 2022
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

No branches or pull requests

2 participants