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

Lift state up one and generalize flow, render picker for auth tab #1835

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Mar 20, 2024

Description

Supports multi datasources for the "Authentication Tab". Lifts the state up to be managed/saved across Get Started and Authentication tabs.

Category

[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]

Why these changes are required?

What is the old behavior before changes and new behavior after changes?

Screen.Recording.2024-03-20.at.3.15.40.PM.mov

Issues Resolved

Fix: #1797, Fix: #1816

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 64 lines in your changes are missing coverage. Please review.

Project coverage is 67.91%. Comparing base (4ba9fcf) to head (75de5f1).

Files Patch % Lines
public/apps/configuration/app-router.tsx 8.88% 41 Missing ⚠️
public/apps/configuration/utils/request-utils.ts 55.55% 4 Missing ⚠️
...ublic/apps/configuration/utils/role-list-utils.tsx 0.00% 3 Missing ⚠️
...c/apps/configuration/utils/action-groups-utils.tsx 0.00% 2 Missing ⚠️
...ublic/apps/configuration/utils/auth-view-utils.tsx 0.00% 2 Missing ⚠️
...s/configuration/utils/internal-user-list-utils.tsx 0.00% 2 Missing ⚠️
public/apps/configuration/utils/tenant-utils.tsx 33.33% 2 Missing ⚠️
public/apps/account/utils.tsx 0.00% 1 Missing ⚠️
...c/apps/configuration/utils/audit-logging-utils.tsx 0.00% 1 Missing ⚠️
...configuration/utils/internal-user-detail-utils.tsx 0.00% 1 Missing ⚠️
... and 5 more
Additional details and impacted files
@@                             Coverage Diff                             @@
##           feature/supporting-multiple-datasources    #1835      +/-   ##
===========================================================================
+ Coverage                                    67.65%   67.91%   +0.25%     
===========================================================================
  Files                                           95       95              
  Lines                                         2427     2431       +4     
  Branches                                       330      330              
===========================================================================
+ Hits                                          1642     1651       +9     
+ Misses                                         707      702       -5     
  Partials                                        78       78              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@@ -748,19 +755,27 @@ export function defineRoutes(router: IRouter, dataSourceEnabled: boolean) {
{
path: `${API_PREFIX}/configuration/cache`,
validate: {
body: schema.object({
query: schema.object({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Change to query since GET doesn't support body

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Copy link
Contributor

@stephen-crawford stephen-crawford left a comment

Choose a reason for hiding this comment

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

One small thing but great job

.set(AUTHORIZATION_HEADER_NAME, ADMIN_CREDENTIALS);

// Getting auth info on a datasource that does not exist
expect(getAuthResponseWrongDataSource.status).not.toEqual(200);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This should probably be an assertion against the error code i.e. 500

@peternied peternied merged commit eae331a into opensearch-project:feature/supporting-multiple-datasources Mar 22, 2024
16 of 17 checks passed
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