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

fix(build): Fetch with cli while updating the registry index #1570

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

olksdr
Copy link
Contributor

@olksdr olksdr commented Nov 7, 2022

It looks like docker build was killed because it used too much memory while updating the registry index, when forcing cargo to use cli, I could pass the step when the index is updated and successfully build the image.

Fixes #1559
It seems related to rust-lang/cargo#9167

#skip-changelog

@olksdr olksdr requested review from jjbayer and a team November 7, 2022 08:53
@olksdr olksdr self-assigned this Nov 7, 2022
@@ -51,7 +51,8 @@ ENV RELAY_FEATURES=${RELAY_FEATURES}
COPY . .

# Build with the modern compiler toolchain enabled
RUN scl enable devtoolset-10 llvm-toolset-7.0 -- \
RUN echo -e "[net]\ngit-fetch-with-cli = true" > $CARGO_HOME/config \
&& scl enable devtoolset-10 llvm-toolset-7.0 -- \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can also be set on the command line, but I'm not sure if we want to change the Makefile for this. Maybe we can just insert a RUN cargo --config net.git-fetch-with-cli=true fetch before this command?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, in symbolic it's been done like this: getsentry/symbolic#585
Ideally we fix this for the binary and library builds alike.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excuse me, what does this command means (effect) in this case ? RUN cargo --config net.git-fetch-with-cli=true fetch @jjbayer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jan-auer yeah, so that's what this PR does as well, just adds the config for cargo with same option.

@shezhangzhang
Copy link
Contributor

👀

@shezhangzhang
Copy link
Contributor

image

@olksdr olksdr merged commit e4d11ee into master Nov 9, 2022
@olksdr olksdr deleted the fix/cargo-index-update-and-build branch November 9, 2022 12:09
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.

Error when docker buld . on Mac m1 pro
5 participants