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

soldeer install hangs and doesn’t log anything #241

Open
2 tasks done
jirutka opened this issue Jan 15, 2025 · 4 comments
Open
2 tasks done

soldeer install hangs and doesn’t log anything #241

jirutka opened this issue Jan 15, 2025 · 4 comments
Labels
bug Something isn't working question Further information is requested

Comments

@jirutka
Copy link

jirutka commented Jan 15, 2025

I have checked the following:

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked that the bug is reproducible with the latest version of Soldeer.

Soldeer Version

soldeer 0.5.2

What Happened?

forge soldeer install on CI sometimes (but quite often) hangs for minutes until it fails with an error, or the job timeouts.

$ forge soldeer install
T  🦌 Soldeer Install 🦌
|
*  Done reading config
|  
*  Done reading lockfile
|
# After several minutes...
—  An error occurred during install
Error: Failed to run soldeer error during install operation: error during dependency installation: error downloading dependency: error decoding response body

The main problem is that it doesn’t log anything, even with -vvvvv, so we have no idea what’s going on and troubleshooting is nearly impossible.

Expected Behavior

Running forge soldeer install with --verbose should print what exactly it’s doing (and not just a fancy progress bar).

Reproduction Steps

No response

Configuration

foundry.toml:

[profile.default]
src = "src"
out = "out"
libs = ["dependencies"]
auto_detect_solc = true

fs_permissions = [
    { access = "read", path = "./broadcast" },
    { access = "read", path = "./reports" },
]

remappings = [
    "@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.0.2/",
    "@openzeppelin/contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.0.2/",
]

[profile.soldeer]
remappings_generate = false
remappings_regenerate = false
remappings_version = false
remappings_prefix = ""
recursive_deps = true

[dependencies]
"@openzeppelin-contracts" = "5.0.2"
"@openzeppelin-contracts-upgradeable" = "5.0.2"
forge-std = "1.9.2"
cyfrin-foundry-devops = "0.2.2"
solady = "0.0.259"

gitlab-ci.yml:

build:
  stage: build
  image: ghcr.io/foundry-rs/foundry:latest
  before_script:
    - forge soldeer install
  script:
    - forge build
@jirutka jirutka added the bug Something isn't working label Jan 15, 2025
@beeb
Copy link
Collaborator

beeb commented Jan 19, 2025

This looks like a network issue, and I agree that we need verbose logging for debugging. I am in the process of refactoring the core crate to add a bunch more logging, and then we will be able to expose a meaningful verbose flag which would switch off the "pretty" output and perform structured logging. This would be indeed nicer for CI runs.

Regarding the specific problem you're having, I see that you only use dependencies from the registry, and those are normally downloaded from S3 directly (if you have a soldeer.lock available in CI), so I don't think it's an API problem on our side, maybe just a gitlab CI worker connectivity issue.

We could think about adding a default timeout for these requests as well I suppose.

@beeb
Copy link
Collaborator

beeb commented Jan 19, 2025

I was able to reproduce locally and also in our CI so there's definitely something wrong. Still investigating which request is timing out.

@beeb
Copy link
Collaborator

beeb commented Jan 19, 2025

Hmm never mind, I had another issue that was unrelated but behaved similarly, because I was testing on another branch. Let's wait until we get more logging and then we can investigate further.

@beeb beeb added the question Further information is requested label Feb 13, 2025
@beeb
Copy link
Collaborator

beeb commented Feb 13, 2025

Verbose logging has been merged into master, so as soon as we publish a new release you'll be able to run the install with -vvvv to see more logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants