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

[Enhancement] Use HTTP service instead of fetch for plugin check #9052

Merged

Conversation

RyanL1997
Copy link
Contributor

@RyanL1997 RyanL1997 commented Dec 13, 2024

Description

Use HTTP service instead of fetch for plugin check

Issues Resolved

Screenshot

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

Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.99%. Comparing base (c382d1a) to head (63f8378).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9052      +/-   ##
==========================================
+ Coverage   60.97%   60.99%   +0.02%     
==========================================
  Files        3812     3812              
  Lines       91358    91357       -1     
  Branches    14435    14435              
==========================================
+ Hits        55703    55725      +22     
+ Misses      32099    32078      -21     
+ Partials     3556     3554       -2     
Flag Coverage Δ
Linux_1 29.05% <0.00%> (+<0.01%) ⬆️
Linux_2 56.45% <ø> (ø)
Linux_3 38.00% <100.00%> (+0.03%) ⬆️
Linux_4 29.03% <0.00%> (+<0.01%) ⬆️
Windows_1 29.07% <0.00%> (+<0.01%) ⬆️
Windows_2 56.40% <ø> (ø)
Windows_3 38.00% <100.00%> (?)
Windows_4 29.03% <0.00%> (+<0.01%) ⬆️

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.

Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

@RyanL1997 RyanL1997 changed the title [WIP] Use HTTP service instead of fetch for plugin check Use HTTP service instead of fetch for plugin check Dec 17, 2024
@RyanL1997 RyanL1997 marked this pull request as ready for review December 17, 2024 18:06
opensearch-changeset-bot bot added a commit to RyanL1997/OpenSearch-Dashboards that referenced this pull request Dec 18, 2024
@RyanL1997 RyanL1997 force-pushed the mds-flint-plugin-check-fix branch from 1208f40 to 3b3c15e Compare January 7, 2025 20:33
ruanyl
ruanyl previously approved these changes Jan 8, 2025
SuZhou-Joe
SuZhou-Joe previously approved these changes Jan 8, 2025
@RyanL1997 RyanL1997 dismissed stale reviews from SuZhou-Joe and ruanyl via 5898602 January 8, 2025 04:48
@@ -26,6 +26,7 @@ const mockNotifications = {
toasts: {
addWarning: jest.fn(),
addSuccess: jest.fn(),
addDanger: jest.fn(),
Copy link
Member

Choose a reason for hiding this comment

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

Nit: there are common mocks from core, we can leverage that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion. For the latest test cases I just added, I switched to use coreMock instead. And for this one and the rest of the entire test suites of this plugin, lets open a separate PR as follow up.

SuZhou-Joe
SuZhou-Joe previously approved these changes Jan 8, 2025
@RyanL1997 RyanL1997 force-pushed the mds-flint-plugin-check-fix branch from 70c20b5 to 92ea4fb Compare January 9, 2025 00:31
opensearch-changeset-bot bot added a commit to RyanL1997/OpenSearch-Dashboards that referenced this pull request Jan 9, 2025
Signed-off-by: Jialiang Liang <[email protected]>
Signed-off-by: Jialiang Liang <[email protected]>
Signed-off-by: Jialiang Liang <[email protected]>
@RyanL1997 RyanL1997 force-pushed the mds-flint-plugin-check-fix branch from b361afe to 124a8e3 Compare January 9, 2025 00:38
@RyanL1997
Copy link
Contributor Author

* [ERR] [https://yarnpkg.com/lang/en/docs/workspaces/](https://yarnpkg.com/lang/en/docs/workspaces/) | Failed: Network error: error sending request for url (https://classic.yarnpkg.com/en/docs/workspaces/)

Error: Process completed with exit code 2.

The above link checker failure is not related to this change

Signed-off-by: Jialiang Liang <[email protected]>
@ruanyl ruanyl merged commit f7ecf99 into opensearch-project:main Jan 9, 2025
69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 9, 2025
* Use HTTP service instead of fetch

Signed-off-by: Jialiang Liang <[email protected]>

* resolve comments

Signed-off-by: Jialiang Liang <[email protected]>

* Add mock for addDanger()

Signed-off-by: Jialiang Liang <[email protected]>

* Add unit test for sql definition preview

Signed-off-by: Jialiang Liang <[email protected]>

* Fix the typo of class title O_o

Signed-off-by: Jialiang Liang <[email protected]>

* Fix the snapshot issue

Signed-off-by: Jialiang Liang <[email protected]>

---------

Signed-off-by: Jialiang Liang <[email protected]>
(cherry picked from commit f7ecf99)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Jan 9, 2025
…) (#9165)

* Use HTTP service instead of fetch



* resolve comments



* Add mock for addDanger()



* Add unit test for sql definition preview



* Fix the typo of class title O_o



* Fix the snapshot issue



---------


(cherry picked from commit f7ecf99)

Signed-off-by: Jialiang Liang <[email protected]>
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>
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 10, 2025
…nsearch-project#9052)

* Use HTTP service instead of fetch

Signed-off-by: Jialiang Liang <[email protected]>

* resolve comments

Signed-off-by: Jialiang Liang <[email protected]>

* Add mock for addDanger()

Signed-off-by: Jialiang Liang <[email protected]>

* Add unit test for sql definition preview

Signed-off-by: Jialiang Liang <[email protected]>

* Fix the typo of class title O_o

Signed-off-by: Jialiang Liang <[email protected]>

* Fix the snapshot issue

Signed-off-by: Jialiang Liang <[email protected]>

---------

Signed-off-by: Jialiang Liang <[email protected]>
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.

[BUG] SQL Query Workbench Plugin Status Check Failure in Direct Query Datasource
3 participants