hybrid_platforms_conductor 33.8.2 → 33.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef.rb +10 -8
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/diff_impacts_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 80a9228f00ac63d2ddf325f1fd4faeab83af8d7bbf73c43ff46d4632883462a4
|
|
4
|
+
data.tar.gz: 225b174fb0107a743e4daeda8a65148b8ce7d0ea81fb0862066a3626e60b7571
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc3c6a8c0a245a1929481f2e5482fdc3b9100dc24dab7a98bfbc026a294a8ef88b359060608cafb5c9937197ad89fc39630e3b56265888f5c913be9435960a3b
|
|
7
|
+
data.tar.gz: c82665286ed8c6783b02640e4122eb08d555c0d04fecbc49a688194caf828144f63f243824e28be8a120f41a331cd5194497b9ede07630d9347e8888383187b9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [v33.8.3](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.8.2...v33.8.3) (2021-08-16 14:18:52)
|
|
2
|
+
|
|
3
|
+
## Global changes
|
|
4
|
+
### Patches
|
|
5
|
+
|
|
6
|
+
* [[Fix(platform_handler_serverless_chef)] [#97] Fix git_diff_impacts when a library file is removed](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/da60609dbd395b9a78c5df8089b39255db1fed9f)
|
|
7
|
+
|
|
8
|
+
## Changes for platform_handler_serverless_chef
|
|
9
|
+
### Patches
|
|
10
|
+
|
|
11
|
+
* [[Fix(platform_handler_serverless_chef)] [#97] Fix git_diff_impacts when a library file is removed](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/da60609dbd395b9a78c5df8089b39255db1fed9f)
|
|
12
|
+
|
|
1
13
|
# [v33.8.2](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.8.1...v33.8.2) (2021-08-14 21:12:19)
|
|
2
14
|
|
|
3
15
|
## Global changes
|
|
@@ -428,14 +428,16 @@ module HybridPlatformsConductor
|
|
|
428
428
|
end
|
|
429
429
|
when %r{libraries/(.+)}
|
|
430
430
|
# Find any recipe using methods from this library
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
431
|
+
if File.exist?("#{@repository_path}/#{impacted_file}")
|
|
432
|
+
lib_methods_regexps = File.read("#{@repository_path}/#{impacted_file}").scan(/(\W|^)def\s+(\w+)(\W|$)/).map { |_grp_1, method_name, _grp_2| /(\W|^)#{Regexp.escape(method_name)}(\W|$)/ }
|
|
433
|
+
known_cookbook_paths.each do |cookbooks_path|
|
|
434
|
+
Dir.glob("#{@repository_path}/#{cookbooks_path}/**/recipes/*.rb") do |recipe_path|
|
|
435
|
+
file_content = File.read(recipe_path)
|
|
436
|
+
found_lib_regexp = lib_methods_regexps.find { |regexp| file_content =~ regexp }
|
|
437
|
+
unless found_lib_regexp.nil?
|
|
438
|
+
cookbook_name, recipe_name = recipe_path.match(%r{#{cookbooks_path}/(\w+)/recipes/(\w+)\.rb})[1..2]
|
|
439
|
+
register.call("included library helper #{found_lib_regexp.source[6..-7]}", recipe_name, cookbook_name: cookbook_name)
|
|
440
|
+
end
|
|
439
441
|
end
|
|
440
442
|
end
|
|
441
443
|
end
|
data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/diff_impacts_spec.rb
CHANGED
|
@@ -158,6 +158,16 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
|
|
|
158
158
|
end
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
+
it 'returns no impacted service due to a library helper being removed' do
|
|
162
|
+
with_serverless_chef_platforms('recipes') do |platform|
|
|
163
|
+
expect(platform.impacts_from('cookbooks/test_cookbook_2/libraries/removed.rb' => {})).to eq [
|
|
164
|
+
[],
|
|
165
|
+
[],
|
|
166
|
+
false
|
|
167
|
+
]
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
161
171
|
it 'ignored impacted service from an unknown helper' do
|
|
162
172
|
with_serverless_chef_platforms('recipes') do |platform, repository|
|
|
163
173
|
File.write("#{repository}/cookbooks/test_cookbook_1/recipes/default.rb", <<~EO_RECIPE)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hybrid_platforms_conductor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 33.8.
|
|
4
|
+
version: 33.8.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Muriel Salvan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-08-
|
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: range_operators
|