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

Support int type for eventPid and eventTid fields #2786

Merged
merged 2 commits into from Mar 14, 2023

Conversation

nagworld9
Copy link
Contributor

Description

Today we only support string value for eventPid and EventTid. As these fields are ids and ids are generally numeric in nature, so changing logic to support int values too.

Issue #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

@@ -58,6 +58,8 @@ class ExtensionEventSchema(object):
"EventTid":"2",
"OperationId":"Guid (str)"
}

From next version(2.10+) we accept integer values for EventPid and EventTid fields. But we still support string type for backward compatability
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assumed this go in next release and version would be 2.10

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #2786 (ac72426) into develop (b584057) will increase coverage by 0.00%.
The diff coverage is 87.50%.

@@           Coverage Diff            @@
##           develop    #2786   +/-   ##
========================================
  Coverage    71.99%   71.99%           
========================================
  Files          104      104           
  Lines        15851    15857    +6     
  Branches      2271     2273    +2     
========================================
+ Hits         11412    11417    +5     
  Misses        3915     3915           
- Partials       524      525    +1     
Impacted Files Coverage Δ
azurelinuxagent/ga/collect_telemetry_events.py 80.20% <87.50%> (+0.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


clean_string = lambda x: x.strip() if x is not None else x
def _clean_value(k, v):
if v is not None:
Copy link
Member

Choose a reason for hiding this comment

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

if v is None, _clean_value will return None and the conversion below will raise an exception

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, where? I kept it same as we have today so that downstream code will work like before.

Copy link
Member

Choose a reason for hiding this comment

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

never mind, you are converting the key, not the value

@nagworld9 nagworld9 merged commit 8ebaf41 into Azure:develop Mar 14, 2023
11 checks passed
@nagworld9 nagworld9 deleted the events-schema branch March 14, 2023 21:48
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.

None yet

3 participants