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 query assist after #7492, #7546, #7540 #7552

Merged
merged 10 commits into from
Jul 30, 2024

Conversation

joshuali925
Copy link
Member

@joshuali925 joshuali925 commented Jul 29, 2024

Description

Issues Resolved

Screenshot

Testing the changes

Changelog

  • skip

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

@github-actions github-actions bot added valued-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry labels Jul 29, 2024
@joshuali925 joshuali925 changed the title Fix query assist after #7546 Fix query assist after #7492 and #7546 Jul 29, 2024
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 63.64%. Comparing base (611f56b) to head (e37232a).
Report is 1 commits behind head on main.

Files Patch % Lines
.../ui/dataset_navigator/create_dataset_navigator.tsx 0.00% 1 Missing ⚠️
...ublic/query_assist/components/query_assist_bar.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7552   +/-   ##
=======================================
  Coverage   63.64%   63.64%           
=======================================
  Files        3629     3629           
  Lines       79520    79522    +2     
  Branches    12601    12604    +3     
=======================================
+ Hits        50611    50613    +2     
  Misses      25841    25841           
  Partials     3068     3068           
Flag Coverage Δ
Linux_1 30.76% <0.00%> (ø)
Linux_2 55.58% <ø> (ø)
Linux_3 40.23% <0.00%> (+<0.01%) ⬆️
Linux_4 31.57% <0.00%> (ø)
Windows_1 30.77% <0.00%> (ø)
Windows_2 55.53% <ø> (ø)
Windows_3 40.23% <0.00%> (-0.01%) ⬇️
Windows_4 31.57% <0.00%> (ø)

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.

@joshuali925
Copy link
Member Author

     │1)    dashboard app
     │       using legacy data
     │         bwc shared urls
     │           5.6 urls
     │             url with filters and query:
     │
     │      Error: expected '' to equal 'memory:>220000'
     │       at Assertion.assert (packages/osd-expect/expect.js:111:11)
     │       at Assertion.equal (packages/osd-expect/expect.js:238:8)
     │       at Context.<anonymous> (test/functional/apps/dashboard/bwc_shared_urls.js:101:26)
     │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
     │       at Object.apply (packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
     │ 

test failure doesn't seem related to this PR, same failure occurred in previous commit

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.

Looks good, just one minor change

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a style to the Query assist bar to add padding. You can add this to the EuiForm element

padding: $euiSizeXS;

Copy link
Member Author

Choose a reason for hiding this comment

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

updated. there will be a gap in between query assist bar and query editor which wasn't there in the original design

do we want to do anything for the callouts?
image

image

Copy link
Member

Choose a reason for hiding this comment

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

Good callout. @canascar @kgcreative what are your thoughts here?

Copy link
Member

Choose a reason for hiding this comment

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

The mock current has it like this:
Screenshot 2024-07-29 at 2 06 21 PM

Copy link
Member

Choose a reason for hiding this comment

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

The gap (padding) should probably be present above and below the success callout:
QA-successBanner

Copy link
Member Author

@joshuali925 joshuali925 Jul 29, 2024

Choose a reason for hiding this comment

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

updated.

image

in OUI padding for callout is the space from text to the border of the colored area. to add space outside i used margin

This reverts commit 1ec2941.

Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
This reverts commit dea9208.

Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
css padding in callouts is the space between text to border. the commit
adds space around through margin.

Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
@joshuali925 joshuali925 changed the title Fix query assist after #7492 and #7546 Fix query assist after #7492, #7546, #7540 Jul 29, 2024
kavilla
kavilla previously approved these changes Jul 30, 2024
@ananzh
Copy link
Member

ananzh commented Jul 30, 2024

ciGroup3 failed. re-run this test.

ashwin-pc
ashwin-pc previously approved these changes Jul 30, 2024
Signed-off-by: Joshua Li <joshuali925@gmail.com>
@joshuali925 joshuali925 dismissed stale reviews from ashwin-pc and kavilla via e37232a July 30, 2024 03:58
@kavilla kavilla merged commit d68c589 into opensearch-project:main Jul 30, 2024
66 of 67 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7552-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d68c589e4bd46a737beaf8e4bfdc83fc36eb7c35
# Push it to GitHub
git push --set-upstream origin backport/backport-7552-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-7552-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.16 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.16
# Create a new branch
git switch --create backport/backport-7552-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d68c589e4bd46a737beaf8e4bfdc83fc36eb7c35
# Push it to GitHub
git push --set-upstream origin backport/backport-7552-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.16

Then, create a pull request where the base branch is 2.16 and the compare/head branch is backport/backport-7552-to-2.16.

ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Jul 30, 2024
After the following PRs:  opensearch-project#7492, opensearch-project#7546, opensearch-project#7540

this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in
fix(query assist): update reading data source id from dataset manager opensearch-project#7464 (comment)

    revert dataset manager observable usage in query assist to support skip(1)
    revert dataset manager tests

[Discover Next] Fixes Discover styles opensearch-project#7546 removed query editor header div, this PR adds it back to enable query editor extensions

Signed-off-by: Joshua Li <joshuali925@gmail.com>
ananzh added a commit that referenced this pull request Jul 30, 2024
* [Discover 2.0] Updating fetch functions to include local cluster (#7542)

* Update datasources fetch function to include local cluster
* Check for duplicates when fetching external datasources (in the case local cluster is added as a datasource)
* Clean up types in DataSetNavigator so items are displayed properly


---------

Signed-off-by: Sean Li <lnse@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* [discover-next][bug] add max height to dataset navigator and use memoization (#7540)

* add max heigh. use memoization

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

almost working pretty nicely

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

a  little bit better

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

its ok

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* update mock

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* update another mock

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* fix mock for extension

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* rebase fixes

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* update script

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* fix initial load

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

---------

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>

* Fix query assist for query editor (#7552)

After the following PRs:  #7492, #7546, #7540

this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in
fix(query assist): update reading data source id from dataset manager #7464 (comment)

    revert dataset manager observable usage in query assist to support skip(1)
    revert dataset manager tests

[Discover Next] Fixes Discover styles #7546 removed query editor header div, this PR adds it back to enable query editor extensions

Signed-off-by: Joshua Li <joshuali925@gmail.com>

* [Discover next] Fixes dataset navigator menu styling & search error toast (#7566)

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* [Discover 2.0] Loading fix for databases (#7567)

* add back in useeffect for loading databases

Signed-off-by: Sean Li <lnse@amazon.com>

* Changeset file for PR #7567 created/updated

---------

Signed-off-by: Sean Li <lnse@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
Co-authored-by: Sean Li <lnse@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
Co-authored-by: Joshua Li <joshuali925@gmail.com>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
@joshuali925
Copy link
Member Author

backported through 2411e2f

Qxisylolo pushed a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Aug 1, 2024
After the following PRs:  opensearch-project#7492, opensearch-project#7546, opensearch-project#7540

this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in
fix(query assist): update reading data source id from dataset manager opensearch-project#7464 (comment)

    revert dataset manager observable usage in query assist to support skip(1)
    revert dataset manager tests

[Discover Next] Fixes Discover styles opensearch-project#7546 removed query editor header div, this PR adds it back to enable query editor extensions

Signed-off-by: Joshua Li <joshuali925@gmail.com>
@AMoo-Miki
Copy link
Collaborator

Backported with #7574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.16 Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v2.16.0 valued-contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants