This repository was archived by the owner on Sep 30, 2024. It is now read-only.
site-admin: Always order code host sync errors in status messages#48722
Merged
Conversation
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
eseliger
approved these changes
Mar 6, 2023
mrnugget
approved these changes
Mar 6, 2023
mrnugget
left a comment
Contributor
There was a problem hiding this comment.
All good, but
- Left one suggestion for nice refactor while we're here
- Dumb comments about saving newlines that I'm 51% serious about
|
|
||
| if err := rows.Err(); err != nil { | ||
| return nil, err | ||
| } |
Contributor
There was a problem hiding this comment.
@indradhanush here's something cool that makes up for the asdf troubles we can into: you can remove 30lines here by using the basestore.NewSliceScanner thing. Take a look at the Scan []horse section here: https://docs.sourcegraph.com/dev/background-information/basestore#using-basestore-helpers-for-scanning
sashaostrikov
approved these changes
Mar 6, 2023
sashaostrikov
left a comment
Contributor
There was a problem hiding this comment.
Looks
good
to
me
(except
new
lines
of
course)
mrnugget
approved these changes
Mar 6, 2023
| } | ||
|
|
||
| return messages, nil | ||
| return scanSyncErrors(rows, err) |
Contributor
There was a problem hiding this comment.
I'm 99% this works, saving you another 4 lines:
Suggested change
| return scanSyncErrors(rows, err) | |
| return scanSyncErrors(e.Query) |
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff ae9fd93...e19e718.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Buggy behaviour:
Ordering of sync errors will change on subsequent API requests
https://user-images.githubusercontent.com/2682729/223110004-e7baef93-930e-4e9c-8aa0-a47c4f925163.mp4
Updated behaviour
Ordering of sync errors remains constant on subsequent API requests
https://user-images.githubusercontent.com/2682729/223108826-5bd696e6-c102-4126-8a7a-f73f1f0d8381.mp4
Test plan