Skip to content

fix(rcm): remote config payloads error [backport 1.15] - #6100

Merged
avara1986 merged 4 commits into
1.15from
backport-6070-to-1.15
Jun 14, 2023
Merged

avara1986 merged 4 commits into
1.15from
backport-6070-to-1.15

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport b1000fd from #6070 to 1.15.

When Remote Configuration (RC) receives new configurations, the RC Client has two kinds of actions: removing target file configurations and loading new target file configurations.

The problem arises when we receive both kinds of actions simultaneously, as the load action overrides the remove action. This error occurs if someone creates and removes Dynamic Instrumentation Probes rapidly, within a time interval shorter than the Remote Config interval (5s).

To fix this issue, we append all new configurations and configurations to remove, and dispatch them at the end of the RC request.

Checklist

  • Change(s) are motivated and described in the PR description.
  • Testing strategy is described if automated tests are not included in the PR.
  • Risk is outlined (performance impact, potential for breakage, maintainability, etc).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Library release note guidelines are followed.
  • Documentation is included (in-code, generated user docs, public corp docs).

Reviewer Checklist

  • Title is accurate.
  • No unnecessary changes are introduced.
  • Description motivates each change.
  • Avoids breaking API changes unless absolutely necessary.
  • Testing strategy adequately addresses listed risk(s).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Release note makes sense to a user of the library.
  • Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.

When Remote Configuration (RC) receives new configurations, the RC
Client has two kinds of actions: removing target file configurations and
loading new target file configurations.

The problem arises when we receive both kinds of actions simultaneously,
as the load action overrides the remove action. This error occurs if
someone creates and removes Dynamic Instrumentation Probes rapidly,
within a time interval shorter than the Remote Config interval (5s).

To fix this issue, we append all new configurations and configurations
to remove, and dispatch them at the end of the RC request.

## Checklist
- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).

## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer has explicitly acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment.

(cherry picked from commit b1000fd)
@github-actions
github-actions Bot requested review from a team as code owners June 12, 2023 16:23
@github-actions github-actions Bot added the ASM Application Security Monitoring label Jun 12, 2023
@pr-commenter

pr-commenter Bot commented Jun 12, 2023 •

Copy link
Copy Markdown

Benchmarks

Comparing candidate commit 8d6c586 in PR branch backport-6070-to-1.15 with baseline commit e946c4c in branch 1.15.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 90 cases.

@avara1986
avara1986 enabled auto-merge (squash) June 14, 2023 06:49
@avara1986
avara1986 merged commit caf6dbe into 1.15 Jun 14, 2023
@avara1986
avara1986 deleted the backport-6070-to-1.15 branch June 14, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASM Application Security Monitoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants