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

[MD]Fix schema for test connection to separate validation based on auth type #5997

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

BionIT
Copy link
Collaborator

@BionIT BionIT commented Mar 1, 2024

Description

This change refactors the schema validation for test connection API to separate the validation based on auth type. Tests were added for no auth, sigv4 and basic auth.

Issues Resolved

Fixes #5987

Screenshot

fixschema.mp4

Testing the changes

The following steps were performed:

  1. enable data source plugin
  2. before the change, test connection would fail for no auth at the time of creation
  3. before the change, test connection would succeed for no auth after creation
  4. after the fix, test connection is successful for no auth at the time of creation and after creation
  5. after the fix, test connection is successful for basic auth at the time of creation and after creation
  6. after the fix, test connection is successful for sigv4 auth at the time of creation and after creation

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>
bandinib-amzn
bandinib-amzn previously approved these changes Mar 1, 2024
@bandinib-amzn bandinib-amzn added Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry backport 2.x multiple datasource multiple datasource project v2.13.0 and removed Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry labels Mar 1, 2024
@bandinib-amzn
Copy link
Member

First I thought we can skip ChangeLog. But it is bug fix, so we should add in ChangeLog, right? @BionIT What do you think?

@BionIT BionIT changed the title Fix schema for test connection to separate validation based on auth type [MD]Fix schema for test connection to separate validation based on auth type Mar 1, 2024
Signed-off-by: Lu Yu <nluyu@amazon.com>
@BionIT
Copy link
Collaborator Author

BionIT commented Mar 1, 2024

First I thought we can skip ChangeLog. But it is bug fix, so we should add in ChangeLog, right? @BionIT What do you think?

Yeah, I added changelog to unreleased section in a new commit. Thanks @bandinib-amzn!

@BionIT BionIT merged commit 0c394bd into opensearch-project:main Mar 1, 2024
14 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 2, 2024
…th type (#5997)

* fix schema for test connection

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

* add changelog

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

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit 0c394bd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Mar 2, 2024
…th type (opensearch-project#5997)

* fix schema for test connection

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

* add changelog

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

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
Flyingliuhub pushed a commit that referenced this pull request Mar 3, 2024
…th type (#5997) (#6001)

* fix schema for test connection

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

* add changelog

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

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit 0c394bd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Mar 4, 2024
…th type (opensearch-project#5997)

* fix schema for test connection

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

* add changelog

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

---------

Signed-off-by: Lu Yu <nluyu@amazon.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.

[BUG] Creating no auth data connection fails validaiton
3 participants