Page MenuHomeSoftware Heritage

Include Sentry context tags even when capture_exceptions=False
ClosedPublic

Authored by vlorentz on Aug 8 2022, 3:41 PM.

Details

Summary

When capture_exceptions=False, the indexer's caller reports the exception
to Sentry itself.

However, because tags were added by indexers within a scope internal
to the indexers; the scope was closed before returning to the caller,
so these tags were actually not sent to Sentry.

Diff Detail

Repository
rDCIDX Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build was aborted

Patch application report for D8216 (id=29630)

Rebasing onto e29700bd96...

Current branch diff-target is up to date.
Changes applied before test
commit 5313be86b3fa1da858592591a2fd51406ce78cf6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Aug 8 15:40:55 2022 +0200

    Include Sentry context tags even when capture_exceptions=False
    
    When capture_exceptions=False, the indexer's caller reports the exception
    to Sentry itself.
    
    However, because tags were added by indexers within a scope internal
    to the indexers; the scope was closed before returning to the caller,
    so these tags were actually not sent to Sentry.

Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/411/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/411/console

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 8 2022, 3:52 PM
Harbormaster failed remote builds in B30696: Diff 29630!

Build is green

Patch application report for D8216 (id=29630)

Rebasing onto e29700bd96...

Current branch diff-target is up to date.
Changes applied before test
commit 5313be86b3fa1da858592591a2fd51406ce78cf6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Aug 8 15:40:55 2022 +0200

    Include Sentry context tags even when capture_exceptions=False
    
    When capture_exceptions=False, the indexer's caller reports the exception
    to Sentry itself.
    
    However, because tags were added by indexers within a scope internal
    to the indexers; the scope was closed before returning to the caller,
    so these tags were actually not sent to Sentry.

See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/412/ for more details.

anlambert added a subscriber: anlambert.

Looks good to me, too bad we cannot use sentry scopes due to this limitation.

This revision is now accepted and ready to land.Aug 8 2022, 4:55 PM