-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: Add use plugin cache flag #3720
Conversation
feat: Add use plugin cache bool flag
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.
Can you add documentation to the site for this?
feat: Added use-plugin-cache to web doc
Head branch was pushed to by a user without write access
I've added the flag to the server-configuration section. |
you can add something on one of these sections:
https://github.com/runatlantis/atlantis/tree/main/runatlantis.io/docs
or you can add an explanation of why is needed with an example in the
server-configuration page where you added the flag.
…On Mon, Sep 4, 2023 at 12:21 AM wolmi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In runatlantis.io/docs/server-configuration.md
<#3720 (comment)>
:
> +### `--use-tf-plugin-cache`
+```bash
+atlantis server --use-tf-plugin-cache=false
+# or
+ATLANTIS_USE_TF_PLUGIN_CACHE=false
+```
+Set it to false if you want to disable terraform plugin cache
+
Ok, because is my first PR I was not sure how to add the documentation.
It's ok to add a new page? or do you think this can be added in an
existing page?
—
Reply to this email directly, view it on GitHub
<#3720 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERCDWYUQEEO2F6YEKVTXYV6RPANCNFSM6AAAAAA4FTBN3Q>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
I would also mention in the docs that this is a known Terraform issue, not an Atlantis one. Discussion here: hashicorp/terraform#31964 and possible PR to improve the situation here: hashicorp/terraform#33479. |
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.
LGTM when tests are green, thank you @X-Guardian for the review as well
@wolmi can you check the tests? |
Head branch was pushed to by a user without write access
I've changed the version to pass the test, is anything more need to merge this? |
thanks @wolmi for your contribution |
``` | ||
Set to false if you want to disable terraform plugin cache. | ||
|
||
This flag is useful when having multiple projects that need to run a plan and apply in the same PR to avoid the race condition of `plugin_cache_dir` concurrently, this is a terraform known issue, more info: |
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.
Is there any way this sentence could be made more clear?
Specifically, does disabling or enabling of this flag prevent the race condition that's noted in the corresponding bug report?
E.g - one has Atlantis with lots of parallel plans and applies. This flag is "useful" but how? Should it be set to false? If so, the wording should dictate that
* feat: Add use plugin cache bool flag * feat: Added use-plugin-cache doc * feat: refactor to reflect terrafrom in plugin cache flag Co-authored-by: Simon Heather <[email protected]> * fix: missing closing in bash block documentation * fix: typo in flag example * feat: improve docs * feat: performance implications documented * feat: increase terraform minor version to 1.3.10 --------- Co-authored-by: Simon Heather <[email protected]>
* feat: Add use plugin cache bool flag * feat: Added use-plugin-cache doc * feat: refactor to reflect terrafrom in plugin cache flag Co-authored-by: Simon Heather <[email protected]> * fix: missing closing in bash block documentation * fix: typo in flag example * feat: improve docs * feat: performance implications documented * feat: increase terraform minor version to 1.3.10 --------- Co-authored-by: Simon Heather <[email protected]>
what
Add flag to control the usage of plugin cache
why
By using atlantis for a long time we found a posible race condition where multiple projects in the same repository in different folders detects a change in a common module that is used by all the projects.
An example of folder structure is:
Any time a change is made to a module used by the 3 environments a plan needs to run but all the times one ore none of them can run the plan properly becouse the next error:
The package that changes id different on each run that means that seems to be a race condition.
tests
references
#3547
hashicorp/terraform#31964
hashicorp/terraform#33479