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

fix: router destinationsMap access #2582

Merged
merged 2 commits into from
Oct 18, 2022
Merged

Conversation

Sidddddarth
Copy link
Member

@Sidddddarth Sidddddarth commented Oct 18, 2022

Description

Accessing destination without checking for its existence first. Fixes that.

Notion Ticket

fix: router destination map access

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@Sidddddarth Sidddddarth changed the title fix.routerDestinationsMapAccess fix: router destinationsMap access Oct 18, 2022
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Base: 43.97% // Head: 43.95% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (fd0aeb3) compared to base (ab20ad6).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2582      +/-   ##
==========================================
- Coverage   43.97%   43.95%   -0.02%     
==========================================
  Files         187      187              
  Lines       39082    39082              
==========================================
- Hits        17185    17180       -5     
- Misses      20817    20823       +6     
+ Partials     1080     1079       -1     
Impacted Files Coverage Δ
router/router.go 67.59% <100.00%> (+0.83%) ⬆️
enterprise/reporting/setup.go 38.09% <0.00%> (-14.29%) ⬇️
processor/processor.go 71.23% <0.00%> (-0.83%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@atzoum
Copy link
Contributor

atzoum commented Oct 18, 2022

@Sidddddarth we may need to fail events for which no configuration can be found instead of aborting them. A test scenario for this would be desirable too.

@Sidddddarth Sidddddarth force-pushed the fix.routerDestinationsMapAccess branch from 02090f6 to fd0aeb3 Compare October 18, 2022 11:22
@Sidddddarth Sidddddarth marked this pull request as ready for review October 18, 2022 13:14
@Sidddddarth Sidddddarth merged commit 3770720 into master Oct 18, 2022
@Sidddddarth Sidddddarth deleted the fix.routerDestinationsMapAccess branch October 18, 2022 13:16
worker.rt.configSubscriberLock.RUnlock()
if !ok {
status := jobsdb.JobStatusT{
JobID: job.JobID,
AttemptNum: job.LastJobStatus.AttemptNum,
JobState: jobsdb.Aborted.State,
JobState: jobsdb.Failed.State,
Copy link
Contributor

@atzoum atzoum Oct 18, 2022

Choose a reason for hiding this comment

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

@Sidddddarth we need to update the status of the job in the barrier, since failed jobs are notified early, at this stage

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.

4 participants