Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

update current session on session start after deleting previous session #362

Merged
merged 3 commits into from
Apr 17, 2020
Merged

update current session on session start after deleting previous session #362

merged 3 commits into from
Apr 17, 2020

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Apr 16, 2020

馃摙 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

馃摐 Description

update current session on session start after deleting the previous session.

馃挕 Motivation and Context

when starting a new session, if there's a leftover session, we end it and start a new one, even in this case, we should flush the new session to the current session file.

馃挌 How did you test it?

馃摑 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing

馃敭 Next steps

} else {
updateCurrentSession(currentSessionFile, envelope);

if (!currentSessionFile.delete()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

at this point the leftover session and its current session file already became a new envelope file to be sent, so deleting it as the new session will take place.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

馃憤

Co-Authored-By: Bruno Garcia <bruno@brunogarcia.com>
@codecov-io
Copy link

codecov-io commented Apr 17, 2020

Codecov Report

Merging #362 into master will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #362      +/-   ##
============================================
- Coverage     58.95%   58.89%   -0.07%     
+ Complexity      759      758       -1     
============================================
  Files            87       87              
  Lines          3538     3540       +2     
  Branches        340      341       +1     
============================================
- Hits           2086     2085       -1     
- Misses         1301     1302       +1     
- Partials        151      153       +2     
Impacted Files Coverage 螖 Complexity 螖
...c/main/java/io/sentry/core/cache/SessionCache.java 55.13% <0.00%> (-0.61%) 23.00 <0.00> (酶)
...c/main/java/io/sentry/core/DirectoryProcessor.java 67.34% <0.00%> (-2.05%) 7.00% <0.00%> (-1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 10690cd...035083f. Read the comment docs.

@marandaneto marandaneto merged commit c5b1b44 into getsentry:master Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants