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: adding support for dynamic mounting dir #292

Merged
merged 8 commits into from
Sep 19, 2023

Conversation

ChiefHolland
Copy link
Contributor

Contributor Comments

This PR fixes a bug in setting the top level directory for GIT_CONFIG_VALUE_0, which is used to mark a git directory as "safe."
The conditional to set this env was git rev-parse --show-toplevel > /dev/null || /iac.
When mounting a working dir that is different from /iac and encountering an error with git rev-parse, the base dir was incorrectly assigned "/iac." This caused logging git-related information to fail because git would detect "dubious ownership" of a directory not marked "safe."
The fix is to make the 'or' condition dynamic to the mounted volume path.

Pull Request Checklist

Thank you for submitting a contribution to our project!

In order to streamline the review of your contribution we ask that you review and comply with the below requirements:

  • Rebase your branch against the latest commit of the target branch.
  • If you are adding a dependency, please explain how it was chosen.
  • If manual testing is needed in order to validate the changes, provide a testing plan and the expected results.
  • If there is an issue associated with your Pull Request, link the issue to the PR.
  • Validate that documentation is accurate and aligned to any project updates or additions.

Don't forget our more detailed contribution guidelines
here.

@ChiefHolland ChiefHolland marked this pull request as ready for review September 15, 2023 18:32
@ChiefHolland ChiefHolland enabled auto-merge (squash) September 15, 2023 18:32
Copy link
Member

@JonZeolla JonZeolla left a comment

Choose a reason for hiding this comment

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

One minor var naming item. Also please update a test to exercise this feature and demonstrate how it used to fail and now passes with links to Passing and failing pipelines

build/functions.j2 Outdated Show resolved Hide resolved
@ChiefHolland ChiefHolland merged commit e7ad404 into main Sep 19, 2023
@ChiefHolland ChiefHolland deleted the chore/update-mount-dir branch September 19, 2023 19:58
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.

2 participants