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

feat(connection-form): support for multiple kms options from same provider COMPASS-8082 #6166

Merged
merged 34 commits into from
Sep 9, 2024

Conversation

mabaasit
Copy link
Contributor

@mabaasit mabaasit commented Aug 29, 2024

Preview image

Description

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@github-actions github-actions bot added the feat label Aug 29, 2024
Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Left two comments before diving into a bigger review, hopefully tomorrow 🙂

@mabaasit mabaasit marked this pull request as draft September 2, 2024 08:50
Comment on lines +175 to +181
if (isAction<CloseAction>(action, CreateNamespaceActionTypes.Close)) {
// When a modal is closed, we should not clear the connectionMetaData
return {
...INITIAL_STATE,
connectionMetaData: state.connectionMetaData,
};
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Drive-by: when opening modal to create a collection after closing it first time, the UI did not show encryption options, because we set connectionMetaData to initial state ({}).

@mabaasit mabaasit force-pushed the COMPASS-8082-multiple-kms-providers branch from b1e0b6b to 188bfaf Compare September 6, 2024 10:15
packages/connection-form/src/utils/csfle-handler.ts Outdated Show resolved Hide resolved
return Object.fromEntries(
Object.entries(obj).filter(([, value]) => Object.keys(value).length > 0)
) as Partial<T>;
);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This just removes the return type annotation and reduces type safety overall – any particular reason for 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.

this i reverted and added annotation back in 31d9e6f

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean the return type annotation is still missing but that's not a big deal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦🏽

packages/connection-info/src/connection-secrets.ts Outdated Show resolved Hide resolved
packages/connection-info/src/connection-secrets.ts Outdated Show resolved Hide resolved
@mabaasit mabaasit requested a review from addaleax September 9, 2024 08:08
@mabaasit mabaasit marked this pull request as ready for review September 9, 2024 08:09
@mabaasit mabaasit force-pushed the COMPASS-8082-multiple-kms-providers branch from b2fe096 to 328a7c1 Compare September 9, 2024 09:09
Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

🚀

noTLS={noTLS}
/>
</Card>
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just wanted to say, I tried this out locally and it all feels very smooth and intuitive! This is amazing work ✨

packages/connection-form/src/utils/csfle-handler.ts Outdated Show resolved Hide resolved
packages/connection-info/src/connection-secrets.ts Outdated Show resolved Hide resolved
packages/connection-info/src/connection-secrets.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Looks good, feel free to consider the remaining unresolved comments optional 👍

@mabaasit mabaasit merged commit aa7066c into main Sep 9, 2024
27 checks passed
@mabaasit mabaasit deleted the COMPASS-8082-multiple-kms-providers branch September 9, 2024 16:33
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.

2 participants