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 invalid elapsedMilliseconds value for empty search results #551

Merged
merged 2 commits into from Oct 28, 2018

Conversation

@lukeautry
Copy link
Contributor

commented Oct 28, 2018

This PR updates the CHANGELOG.md file to describe any user-facing changes.

Overview

See #405 for full bug description. Empty search results coming back with a value of 2077252342 for elapsedMilliseconds.

Fix

This wacky value is caused by returning structs (see: https://github.com/sourcegraph/sourcegraph/blob/master/cmd/frontend/graphqlbackend/search_results.go#L646) with a default Time value for start. When the date math gets done in ElapsedMilliseconds, it's basically calculating time elapsed since Epoch.

@slimsag
Copy link
Member

left a comment

Awesome, thanks @lukeautry ! Do you want to send a PR to remove this hack from our src search CLI, too? https://github.com/sourcegraph/src-cli/blob/master/cmd/src/search.go#L208-L213

@slimsag slimsag merged commit 49b38f2 into sourcegraph:master Oct 28, 2018

1 check passed

cla-bot Changes do not require CLA submission

@lukeautry lukeautry deleted the lukeautry:luke/return_start_val branch Oct 28, 2018

@lukeautry

This comment has been minimized.

Copy link
Contributor Author

commented Oct 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.