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

[Bug] Fix ppl commands #8199

Merged
merged 4 commits into from
Sep 19, 2024
Merged

Conversation

sumukhswamy
Copy link
Contributor

Description

Piped functions in ppl were not running

Issues Resolved

https://app.asana.com/0/1208080319527398/1208216692717508/f

Screenshot

image

Testing the changes

Changelog

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Copy link
Contributor

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 8199.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

Copy link

codecov bot commented Sep 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.05%. Comparing base (cea39b8) to head (9389ba2).
Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8199   +/-   ##
=======================================
  Coverage   64.05%   64.05%           
=======================================
  Files        3741     3741           
  Lines       88635    88635           
  Branches    13804    13804           
=======================================
  Hits        56775    56775           
  Misses      31262    31262           
  Partials      598      598           
Flag Coverage Δ
Linux_1 30.07% <ø> (ø)
Linux_2 58.83% <ø> (ø)
Linux_3 40.37% <ø> (ø)
Linux_4 31.46% <ø> (ø)
Windows_1 30.08% <ø> (ø)
Windows_2 58.78% <ø> (ø)
Windows_3 40.37% <ø> (ø)
Windows_4 31.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ashwin-pc
ashwin-pc previously approved these changes Sep 17, 2024
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Sorry approved in haste

Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Why are we doing this? We should not be modifying the query on the client side. Why do we need to do this?

@ashwin-pc ashwin-pc dismissed their stale review September 17, 2024 02:58

Approved in haste

@sumukhswamy
Copy link
Contributor Author

The way the backend is handling the queries are such where the timestamp appears first and then the pipe with the other half of the query.

const timeFilter = this.getTimeFilter(dataset.timeFieldName);
return { ...query, query: query.query + timeFilter };
return { ...query, query: baseQuery + timeFilter + afterPipe };
Copy link
Member

Choose a reason for hiding this comment

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

would be good if this logic has tests, maybe later as this class doesn't have unit tests yet

Copy link
Member

Choose a reason for hiding this comment

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

+1

@sumukhswamy
Copy link
Contributor Author

Dont have permissions to merge this in

@ashwin-pc ashwin-pc merged commit 6ebc1e3 into opensearch-project:main Sep 19, 2024
66 of 67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 19, 2024
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
(cherry picked from commit 6ebc1e3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sejli pushed a commit that referenced this pull request Sep 20, 2024
(cherry picked from commit 6ebc1e3)

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 21, 2024
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
(cherry picked from commit 6ebc1e3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

5 participants