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

Don't disable SDK until the next cold start #1187

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented Aug 3, 2024

Goal

Don't stop the SDK when it is fully active even if the config service says to do so. Instead, just don't start it up next time.

This is to avoid any weird race conditions that can cause unpredictable behavior like partially recorded sessions or even crashes.

Copy link
Collaborator Author

bidetofevil commented Aug 3, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @bidetofevil and the rest of your teammates on Graphite Graphite

@bidetofevil bidetofevil marked this pull request as draft August 3, 2024 05:37
*/
@Config(sdk = [TIRAMISU])
@RunWith(AndroidJUnit4::class)
internal class ConfigServiceTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we should also have a test case that checks the SDK can start again after it's been stopped (i.e. that it's capable of fetching remote config even when disabled).

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.03%. Comparing base (8e9d89d) to head (f1ff1bd).
Report is 155 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1187      +/-   ##
==========================================
- Coverage   83.07%   83.03%   -0.05%     
==========================================
  Files         451      451              
  Lines       11246    11242       -4     
  Branches     1745     1744       -1     
==========================================
- Hits         9343     9335       -8     
- Misses       1134     1137       +3     
- Partials      769      770       +1     
Files Coverage Δ
.../java/io/embrace/android/embracesdk/EmbraceImpl.kt 76.74% <ø> (-0.18%) ⬇️
...embracesdk/internal/config/EmbraceConfigService.kt 90.07% <ø> (-0.23%) ⬇️

... and 2 files with indirect coverage changes

Base automatically changed from hho/envelope-payload-test to master August 6, 2024 16:03
Copy link
Contributor

github-actions bot commented Aug 6, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link
Collaborator Author

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

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

FYI, this will likely not be merged until we figure out the full scope of the Config Service changes to make changes applied pre-service startup and immutable after. If we decide to full do that, we may merge this as it gets us a step closer, but I won't touch this until then.

Copy link
Contributor

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this PR will be closed in 10 days.

@github-actions github-actions bot added stale and removed stale labels Aug 28, 2024
@bidetofevil bidetofevil force-pushed the hho/stop-hot-sdk-stop branch 6 times, most recently from 78ffd46 to 0f5c669 Compare September 16, 2024 03:46
Copy link
Contributor

github-actions bot commented Oct 7, 2024

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this PR will be closed in 10 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants