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

Start sending Execution Mode in the Telemetry #1657

Merged
merged 4 commits into from
Oct 10, 2019

Conversation

vrdmr
Copy link
Member

@vrdmr vrdmr commented Oct 7, 2019

Description

Sending ExecutionMode field when sending telemetry events.


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.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines


This change is Reviewable

Comment on lines 282 to 293
copy_param = []

for param in event.parameters:
if param.name in sysinfo_names:
logger.verbose("Remove existing event parameter: [{0}:{1}]", param.name, param.value)
event.parameters.remove(param)
event.parameters.extend(self.sysinfo)
if param.name not in sysinfo_names:
logger.verbose("Adding existing event parameter: [{0}:{1}]", param.name, param.value)
copy_param.append(param)
else:
logger.verbose("Removing existing event parameter: [{0}:{1}]", param.name, param.value)

copy_param.extend(self.sysinfo)
event.parameters = copy_param

Copy link
Member Author

Choose a reason for hiding this comment

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

The earlier logic doesn't cleanly remove items from the list. When the fields to be removed come next to each other in the list, the list.remove would stip the second occurrence of the item to be removed.

@codecov
Copy link

codecov bot commented Oct 7, 2019

Codecov Report

Merging #1657 into develop will increase coverage by 0.21%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1657      +/-   ##
===========================================
+ Coverage    66.92%   67.14%   +0.21%     
===========================================
  Files           78       78              
  Lines        11263    11266       +3     
  Branches      1575     1575              
===========================================
+ Hits          7538     7564      +26     
+ Misses        3402     3379      -23     
  Partials       323      323
Impacted Files Coverage Δ
azurelinuxagent/common/version.py 69.17% <100%> (+0.21%) ⬆️
azurelinuxagent/ga/monitor.py 89% <100%> (+7.34%) ⬆️
azurelinuxagent/pa/provision/default.py 76.02% <0%> (+1.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a970c9...7597abf. Read the comment docs.

Copy link
Contributor

@larohra larohra left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@pgombar pgombar left a comment

Choose a reason for hiding this comment

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

Minor comments, else LGTM.

tests/ga/test_monitor.py Outdated Show resolved Hide resolved
tests/ga/test_monitor.py Outdated Show resolved Hide resolved
Copy link
Member

@narrieta narrieta left a comment

Choose a reason for hiding this comment

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

minor comments

azurelinuxagent/common/version.py Show resolved Hide resolved
azurelinuxagent/ga/monitor.py Outdated Show resolved Hide resolved
@vrdmr vrdmr merged commit 40e660f into Azure:develop Oct 10, 2019
@vrdmr vrdmr deleted the vameru/start-sending-execurion-mode branch October 12, 2019 17:34
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.

4 participants