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 apply all with project name bug #565

Merged
merged 1 commit into from
Apr 2, 2019
Merged

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Apr 2, 2019

Previously, if you were using project names and you had two projects
with the same directory and workspace but different workflows, running
"atlantis apply" would fail. This was because we weren't figuring out
what the project name was for each pending plan.

This change fixes this by extracting the project name from the planfile.
We also handle /'s in the project name by substituting them with '::'.
This allows us to convert them back to /'s when we're figuring out the
project names from the filenames. It's safe to do this because : isn't
an allowed character for project names.

We also remove a final substitution of invalid filename characters
because we rely on the validation of the project names instead which
happens when validating the atlantis.yaml file.

Fixes #365

Previously, if you were using project names and you had two projects
with the same directory and workspace but different workflows, running
"atlantis apply" would fail. This was because we weren't figuring out
what the project name was for each pending plan.

This change fixes this by extracting the project name from the planfile.
We also handle /'s in the project name by substituting them with '::'.
This allows us to convert them back to /'s when we're figuring out the
project names from the filenames. It's safe to do this because : isn't
an allowed character for project names.

We also remove a final substitution of invalid filename characters
because we rely on the validation of the project names instead which
happens when validating the atlantis.yaml file.
@codecov
Copy link

codecov bot commented Apr 2, 2019

Codecov Report

Merging #565 into release-0.7 will decrease coverage by 0.02%.
The diff coverage is 72.72%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-0.7     #565      +/-   ##
===============================================
- Coverage         72.2%   72.17%   -0.03%     
===============================================
  Files               61       61              
  Lines             4587     4597      +10     
===============================================
+ Hits              3312     3318       +6     
- Misses            1033     1035       +2     
- Partials           242      244       +2
Impacted Files Coverage Δ
server/events/yaml/valid/repo_cfg.go 19.04% <0%> (ø) ⬆️
server/events/project_command_builder.go 82.17% <100%> (ø) ⬆️
server/events/pending_plan_finder.go 78.04% <71.42%> (-3.54%) ⬇️
server/events/runtime/runtime.go 78.94% <83.33%> (-4.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1ffb66...609bf84. Read the comment docs.

@lkysow lkysow merged commit d0724f8 into release-0.7 Apr 2, 2019
@lkysow lkysow deleted the fix-apply-all-proj branch April 2, 2019 18:56
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.

1 participant