inspec/lib
Vasundhara Jagdale 8e8dc7631e
CHEF-3832: Fix for InSpec Parallel fails to fetch remote profiles due to cache contention. (#6546)
* CHEF-3832: Fix for InSpec Parallel fails to fetch remote profiles due to cache contention.
This fix creates the write exclusive lock on the cache directory of profile till write operation is finished for git fetcher

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Refactored to have locking and unlocking logic inside cache. Cache directory is not required for archived directories and this is currently only required by git fetcher

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* REFACTOR: adds method in fetcher to return true if requires cache locking mechanism to avoid cache contention

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Adds exception handling

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Handles interruption in cache creation process to avoid empty cache directory creation or currupted data

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Refactored to handle interruption through SystemExit

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Fixed the failing test. While creating lock cache_key need to be extracted from the respective fetcher.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2023-07-07 17:35:19 -04:00
..
bundles Test cases and documentation added 2021-11-29 19:12:30 +05:30
inspec CHEF-3832: Fix for InSpec Parallel fails to fetch remote profiles due to cache contention. (#6546) 2023-07-07 17:35:19 -04:00
matchers Add nftables resources (#6499) (#44) 2023-05-17 20:45:57 -04:00
plugins CHEF-3895: Prevent Stacktrace in STDOUT by handling Invalid License exception during license add (#77) 2023-07-06 23:23:43 -04:00
source_readers Add ability to export metadata and README 2022-05-13 00:31:32 +05:30
inspec.rb Licensing - Integrates Software Entitlement (#13) 2023-03-27 10:26:35 -04:00