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

Bump sourcegraph dependency to fix version parsing of insiders #959

Merged
merged 7 commits into from
Mar 16, 2023

Conversation

eseliger
Copy link
Member

For untagged versions, we added the current Sourcegraph version as well, so the parsing didn't work anymore. This fixes it.

Test plan

Verified the error no longer shows when targeting S2.

For untagged versions, we added the current Sourcegraph version as well, so the parsing didn't work anymore. This fixes it.
@eseliger eseliger requested a review from a team March 16, 2023 10:06
@@ -113,7 +113,7 @@ BUCKET
progress := out.Progress(progressBars, nil)
progress.WriteLine(output.Emoji(output.EmojiHourglass, "Starting uploads..."))
bucket := c.Bucket(*bucketName)
g := group.New().WithErrors().WithContext(ctx)
g := pool.New().WithErrors().WithContext(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shiny!

Copy link
Member Author

Choose a reason for hiding this comment

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

I had to, the lib/group package was deleted :lolsob: 😬

@eseliger
Copy link
Member Author

oh boi this is a big mess. conc requires go 1.19, but then golangci-lint fails because it doesn't understand 1.19 in that version, and when I upgrade it it starts complaining about new stuff - really annoying.

@eseliger
Copy link
Member Author

@BolajiOlajide @Piszmog could I get a quick re-review on this, I had to do a bunch of changes to get it to compile with conc as a dependency.

@@ -67,9 +67,11 @@ func (e *fastCommandTimeoutError) Error() string {

func (*fastCommandTimeoutError) Timeout() bool { return true }

type fastCommandTimeoutKey string
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this type?

Copy link
Member Author

Choose a reason for hiding this comment

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

golangci-lint reminded me that using a custom type the string is ensured to always be globally unique, if it's a plain string it might have clashes with other ctx keys - pretty interesting magic honestly

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh interesting.

@@ -185,6 +185,8 @@ func (svc *Service) uploadFile(ctx context.Context, workingDir, filePath, batchS
// Errors passed to pipeWriter.CloseWithError come through here.
return err
}
defer resp.Body.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

Yikes!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for catching.

Copy link
Member Author

Choose a reason for hiding this comment

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

golangci-lint did, I know nothing 😆

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, nice. I like.

@eseliger eseliger merged commit db398d0 into main Mar 16, 2023
@eseliger eseliger deleted the es/fix-insiders-version-parsing branch March 16, 2023 15:01
scjohns pushed a commit that referenced this pull request Apr 24, 2023
For untagged versions, we added the current Sourcegraph version as well, so the parsing didn't work anymore. This fixes it.
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