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 version metadata submitted twice #5325

Merged
merged 3 commits into from
Dec 24, 2019

Conversation

AlexandreYang
Copy link
Member

@AlexandreYang AlexandreYang commented Dec 24, 2019

What does this PR do?

Related: #4818, #5144, #5252

The issues:

  1. The version metadata might be submitted twice

  2. We log Cannot parse the complete Apache version from %s. instead of Cannot parse the complete Apache version from <VERSION>.

Fix version metadata submitted twice when retrying with ?auto. We should return, when calling self.check recursively (note: we should avoid making recursive call if possible, it's error prone).

This PR also includes:

  • Add test for no metrics case
  • Add fix logging format issue for self.log.info("Cannot parse the complete Apache version from %s.", value)

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@@ -34,6 +63,8 @@ def test_check(aggregator, check):

aggregator.assert_all_metrics_covered()

check._submit_metadata.assert_called_once()
Copy link
Member Author

Choose a reason for hiding this comment

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

Note for reviewers: before this fix check._submit_metadata was called twice.

@AlexandreYang AlexandreYang merged commit 40238ad into master Dec 24, 2019
@AlexandreYang AlexandreYang deleted the alex/fix_apache_version_collection branch December 24, 2019 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants