-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
* fix: add path to WorkingDir methods `WorkingDirLocker` and `WorkingDir` are closely related -- the former acquires a lock, which ensures that the latter can safely operate on a given file path. In runatlantis#2131 we added `path` to the `WorkingDirLocker` lock key, but neglected to add the same to `WorkingDir`. This commit adds `path` as an argument to certain `WorkingDir` methods, and includes `path` in the directory that we use to clone the repository for a given project. Since `path` can include certain special characters such as `/`, we encode `path` as base32 when using it as part of a file path. This should ensure no special characters are used in the filesystem, and that the value can be decoded if desired (unlike hashes such as md5). Additional changes: - All calls to changed methods have been updated, including unit tests - Mocks have been regenerated for `WorkingDir` and `WorkingDirLocker` - `working_dir_test.go` - Commands that operate on filesystem paths have been updated to include the base32 encoded `path` value - When running `git init`, we include `-b master` as additional arguments, to ensure that `master` is our default branch (expected by the unit tests) * Try fixing E2E tests * Fix DefaultPendingPlanFinder In addition to iterating over `workspaceDirs`, also iterate over `pathDirs`, and use both `workspace` and `path` to build `repoDir`. * Fix DefaultPendingPlanFinder unit tests * Fix DefaultProjectCommandBuilder unit tests Co-authored-by: Kevin Snyder <[email protected]> Co-authored-by: Kevin Snyder <[email protected]>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.