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

Moving Query Workbench to Dev Tools #349

Merged
merged 10 commits into from
Jul 19, 2024

Conversation

TackAdam
Copy link
Contributor

Description

Screenshot 2024-07-11 at 5 26 49 PM

This change migrates query workbench to dev tools for the navigation changes planned for 2.16. The way the selectedMDSDataConnectionId was passed needed to be updated to allow dev tools to correctly find data sources.

Working with MDS:

Screen.Recording.2024-07-11.at.6.15.05.PM.mov

Working with Flint:
FlintTest.mov.zip

There is an existing issue I outlined in #348. But testing with Flint(using dashboards-observability prior to the opensearch-project/dashboards-observability@19d68b2 commit) seems to keep all functionality working correctly.

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Adam Tackett added 2 commits July 3, 2024 17:29
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
@sumukhswamy
Copy link
Collaborator

nit. could you rename all the dataSourceId to dataSourceMDSId, will be easier to distinguish

Signed-off-by: Adam Tackett <tackadam@amazon.com>
public/application.tsx Outdated Show resolved Hide resolved
Copy link
Member

@ps48 ps48 left a comment

Choose a reason for hiding this comment

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

  1. Can we please add the legacy UR support for workbench: https://github.com/opensearch-project/dashboards-observability/blob/7566cff5e9a245cc619732741e05886617134e8e/public/plugin.tsx#L187-L190

    So If user types https://playground.opensearch.org/app/opensearch-query-workbench they’ll be redirected to https://playground.opensearch.org/app/dev_tools#/opensearch-query-workbench

  2. Let's fix the linter errors here.
    Thanks!

Adam Tackett and others added 6 commits July 17, 2024 12:52
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
@@ -14,7 +13,7 @@ import { AppPluginStartDependencies } from './types';
export const renderApp = (
{ notifications, http, chrome, savedObjects }: CoreStart,
{ navigation, dataSource }: AppPluginStartDependencies,
{ appBasePath, element, setHeaderActionMenu }: AppMountParameters,
{ appBasePath, element, setHeaderActionMenu, dataSourceId }: AppMountParameters,
Copy link
Member

Choose a reason for hiding this comment

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

@TackAdam Did we test this with and without new nav? cc: @sumukhswamy

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! Sumukh for validating offline that workbench works with MDS with and without new nav.

@ps48 ps48 merged commit 7aba1fd into opensearch-project:main Jul 19, 2024
9 of 11 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/dashboards-query-workbench/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-query-workbench/backport-2.x
# Create a new branch
git switch --create backport/backport-349-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7aba1fd8b4ba174820ca09370012c3eeae3d67ec
# Push it to GitHub
git push --set-upstream origin backport/backport-349-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-query-workbench/backport-2.x

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

ps48 pushed a commit to ps48/dashboards-query-workbench that referenced this pull request Jul 19, 2024
* Migrate to devTools

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* MDS working changed how ID passed

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* Chagned name to dataSourceMDSId

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* remove console log

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* add support for backward URLs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update nav coditionally and set breadcrumbs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* fix lint error

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update breadcrumb only when nav is enabled

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* fix URL for new nav is disabled

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Co-authored-by: Adam Tackett <tackadam@amazon.com>
Co-authored-by: Shenoy Pratik <sgguruda@amazon.com>
(cherry picked from commit 7aba1fd)
ps48 added a commit that referenced this pull request Jul 19, 2024
* Migrate to devTools

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* MDS working changed how ID passed

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* Chagned name to dataSourceMDSId

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* remove console log

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* add support for backward URLs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update nav coditionally and set breadcrumbs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* fix lint error

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update breadcrumb only when nav is enabled

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* fix URL for new nav is disabled

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Co-authored-by: Adam Tackett <tackadam@amazon.com>
Co-authored-by: Shenoy Pratik <sgguruda@amazon.com>
(cherry picked from commit 7aba1fd)

Co-authored-by: Adam Tackett <105462877+TackAdam@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.

None yet

5 participants