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

OutputEncoding: The Handle is Invalid #25

Closed
chaim1221 opened this issue May 12, 2018 · 4 comments
Closed

OutputEncoding: The Handle is Invalid #25

chaim1221 opened this issue May 12, 2018 · 4 comments
Assignees
Labels
Help Wanted Assistance is required to resolve this issue

Comments

@chaim1221
Copy link
Contributor

chaim1221 commented May 12, 2018

https://ci.appveyor.com/project/ChefWindowsCookbooks65871/visualstudio#L6

Not sure what this is. It looks bad on the build. Let's get rid of it.

@chaim1221 chaim1221 added the Help Wanted Assistance is required to resolve this issue label May 12, 2018
@linusruth
Copy link
Contributor

linusruth commented May 14, 2018

@chaim1221 I thought the same thing. It doesn't hurt anything, but it does look bad. The root issue is in the ChefDK installation script that OpsCode provides. There's currently an open issue for it in Chef's mixlib-install repo.

@linusruth
Copy link
Contributor

linusruth commented May 14, 2018

When I updated the visualstudio cookbook last week, I synchronized the build environment between all the repos in the windowschefcookbooks organization. The seven_zip cookbook had the most sophisticated AppVeyor build script, so I used it as a starting point. It leverages the official ChefDK installation script in order to download and install the latest version of the Chef on the AppVeyor build agent.

Because linting (RuboCop) and unit testing (ChefSpec) happen directly on the AppVeyor build agent, they run with the latest version of the Chef. However, integration tests (Test Kitchen) run inside a VM launched by the agent. For the integration tests, we use the version of Chef specified by 'require_chef_omnibus' in the Kitchen config. The version is hard coded to the current latest minor release (13.8.5) of the oldest version of Chef the cookbook supports (>=13.0), as specified in the metadata.

This means we can reasonably assume that the cookbook supports the latest version of Chef without actually running integration tests against it. Also, since we do run integration tests against the earliest version of Chef we claim to support, we can assume that it works with everything in between. It's not a perfect system, but it's more comprehensive than it was. Ideally we would run all all levels of testing against all versions we claim to support, but this gets us the most "bang for the buck."

@linusruth
Copy link
Contributor

Hi @chaim1221, I have reconsidered this issue and implemented a solution. I found information on the cause and various ways to address it in this blog post. If you'd like to review my PR that'd be great. Thanks.

@linusruth linusruth self-assigned this May 25, 2018
@linusruth
Copy link
Contributor

I've gone ahead and merged the fix. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Assistance is required to resolve this issue
Projects
None yet
Development

No branches or pull requests

2 participants