-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[cmd/opampsupervisor] Only report applying if config is changed #39500
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
[cmd/opampsupervisor] Only report applying if config is changed #39500
Conversation
6ee5c52
to
6ad2c53
Compare
} else { | ||
} | ||
if configChanged { | ||
// only report applying if the config has changed and will run agent with new config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you please add a test to cover this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a unit test for this case
Moving to draft so you can address adding a test. Please mark ready for review once added. |
6ad2c53
to
3fe4466
Compare
41a260e
to
4e4ea74
Compare
4e4ea74
to
b005e20
Compare
…-telemetry#39500) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Right now, the Supervisor will always report to the OpAMP server an "Applying" status when it receives a remote config (assuming there's no issue building the merged config). This is a problem because if the new config is not different from the current config, the Supervisor never restarts the Collector with the new config and the status "Applied" is never reported to the server. This change makes it so the Supervisor only reports the "Applying" status to the OpAMP server if the new config is different from the current and we intend to apply and restart the Collector. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.-->
…-telemetry#39500) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Right now, the Supervisor will always report to the OpAMP server an "Applying" status when it receives a remote config (assuming there's no issue building the merged config). This is a problem because if the new config is not different from the current config, the Supervisor never restarts the Collector with the new config and the status "Applied" is never reported to the server. This change makes it so the Supervisor only reports the "Applying" status to the OpAMP server if the new config is different from the current and we intend to apply and restart the Collector. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.-->
Description
Right now, the Supervisor will always report to the OpAMP server an "Applying" status when it receives a remote config (assuming there's no issue building the merged config). This is a problem because if the new config is not different from the current config, the Supervisor never restarts the Collector with the new config and the status "Applied" is never reported to the server.
This change makes it so the Supervisor only reports the "Applying" status to the OpAMP server if the new config is different from the current and we intend to apply and restart the Collector.
Link to tracking issue
Fixes
Testing
Documentation