-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
[BV-267] Make sure .gitconfig is always present #295
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request involves modifications to the project's configuration and file handling related to Git configuration. Changes span across multiple files including a GitHub Actions workflow, Dockerfile, and Python files in the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Pull Request Test Coverage Report for Build 12735913668Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
leverage/container.py (1)
485-485
: Consider mounting Git config as read-only.The Git config is mounted with read-write permissions by default. Consider adding
read_only=True
to the mount options for better security, unless write access is specifically required.- Mount(source=self.paths.host_git_config_file.as_posix(), target="/etc/gitconfig", type="bind"), + Mount(source=self.paths.host_git_config_file.as_posix(), target="/etc/gitconfig", type="bind", read_only=True),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/tests-integration.yaml
(1 hunks)Dockerfile
(0 hunks)leverage/container.py
(2 hunks)leverage/path.py
(1 hunks)
💤 Files with no reviewable changes (1)
- Dockerfile
🔇 Additional comments (3)
leverage/path.py (1)
200-203
: LGTM! Clean implementation of the Git config path property.The property method provides a clean way to access the Git config file path, consistent with Python's pathlib usage throughout the class.
leverage/container.py (1)
458-460
: LGTM! Ensures Git config file exists.The implementation correctly ensures the
.gitconfig
file exists before attempting to mount it..github/workflows/tests-integration.yaml (1)
64-64
: LGTM! Removed redundant Git config creation.Correctly removed the
.gitconfig
creation as it's now properly managed by the container setup. This also fixes the incorrect placement of the file in the.ssh
directory.
@@ -35,7 +35,7 @@ teardown(){ | |||
cp "$BUILD_SCRIPTS/simple_build.py" "$ACC_DIR/build.py" | |||
cd "$ACC_DIR" | |||
|
|||
run leverage -l | |||
run leverage run -l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the breaking changes introduced in #290
What?
Make sure there is always a .gitconfig file present in the home directory.
Why?
So git can work properly inside the container.
References
closes #267