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: fix git dubious permissions error #27423

Merged

Conversation

josibake
Copy link
Member

@josibake josibake commented Apr 5, 2023

fixes #27376 (comment)

this appears to be caused by a more recent version of git being sensitive to mismatched permissions on directories. we didn't notice this before because we were using two separate user accounts to fix up dir permissions in the container , but the second account was removed in #27376

there might be a more elegant way to do this, but this does the trick and seems to be the way others are fixing this issue around the internets.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 5, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hebasto, RandyMcMillan
Concept ACK fanquake

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #27340 (ci: Use Cirrus CI dockerfile env by MarcoFalke)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot added the Tests label Apr 5, 2023
@josibake
Copy link
Member Author

josibake commented Apr 5, 2023

cc @hebasto @MarcoFalke

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK 2c11e94, tested on Ubuntu 22.04.

ci/test/04_install.sh Outdated Show resolved Hide resolved
@josibake josibake force-pushed the josibake-git-dubious-dir-permissions branch from 2c11e94 to ed4a833 Compare April 5, 2023 12:25
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

re-ACK ed4a833

@fanquake
Copy link
Member

fanquake commented Apr 5, 2023

Concept ACK - will test

@RandyMcMillan
Copy link
Contributor

ACK ed4a833

@@ -57,6 +57,9 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
export CI_EXEC_CMD_PREFIX="docker exec ${CI_CONTAINER_ID}"
$CI_EXEC_CMD_PREFIX rsync --archive --stats --human-readable /ci_base_install/ "${BASE_ROOT_DIR}"
$CI_EXEC_CMD_PREFIX rsync --archive --stats --human-readable /ro_base/ "$BASE_ROOT_DIR"
# Fixes permission issues when there is a container UID/GID mismatch with the owner
# of the mounted bitcoin src dir.
$CI_EXEC_CMD_PREFIX git config --global --add safe.directory "*"
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it matters, but it could make sense to run this even when CI is run without the docker wrapper. Probably this doesn't affect anyone, but less conditional code seems a win by itself.

Copy link
Member

Choose a reason for hiding this comment

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

Had to do this here anyway: #27429

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

lgtm

@fanquake fanquake merged commit 5a8bd45 into bitcoin:master Apr 6, 2023
16 checks passed
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 6, 2023
ed4a833 ci: fix git dubious permissions error (josibake)

Pull request description:

  fixes bitcoin#27376 (comment)

  this appears to be caused by a more recent version of git being sensitive to mismatched permissions on directories. we didn't notice this before because we were using two separate user accounts to fix up dir permissions in the container , but the second account was removed in bitcoin#27376

  there might be a more elegant way to do this, but this does the trick and seems to be the way others are fixing this issue around the internets.

ACKs for top commit:
  RandyMcMillan:
    ACK ed4a833
  hebasto:
    re-ACK ed4a833

Tree-SHA512: dad467deca101a24f3ed34b3e26a1db5099a5bd5c3e9c9a22771c59848f7d7e7843c7386348e6fdf86d5a556e4706e5e20005d7a6637193e1c8aef7a5ff7fb19
@josibake josibake deleted the josibake-git-dubious-dir-permissions branch January 26, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants