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

Always use the default workspace directory when building commands context #13

Merged

Conversation

giuli007
Copy link
Collaborator

@giuli007 giuli007 commented Jun 7, 2021

This PR is the same as runatlantis#1620 (opened on the upstream project) but it is based on Yelp/atlantis master branch which is currently fixed at v0.17.0.
This way we can merge it and release it internally without pulling in all the unreleased changes that exist on the upstream master branch.

See the upstream PR for details. TLDR it fixes errors when using pre_workflow_hooks & non-default workspaces.

We need this fix if we want to re-enable parallelism now that we moved the generation of atlantis.yaml on the server-side.
NB this particuar PR does not fix the issues we had with parallelism (PEAUTO-1803) but without it we cannot currently re-enable parallelism unless we go back to store atlantis.yaml into the repository (reverting https://github.yelpcorp.com/misc/terraform-code/pull/2559)

…text

When pre_workflow_hooks is being used to generate atlantis.yaml
and projects are set with specific workspaces different than "default",
a different directory is created for each project-workspace pair,
but all those that are not on the "default" workspace will
not have an atlantis.yaml file at their root.

This change ensures that when atlantis is building the projects commands
for either:
- a project-specific plan, triggered via (atlantis plan -d foo -w bar)
- a project-specific apply, triggered vi (atlantis apply -d foo -w bar)
- or applies for all the plans it can find (atlantis apply)
it uses the default workspace to find the atlantis.yaml config.
@giuli007 giuli007 merged commit 31ebd50 into master Jun 8, 2021
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.

3 participants