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

RC:Add apply state and apply error #2973

Merged
merged 3 commits into from
Jul 21, 2023
Merged

RC:Add apply state and apply error #2973

merged 3 commits into from
Jul 21, 2023

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Jul 14, 2023

This PR adds the apply_state and apply_error fields to the configuration content payload we sent back to the agent.

This allows downstream systems to know if the configuration was correctly applied, and if not, why.

This is used to display to users that Remote Configuration was correctly applied, or if it was not, what was the reason.

@marcotc marcotc requested a review from a team July 14, 2023 23:46
@marcotc marcotc self-assigned this Jul 14, 2023
@github-actions github-actions bot added the core Involves Datadog core libraries label Jul 14, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2023

Codecov Report

Merging #2973 (f223139) into master (544615c) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2973      +/-   ##
==========================================
- Coverage   98.09%   98.08%   -0.01%     
==========================================
  Files        1301     1301              
  Lines       72574    72601      +27     
  Branches     3365     3365              
==========================================
+ Hits        71189    71212      +23     
- Misses       1385     1389       +4     
Impacted Files Coverage Δ
lib/datadog/core/remote/configuration/content.rb 100.00% <100.00%> (ø)
...ib/datadog/core/remote/configuration/repository.rb 99.35% <100.00%> (+<0.01%) ⬆️
.../datadog/core/remote/configuration/content_spec.rb 100.00% <100.00%> (ø)
...adog/core/remote/configuration/respository_spec.rb 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@marcotc marcotc added this to the 1.13.0 milestone Jul 20, 2023
Comment on lines +56 to +62
UNACKNOWLEDGED = 1

# Set when the configuration has been successfully applied.
ACKNOWLEDGED = 2

# Set when the configuration has been unsuccessfully applied.
ERROR = 3
Copy link
Member

Choose a reason for hiding this comment

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

Minor: I'm curious, do we need these integers in the protocol? Could they be symbols (:error, :unacknowledged, ...) instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

They are numbers, as part of the protocol. Backend expects these specific values.

@marcotc marcotc merged commit a39bd42 into master Jul 21, 2023
@marcotc marcotc deleted the apply-state branch July 21, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants