Skip to content

Fix mysql::sql task error message#1243

Merged
michaeltlombardi merged 1 commit intopuppetlabs:masterfrom
alexjfisher:fix_task_error_message
Oct 16, 2019
Merged

Fix mysql::sql task error message#1243
michaeltlombardi merged 1 commit intopuppetlabs:masterfrom
alexjfisher:fix_task_error_message

Conversation

@alexjfisher
Copy link
Copy Markdown
Collaborator

Because of misplaced " no interpolation of the error message was
actually taking place. After fixing this, the Lint/UselessAssignment
rubocop violation that had been disabled goes away too.

@alexjfisher alexjfisher requested a review from a team as a code owner October 14, 2019 17:19
@nicklewis nicklewis requested a review from eputnam October 14, 2019 17:20
alexjfisher referenced this pull request Oct 14, 2019
For whatever reason, rubocop cannot see that stderr is indeed a used variable.
@adreyer
Copy link
Copy Markdown

adreyer commented Oct 14, 2019

We also need to update the response to add a _error hash instead of or in addition to the error string so that error messages will be displayed correctly by task runners. Do you want to do that as part of this PR or should I put one up?

@alexjfisher alexjfisher force-pushed the fix_task_error_message branch from ed30a49 to 6229afc Compare October 15, 2019 13:23
Because of misplaced `"` no interpolation of the error message was
actually taking place.

Rubocop had been warning about this bug, but was deactivated in both
tasks (in different ways and by two different people)
@alexjfisher alexjfisher force-pushed the fix_task_error_message branch from 6229afc to 973c46e Compare October 15, 2019 13:24
@alexjfisher
Copy link
Copy Markdown
Collaborator Author

@adreyer Would you like to? I'm not too confident with bolt at the moment. Similar fix needed in puppetlabs/postgresql (and probably other modules) too.

@alexjfisher
Copy link
Copy Markdown
Collaborator Author

@nicklewis I've found a similar bug in the other task export.rb. Do you want to request a review from @hunner too? ;)

@michaeltlombardi
Copy link
Copy Markdown
Contributor

Thanks for the fix @alexjfisher!

@michaeltlombardi michaeltlombardi merged commit ab9292e into puppetlabs:master Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants