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: use local variable for workspaceId in stash backup #2706

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

BonapartePC
Copy link
Contributor

Description

Use a variable copy inside the goroutine

Notion Ticket

https://www.notion.so/rudderstacks/Fix-stash-backups-1-3-0-922b1b6a556a4379ba52f9c6c0bb14a1

Security

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

@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

❗ No coverage uploaded for pull request base (release/1.3.x@c831e6f). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff                @@
##             release/1.3.x    #2706   +/-   ##
================================================
  Coverage                 ?   45.45%           
================================================
  Files                    ?      287           
  Lines                    ?    47822           
  Branches                 ?        0           
================================================
  Hits                     ?    21736           
  Misses                   ?    24712           
  Partials                 ?     1374           

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.

@BonapartePC BonapartePC merged commit f0d3612 into release/1.3.x Nov 16, 2022
@@ -231,7 +231,7 @@ func (st *HandleT) storeErrorsToObjectStorage(jobs []*jobsdb.JobT) (errorJob []E
prefixes := []string{"rudder-proc-err-logs", time.Now().Format("01-02-2006")}
uploadOutput, err := errFileUploader.Upload(context.TODO(), outputFile, prefixes...)
errorJobs = append(errorJobs, ErrorJob{
jobs: jobsPerWorkspace[workspaceID],
jobs: jobsPerWorkspace[wrkId],
Copy link
Contributor

Choose a reason for hiding this comment

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

please rename wrkId to workspaceID so that shadowing can protect us everywhere.

for workspaceID, filePath := range dumps {
		workspaceID := workspaceID

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already merged this branch. Should I revert and make this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

we can do this change later in master branch.

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