Skip to content

Conversation

@hongtron
Copy link
Contributor

@hongtron hongtron commented Aug 21, 2020

Background

This commit seems to have introduced a bug: getsentry/raven-ruby@ad440b9

Processor::RemoveCircularReferences replaces elements of the event with the string (...), but Processor::Cookies#generate_masked_cookies assumes that its param implements #merge (String does not). Previously, Processor::Cookies was not run in Raven::Event#async_json_processors.

Unfortunately I wasn't able to get the test suite running locally (getting an error about requiring rails), so apologies if I've accidentally added a failing spec Fixed!

Impact

This exception (undefined method 'merge' for "(...)":String) would be rescued, but could cause a large number of events to be sent synchronously instead of asynchronously.

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2020

Codecov Report

Merging #996 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #996   +/-   ##
=======================================
  Coverage   97.77%   97.78%           
=======================================
  Files          46       46           
  Lines        2159     2163    +4     
=======================================
+ Hits         2111     2115    +4     
  Misses         48       48           
Impacted Files Coverage Δ
spec/raven/processors/cookies_spec.rb 100.00% <100.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 c290290...4af689b. Read the comment docs.

@st0012 st0012 assigned st0012 and unassigned st0012 Aug 21, 2020
@st0012 st0012 added the bug fix label Aug 21, 2020
@st0012 st0012 added this to the 3.0.3 milestone Aug 21, 2020
@st0012
Copy link
Collaborator

st0012 commented Aug 21, 2020

@hongtron wow that's a great catch! I will give it a thorough look tomorrow.
btw I just pushed a fix for the local testing issue. Can you rebase this against the latest master and try running tests locally again?

@hongtron hongtron force-pushed the fix-cookie-processor branch from 0e1661d to 4af689b Compare August 21, 2020 17:14
@hongtron
Copy link
Contributor Author

@st0012 confirmed that I can run specs locally now - I made sure I saw a correct spec failure when the app code change was backed out. I also updated the PR description with an "Impact" section. Appreciate the fast response!

Copy link
Collaborator

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

Nice fix, thanks 👍

@st0012 st0012 merged commit d8b86c8 into getsentry:master Aug 22, 2020
@hongtron hongtron deleted the fix-cookie-processor branch August 24, 2020 18:23
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.

3 participants