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: data source permission client wrapper error of not returning explicitly the saved object client functions #8118

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

ruanyl
Copy link
Member

@ruanyl ruanyl commented Sep 10, 2024

Description

This PR fixed the issue:

log   [18:03:38.100] [error][http] TypeError: this.savedObjectsClient.get is not a function
    at UiSettingsClient.read (/usr/share/opensearch-dashboards/src/core/server/ui_settings/ui_settings_client.js:202:50)
    at UiSettingsClient.getUserProvided (/usr/share/opensearch-dashboards/src/core/server/ui_settings/ui_settings_client.js:94:53)
    at UiSettingsClient.getRaw (/usr/share/opensearch-dashboards/src/core/server/ui_settings/ui_settings_client.js:138:37)
    at UiSettingsClient.getAll (/usr/share/opensearch-dashboards/src/core/server/ui_settings/ui_settings_client.js:86:28)
    at UiSettingsClient.get (/usr/share/opensearch-dashboards/src/core/server/ui_settings/ui_settings_client.js:82:28)
    at /usr/share/opensearch-dashboards/src/core/server/core_app/core_app.js:57:63
    at /usr/share/opensearch-dashboards/src/core/utils/context.js:184:16
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Router.handle (/usr/share/opensearch-dashboards/src/core/server/http/router/router.js:174:44)
    at handler (/usr/share/opensearch-dashboards/src/core/server/http/router/router.js:140:50)
    at exports.Manager.execute (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/request.js:371:32)
    at Request._execute (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/request.js:281:9)
 error  [18:03:38.097]  Error: Internal Server Error
    at HapiResponseAdapter.toInternalError (/usr/share/opensearch-dashboards/src/core/server/http/router/response_adapter.js:69:19)
    at Router.handle (/usr/share/opensearch-dashboards/src/core/server/http/router/router.js:186:34)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at handler (/usr/share/opensearch-dashboards/src/core/server/http/router/router.js:140:50)
    at exports.Manager.execute (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/request.js:371:32)
    at Request._execute (/usr/share/opensearch-dashboards/node_modules/@hapi/hapi/lib/request.js:281:9)

Before the fix, open OSD shows error:
image

After the fix, OSD is opened properly:
image

Issues Resolved

Screenshot

Testing the changes

Changelog

  • fix: necessary functions are missing from data source permission saved object wrapper

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

explicitly the saved object client functions

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

@ruanyl ruanyl added the multiple datasource multiple datasource project label Sep 10, 2024
ZilongX
ZilongX previously approved these changes Sep 10, 2024
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 Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.84%. Comparing base (1d36fd3) to head (8d87d19).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8118   +/-   ##
=======================================
  Coverage   63.84%   63.84%           
=======================================
  Files        3738     3738           
  Lines       88704    88704           
  Branches    13795    13795           
=======================================
  Hits        56629    56629           
  Misses      31478    31478           
  Partials      597      597           
Flag Coverage Δ
Linux_1 29.96% <ø> (ø)
Linux_2 58.79% <ø> (ø)
Linux_3 40.26% <ø> (ø)
Linux_4 31.20% <ø> (ø)
Windows_1 29.97% <ø> (ø)
Windows_2 58.74% <ø> (ø)
Windows_3 40.26% <ø> (ø)
Windows_4 31.20% <ø> (ø)

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

@yujin-emma yujin-emma left a comment

Choose a reason for hiding this comment

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

LGTM

ruanyl added a commit to ruanyl/OpenSearch-Dashboards that referenced this pull request Sep 11, 2024
explicitly the saved object client functions

Signed-off-by: Yulong Ruan <[email protected]>

Changeset file for PR opensearch-project#8118 created/updated
ruanyl added a commit to ruanyl/OpenSearch-Dashboards that referenced this pull request Sep 11, 2024
explicitly the saved object client functions

Signed-off-by: Yulong Ruan <[email protected]>

Changeset file for PR opensearch-project#8118 created/updated
@ruanyl
Copy link
Member Author

ruanyl commented Sep 11, 2024

Checked the failed CI, it's unrelated to this PR, merging now.

@ruanyl ruanyl merged commit cc24bf6 into opensearch-project:main Sep 11, 2024
69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 11, 2024
…licitly the saved object client functions (#8118)

* fix: data source permission client wrapper error of not returning
explicitly the saved object client functions

Signed-off-by: Yulong Ruan <[email protected]>

* Changeset file for PR #8118 created/updated

---------

Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: ZilongX <[email protected]>
Co-authored-by: Xuesong Luo <[email protected]>
(cherry picked from commit cc24bf6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 11, 2024
…licitly the saved object client functions (#8118)

* fix: data source permission client wrapper error of not returning
explicitly the saved object client functions

Signed-off-by: Yulong Ruan <[email protected]>

* Changeset file for PR #8118 created/updated

---------

Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: ZilongX <[email protected]>
Co-authored-by: Xuesong Luo <[email protected]>
(cherry picked from commit cc24bf6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl added a commit that referenced this pull request Sep 11, 2024
)

explicitly the saved object client functions

Signed-off-by: Yulong Ruan <[email protected]>

Changeset file for PR #8118 created/updated
ruanyl added a commit that referenced this pull request Sep 11, 2024
)

explicitly the saved object client functions

Signed-off-by: Yulong Ruan <[email protected]>

Changeset file for PR #8118 created/updated
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.

7 participants