(BKR-914) Add workaround for beaker bug BKR-914#184
Merged
ferventcoder merged 1 commit intopuppetlabs:masterfrom Aug 17, 2016
glennsarti:ticket/master/MODULES-3256-fix-login
Merged
(BKR-914) Add workaround for beaker bug BKR-914#184ferventcoder merged 1 commit intopuppetlabs:masterfrom glennsarti:ticket/master/MODULES-3256-fix-login
ferventcoder merged 1 commit intopuppetlabs:masterfrom
glennsarti:ticket/master/MODULES-3256-fix-login
Conversation
The Windows 2012 R2 VMPooler templates were recently updated due to the older
version not populating environment variables correctly. However this exposed an
issue in Beaker (BKR-914) whereby it's `get_env_var` function was far too loose
in its pattern matching causing multiple lines to be returned for a single env
var. This then caused newline characters to be injected into the
`~/.ssh/environment` file, which then poluted calls to STDOUT and subsequently
any tests that depended on parsing STDOUT could potentially fail.
This commit adds workarounds to this issue until BKR-914 is fixed and published.
- The output from a `get_env_var` is sanitised and if required, additional regex
is injected to get the required effect from the `env | grep #{key}` call in
Beaker
- An existance check is added so that the CommonProgramFiles env var is only
added if it does not exist. This avoids modifying the environment
unncessarily.
This commit can be partially revertted once BKR-914 is resolved and published.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Windows 2012 R2 VMPooler templates were recently updated due to the older
cygwin version not populating environment variables correctly. However this exposed an
issue in Beaker (BKR-914) whereby it's
get_env_varfunction was far too loosein its pattern matching causing multiple lines to be returned for a single env
var. This then caused newline characters to be injected into the
~/.ssh/environmentfile, which then poluted calls to STDOUT and subsequentlyany tests that depended on parsing STDOUT could potentially fail.
This commit adds workarounds to this issue until BKR-914 is fixed and published.
get_env_varis sanitised and if required, additional regexis injected to get the required effect from the
env | grep #{key}call inBeaker
added if it does not exist. This avoids modifying the environment
unncessarily.
This commit can be partially revertted once BKR-914 is resolved and published.