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

query annotation and test fixes #1836

Merged
merged 3 commits into from
Sep 16, 2021
Merged

query annotation and test fixes #1836

merged 3 commits into from
Sep 16, 2021

Conversation

mason-fish
Copy link
Contributor

fixes #1835

The problem with the missing 0s we see in the indeterminate test is not the backend, it is the dateToNanoTs function. It's not entirely a problem so much as an inconsistency:

The current default behavior is to not include trailing 0s, which is an acceptable format for the timestamp as the backend parses it. In our tests, we use the date .toISOString() method to compare expected values, and that method always includes the full millisecond width, which revealed the formatting difference.

The fix I'm proposing here then is to ensure the decimal width returned by dateToNanoTs is at least the full ms, trailing zeros or not, while µs and ns widths may vary by trailing zeros.

Also proposed here is a temporary workaround for the query annotator, as discussed with @nwt: If a query looks like it begins with any sort of from then we will NOT annotate it at all and just pass it on as is to the request. This way we can expose the feature of querying from multiple pools while still supporting the existing/expected search behavior. Ultimately, we should discuss the "pool search" vs "lake search" (searching across multiple pools in a lake) workflows a bit more to come up with a better solution for this.

Signed-off-by: Mason Fish mason@brimsecurity.com

@mason-fish mason-fish requested a review from a team September 15, 2021 18:45
Signed-off-by: Mason Fish <mason@brimsecurity.com>
Signed-off-by: Mason Fish <mason@brimsecurity.com>
src/js/flows/search/mod.ts Outdated Show resolved Hide resolved
Co-authored-by: Noah Treuhaft <noah.treuhaft@gmail.com>
@mason-fish mason-fish merged commit 1ff0f67 into main Sep 16, 2021
@mason-fish mason-fish deleted the 1835-date-bug branch September 16, 2021 16:18
@philrz philrz linked an issue Sep 16, 2021 that may be closed by this pull request
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.

CI failure due to dropped trailing zero on timestamp Directly use Zed lake query endpoint
2 participants