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

RUM-6104 ensure UploadWorker uses the sdk instance name #2257

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

xgouchet
Copy link
Collaborator

What does this PR do?

When the UploadWorker is woken by the system, it reads the SDK Instance name from the WorkRequest input data, and tries to get the instance with that name.

However, the instance name was never sent meaning that for applications specifying an instance name would never find a relevant SDK.

Motivation

Fixes #2252

@xgouchet xgouchet requested review from a team as code owners September 11, 2024 07:25
@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.97%. Comparing base (908b45a) to head (cefc19c).
Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2257      +/-   ##
===========================================
- Coverage    69.98%   69.97%   -0.01%     
===========================================
  Files          728      728              
  Lines        27063    27051      -12     
  Branches      4561     4560       -1     
===========================================
- Hits         18939    18927      -12     
- Misses        6841     6846       +5     
+ Partials      1283     1278       -5     
Files with missing lines Coverage Δ
...n/com/datadog/android/core/internal/DatadogCore.kt 81.90% <100.00%> (+0.08%) ⬆️
...ore/internal/lifecycle/ProcessLifecycleCallback.kt 90.00% <100.00%> (+1.11%) ⬆️
...og/android/core/internal/utils/WorkManagerUtils.kt 91.18% <100.00%> (+0.27%) ⬆️
.../android/error/internal/DatadogExceptionHandler.kt 87.84% <100.00%> (ø)

... and 33 files with indirect coverage changes

@@ -803,6 +805,20 @@ internal class DatadogCoreTest {
assertThat(testedCore.isDeveloperModeEnabled).isFalse()
}

@RepeatedTest(128)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be just @Test here? Is it needed to repeat it so many times?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're right, i used it locally :D

@ambushwork
Copy link
Contributor

Question: in the description of the PR it says before the fix, ".. meaning that for applications specifying an instance name would never find a relevant SDK." I wonder how UploadWorker can work correctly after a while of application running?

@xgouchet xgouchet force-pushed the xgouchet/RUM-6104/upload_worker_instance_name branch from 7bcbc27 to cefc19c Compare September 11, 2024 09:05
@xgouchet xgouchet merged commit 72adfba into develop Sep 11, 2024
23 checks passed
@xgouchet xgouchet deleted the xgouchet/RUM-6104/upload_worker_instance_name branch September 11, 2024 11:39
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.

How can i populate DATADOG_INSTANCE_NAME in UploadWorker.kt?
5 participants