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

enabling default backend cache #264

Merged

Conversation

i5pranay93
Copy link
Contributor

@i5pranay93 i5pranay93 commented Dec 10, 2020

Signed-off-by: Pranay Singh i5singh.pranay@gmail.com

Description

kitchen-inspec the default for backend_cache is disabled so running test cases (against a windows 2016 instance) without cache enabled is taking more time than usual.

Adding backend_cache: true (enabled) will improve performance.

Issues Resolved

Check List

Signed-off-by: Pranay Singh <i5singh.pranay@gmail.com>
@clintoncwolfe
Copy link
Contributor

Hey, sorry this sat for so long without a review - the code change looks good, but there should be an update to the README.md as well, documenting the new setting. Once that's in and has been reviewed, this should be good to go!

Signed-off-by: Pranay Singh <i5singh.pranay@gmail.com>
README.md Outdated
@@ -282,6 +282,8 @@ When using Input plugins, please be aware that input values get cached between s
cache_inputs: false
```

Default for backend cache is enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

Please give an example of setting the value. Imagine you are a user, wishing to disable the backend cache. What is the exact name of the setting? Where in the configuration tree does the setting go? Thanks!

Signed-off-by: Pranay Singh <i5singh.pranay@gmail.com>
README.md Outdated
@@ -282,7 +282,12 @@ When using Input plugins, please be aware that input values get cached between s
cache_inputs: false
```

Default for backend cache is enabled
Backend cache is enabled by default,if you want to disable backend cache you can do:
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a section header to clarify this is different than the input cache.

### Chef InSpec Backend Cache

Chef InSpec uses a cache when executing commands and accessing files on the remote target. The cache is enabled by default. To disable the cache:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, thanks

Signed-off-by: Pranay Singh <i5singh.pranay@gmail.com>
@clintoncwolfe clintoncwolfe added Expeditor: Bump Version Minor Used by github.minor_bump_labels to bump the Minor version number. Type: Enhancement Adds new functionality. labels Jan 28, 2021
@clintoncwolfe clintoncwolfe merged commit 43b3434 into inspec:master Jan 28, 2021
@andrealai75
Copy link

andrealai75 commented Feb 17, 2021

II think caching the commands executions by default is not the right call and it is going to confuse people. This is the kind of change that someone would enable when looking to optimise the tests. Also all those that have been creating hundreds of projects without caching have now to review all of them making sure the test is still correct or change the kitchen.yaml

@myii
Copy link

myii commented Jul 17, 2021

Following on from #212 (comment), I do have a suggestion: the documentation should be improved to explain why you might need to disable the backend cache, such as the situation of retrying tests (while waiting for system services to start up), as explained in the linked comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expeditor: Bump Version Minor Used by github.minor_bump_labels to bump the Minor version number. Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants