Skip to content

Fix possible nil error on commit hash assign in case the contexts of event is nil #5648

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

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

khanhtc1202
Copy link
Member

What this PR does:

as title

Why we need it:

If the event's context is nil, the trailers value will be nil, and leads to nil assignment when we try to add value to TraceTriggerCommitHashKey

Which issue(s) this PR fixes:

Follow #5625

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Copy link
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

LGTM

@khanhtc1202 khanhtc1202 enabled auto-merge (squash) March 12, 2025 08:25
@khanhtc1202 khanhtc1202 merged commit ff9ac4a into master Mar 12, 2025
16 checks passed
@khanhtc1202 khanhtc1202 deleted the fix-nil-map-clone branch March 12, 2025 08:25
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 25.56%. Comparing base (bc1a61b) to head (9189946).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
pkg/app/piped/eventwatcher/eventwatcher.go 0.00% 5 Missing ⚠️
pkg/app/pipedv1/eventwatcher/eventwatcher.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5648      +/-   ##
==========================================
+ Coverage   25.54%   25.56%   +0.01%     
==========================================
  Files         477      477              
  Lines       50945    51078     +133     
==========================================
+ Hits        13016    13060      +44     
- Misses      36924    37013      +89     
  Partials     1005     1005              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot mentioned this pull request Mar 25, 2025
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.

3 participants