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

OnCommand is ignored for when AcceptsCommands not set #189

Merged
merged 4 commits into from
Jul 12, 2023

Conversation

srikanthccv
Copy link
Member

Fixes #188

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Patch coverage: 87.14% and project coverage change: -0.88 ⚠️

Comparison is base (efddaa2) 76.11% compared to head (b1508fa) 75.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #189      +/-   ##
==========================================
- Coverage   76.11%   75.24%   -0.88%     
==========================================
  Files          24       24              
  Lines        1834     1874      +40     
==========================================
+ Hits         1396     1410      +14     
- Misses        326      345      +19     
- Partials      112      119       +7     
Impacted Files Coverage Δ
client/types/callbacks.go 66.66% <ø> (ø)
server/httpconnection.go 33.33% <0.00%> (ø)
client/internal/receivedprocessor.go 68.49% <70.00%> (-15.80%) ⬇️
client/internal/mockserver.go 82.35% <85.71%> (+0.31%) ⬆️
server/serverimpl.go 58.92% <94.73%> (+0.37%) ⬆️
client/httpclient.go 95.16% <100.00%> (+0.42%) ⬆️
client/internal/clientcommon.go 79.80% <100.00%> (ø)
client/internal/httpsender.go 72.22% <100.00%> (+1.25%) ⬆️
server/callbacks.go 68.18% <100.00%> (-4.55%) ⬇️
server/wsconnection.go 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@srikanthccv srikanthccv marked this pull request as ready for review July 11, 2023 17:45
@srikanthccv srikanthccv requested a review from a team July 11, 2023 17:45
r.rcvCommand(msg.Command)
// If a command message exists, other messages will be ignored
return
if r.hasCapability(protobufs.AgentCapabilities_AgentCapabilities_AcceptsRestartCommand) {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps it would be useful to add a comment that says when any new command capabilities are added they need to be checked here. I am not sure what's the best way to ensure we don't forget to do it, but a comment may help.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added note

@tigrannajaryan tigrannajaryan merged commit eb2f28d into open-telemetry:main Jul 12, 2023
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.

Command should be ignored when agent does not have AcceptsCommands capability
2 participants