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 missing customApiRegistryPromise param for test connection #5944

Merged
merged 4 commits into from
Feb 27, 2024

Conversation

BionIT
Copy link
Collaborator

@BionIT BionIT commented Feb 24, 2024

Description

This change adds custom API registry to the test connection route

Issues Resolved

Fixes #5937

Screenshot

bug.mp4

Testing the changes

The following steps were followed:

enabled data source plugin
click test connection and should be successful

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

Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
Copy link

codecov bot commented Feb 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.01%. Comparing base (c1439d1) to head (535b8af).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5944      +/-   ##
==========================================
+ Coverage   67.00%   67.01%   +0.01%     
==========================================
  Files        3307     3310       +3     
  Lines       63614    63647      +33     
  Branches    10163    10165       +2     
==========================================
+ Hits        42626    42656      +30     
- Misses      18518    18522       +4     
+ Partials     2470     2469       -1     
Flag Coverage Δ
Linux_1 35.21% <ø> (ø)
Linux_2 55.09% <ø> (ø)
Linux_3 44.38% <ø> (+0.76%) ⬆️
Linux_4 35.20% <ø> (ø)
Windows_1 35.24% <ø> (ø)
Windows_2 55.06% <ø> (ø)
Windows_3 44.40% <ø> (+0.76%) ⬆️
Windows_4 35.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.

Signed-off-by: Lu Yu <nluyu@amazon.com>
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Lu Yu <nluyu@amazon.com>
@Flyingliuhub
Copy link
Member

@BionIT we probably need to add label for the backport 2.x 2.13, and may need to 2.12 as well

@@ -129,7 +129,8 @@ export class DataSourcePlugin implements Plugin<DataSourcePluginSetup, DataSourc
router,
dataSourceService,
cryptographyServiceSetup,
authRegistryPromise
authRegistryPromise,
customApiSchemaRegistryPromise
Copy link
Member

@Flyingliuhub Flyingliuhub Feb 27, 2024

Choose a reason for hiding this comment

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

Do we know how this went missing in the first place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to add more tests for MDS to capture things like this, and I have added the only test for the test connection router. Can we fix this issue first then add more tests?

@BionIT
Copy link
Collaborator Author

BionIT commented Feb 27, 2024

@BionIT we probably need to add label for the backport 2.x 2.13, and may need to 2.12 as well

custom API registry is new and not released in 2.12

@Flyingliuhub Flyingliuhub merged commit 6d5560e into opensearch-project:main Feb 27, 2024
76 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-5944-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6d5560e00c31748ddfbcd031241d67abaaf58c91
# Push it to GitHub
git push --set-upstream origin backport/backport-5944-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-5944-to-2.x.

BionIT added a commit to BionIT/OpenSearch-Dashboards that referenced this pull request Feb 27, 2024
…earch-project#5944)

* fix missing param and add changelog and test

Signed-off-by: Lu Yu <nluyu@amazon.com>

* change pr number

Signed-off-by: Lu Yu <nluyu@amazon.com>

* remove dangling changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
ZilongX pushed a commit that referenced this pull request Feb 27, 2024
…est connection (#5944) (#5971)

* Fix missing customApiRegistryPromise param for test connection (#5944)

* fix missing param and add changelog and test

Signed-off-by: Lu Yu <nluyu@amazon.com>

* change pr number

Signed-off-by: Lu Yu <nluyu@amazon.com>

* remove dangling changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>

* remove dangling changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Mar 4, 2024
…earch-project#5944)

* fix missing param and add changelog and test

Signed-off-by: Lu Yu <nluyu@amazon.com>

* change pr number

Signed-off-by: Lu Yu <nluyu@amazon.com>

* remove dangling changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
@manasvinibs
Copy link
Member

Manual Backport #5971

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] Test connection is broken for data source
4 participants