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

Fix formatter when two profiles have the same name #1991

Merged
merged 2 commits into from
Jul 6, 2017

Conversation

adamleff
Copy link
Contributor

@adamleff adamleff commented Jul 5, 2017

In the event that an InSpec runner has two profiles that are named the same (such as when InSpec generates a profile for the Flat source reader, and Test Kitchen is running concurrently), InSpec could hand back a profile that does not contain the example. This leads to nil control data and ugly NilClass errors when TK runs concurrently.

This change modifies the method that finds the profile by control to not only match on profile name but also match on example ID.

Fixes #1598

In the event that an InSpec runner has two profiles that are named the same
(such as when InSpec generates a profile for the Flat source reader, and Test
Kitchen is running concurrently), InSpec could hand back a profile that does not
contain the example. This leads to nil control data and ugly NilClass errors
when TK runs concurrently.

This change modifies the method that finds the profile by control to not only
match on profile name but also match on example ID.

Signed-off-by: Adam Leff <adam@leff.co>
@adamleff adamleff added in progress Type: Bug Feature not working as expected labels Jul 5, 2017
Copy link
Contributor

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @adamleff for this mitigation

@adamleff adamleff merged commit 3916d7a into master Jul 6, 2017
@adamleff adamleff deleted the adamleff/fix-formatter-with-same-name-profiles branch July 27, 2017 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants