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

Sandbox: More rigorous parsing for metrics reporters. #7060

Conversation

ghost
Copy link

@ghost ghost commented Aug 7, 2020

This avoids the issue where a previously-valid value such as "graphite:server:1234" fails with a cryptic error message: "hostname can't be null".

Fixes #6994.

Changelog

  • [Sandbox] Improved the error message when providing an invalid metric reporter as a command line argument. Now the error message always shows the correct syntax.

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

This avoids the issue where a previously-valid value such as
"graphite:server:1234" fails with a cryptic error message:
"hostname can't be null".

CHANGELOG_BEGIN
- [Sandbox] Improved the error message when providing an invalid metric
  reporter as a command line argument. Now the error message always
  shows the correct syntax.
CHANGELOG_END
@ghost ghost requested a review from jberthold-da August 7, 2020 10:37
@ghost
Copy link
Author

ghost commented Aug 7, 2020

BTW, I had to eyeball the error messages in the test logs to make sure they were legit. I didn't want to change too much in this PR, but I'd like to look into actually testing these error messages at some point.

Copy link
Contributor

@gerolf-da gerolf-da left a comment

Choose a reason for hiding this comment

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

Thanks. I didn't put more effort initially into making it nicer, because we all agreed that it wasn't a public parameter and therefore the usage of it should've been quite limited.

@ghost
Copy link
Author

ghost commented Aug 14, 2020

I think that was a smart move. I didn't know @jberthold-da and co. were using it. 🙂

@ghost ghost added the automerge label Aug 14, 2020
@mergify mergify bot merged commit ea28f2d into master Aug 14, 2020
@mergify mergify bot deleted the samir/ledger/sandbox-common/handle-errors-in-metrics-reporter-arguments branch August 14, 2020 09:29
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.

Change in --metrics-reporter in SDK 1.4.0 (snapshot 0729) causes confusing error message
2 participants