Navigation Menu

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

Add resource stubs so the resource loader will find all resources #4526

Merged
merged 3 commits into from Sep 27, 2019

Conversation

clintoncwolfe
Copy link
Contributor

@clintoncwolfe clintoncwolfe commented Sep 27, 2019

Description

#4365 introduced dynamic resource loading, which makes InSpec much faster, but it relies on there being a 1:1 relationship between resource files and resources, which is not quite true. Most notably, most service resources are combined in the service.rb file, which defines runit_service, systemd_service, etc. Because these individual files did not exist, the loader failed to find them, and #4521 happens.

This PR makes the simple approach of adding a stub file for each service that requires service.rb.

While in DRAFT, am currently looking for other resources that do the same thing.

Related Issue

Fixes #4521
There was manual testing done on this, before and after, using the control code listed on #4529 .

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

Copy link
Contributor

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

seems like a reasonable fix to me

@clintoncwolfe clintoncwolfe marked this pull request as ready for review September 27, 2019 19:11
Copy link
Contributor

@zenspider zenspider left a comment

Choose a reason for hiding this comment

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

yes yes yes

…e code file for services

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
@codeclimate
Copy link

codeclimate bot commented Sep 27, 2019

Code Climate has analyzed commit 9a2d360 and detected 0 issues on this pull request.

View more on Code Climate.

@zenspider zenspider merged commit d8e3975 into master Sep 27, 2019
@chef-expeditor chef-expeditor bot deleted the cw/fix-resource-loader-by-name branch September 27, 2019 23:32
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.

4.17.7 breaks all *_service resources
4 participants