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

New ElasticSearch Query Runner #5794

Merged
merged 4 commits into from
Jul 20, 2022
Merged

New ElasticSearch Query Runner #5794

merged 4 commits into from
Jul 20, 2022

Conversation

susodapop
Copy link
Contributor

@susodapop susodapop commented Jul 13, 2022

What type of PR is this?

  • New Query Runner (Data Source)
  • Other

Description

This PR incorporates the excellent work from #4391 with adjustments in #5701. I rebased from master and applied both patches to retain everyone's commit attributions.

These changes have been reviewed twice and approved but were never merged. Here's hoping the third time's the charm.

In addition to those commits, I have deprecated the original elasticsearch query runner. Existing connections will continue to exist.

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Unending thanks to @NicolasLM and @wwl717195673 for their unit and manual testing.

I also manually tested the deprecation:

  1. Create an elasticsearch data source
  2. Apply deprecated=True commit and reload UI3.
  3. DS from step 1 is still visible
  4. Create elasticsearch2 database
  5. Check contents of data_sources table

CleanShot 2022-07-19 at 21 49 51@2x

CleanShot 2022-07-19 at 21 50 05@2x

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Data source selection screen:

CleanShot 2022-07-19 at 21 50 24@2x

NicolasLM and others added 3 commits July 12, 2022 20:38
The new elasticsearch query runner is split into three:

- A runner supporting the newest versions of ES,
  aggregation, nested aggregations and nested fields.
- A runner for the SQL OpenDistro flavor
- A runner for the SQL X-Pack flavor

Fixes #4293
@susodapop susodapop mentioned this pull request Jul 13, 2022
1 task
@susodapop
Copy link
Contributor Author

@wwl717195673 Can you please give this a look to make sure my one change looks good? The only change was to remove the dedicated run_query method from XPackSQLElasticSearch since it was identical ElasticSearch2.

@wwl717195673
Copy link
Contributor

@wwl717195673 Can you please give this a look to make sure my one change looks good? The only change was to remove the dedicated run_query method from XPackSQLElasticSearch since it was identical ElasticSearch2.

That's good.Both run_query methods are totally same.You can remove it.

@susodapop
Copy link
Contributor Author

Thanks! I'm just fixing the logos rendering next and this will be good as gold 👌

@susodapop
Copy link
Contributor Author

Alright, I have fixed the logos and deprecated elasticsearch. @wwl717195673 can you give this a final look before I merge?

@wwl717195673
Copy link
Contributor

Alright, I have fixed the logos and deprecated elasticsearch. @wwl717195673 can you give this a final look before I merge?

I have reviewed the code.That's awesome!!!

@susodapop susodapop merged commit 4186f83 into master Jul 20, 2022
@susodapop susodapop deleted the new-es-runner branch July 20, 2022 12:47
@susodapop
Copy link
Contributor Author

Thank you everyone for your diligent efforts on this pull request. The new ES query runner has now merged to master 🚀

@JCWahoo
Copy link

JCWahoo commented Jul 21, 2022

How do I get the new query runner? I pulled latest and didnt see the UI changes

@susodapop
Copy link
Contributor Author

Which "latest" did you pull?

@JCWahoo
Copy link

JCWahoo commented Jul 21, 2022 via email

@susodapop
Copy link
Contributor Author

10.1 was released last year so it won't include changes merged since then 😉

If you want the latest preview build that includes this query runner you can use the preview image or you can wait for the V11 release later this summer.

Another way to solve would be to curl the latest query_runner onto your docker host, write your own dockerfile that copies this query runner over the old one (I don't recommend this).

@JCWahoo
Copy link

JCWahoo commented Jul 22, 2022 via email

blarghmatey pushed a commit to mitodl/redash that referenced this pull request Oct 27, 2022
- A runner supporting the newest versions of ES,
  aggregation, nested aggregations and nested fields.
- A runner for the SQL OpenDistro flavor
- A runner for the SQL X-Pack flavor

Co-authored-by: Nicolas Le Manchet <nicolas@lemanchet.fr>
Co-authored-by: wwl717195673 <717195673@qq.com>
AkaashK pushed a commit to tharzeez/redash that referenced this pull request Jul 18, 2023
- A runner supporting the newest versions of ES,
  aggregation, nested aggregations and nested fields.
- A runner for the SQL OpenDistro flavor
- A runner for the SQL X-Pack flavor

Co-authored-by: Nicolas Le Manchet <nicolas@lemanchet.fr>
Co-authored-by: wwl717195673 <717195673@qq.com>
harveyrendell pushed a commit to pushpay/redash that referenced this pull request Jan 8, 2025
- A runner supporting the newest versions of ES,
  aggregation, nested aggregations and nested fields.
- A runner for the SQL OpenDistro flavor
- A runner for the SQL X-Pack flavor

Co-authored-by: Nicolas Le Manchet <nicolas@lemanchet.fr>
Co-authored-by: wwl717195673 <717195673@qq.com>
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.

4 participants