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: add momento-local-test-config-middleware #1517

Merged
merged 8 commits into from
Jan 31, 2025

Conversation

rishtigupta
Copy link
Contributor

@rishtigupta rishtigupta commented Jan 29, 2025

PR Description:

  • Add Momento local test config middleware with "Experimental" label and unit tests for it
  • Add MomentoErrorCodeMetadataConverter class and refactor tests based off of it.
  • s/MomentoRpcMethodConverter/MomentoRPCMethodMetadataConverter, refactor tests
  • Make the TestRetryMetricsMiddleware and ExperimentalMomentoLocalTestConfigMiddleware convert the enum values to metadata that momento-local can accept.

Issue

https://github.com/orgs/momentohq/projects/68/views/2

@rishtigupta rishtigupta requested a review from anitarua January 29, 2025 22:39
@rishtigupta rishtigupta marked this pull request as ready for review January 29, 2025 22:39
@rishtigupta rishtigupta requested a review from malandis January 29, 2025 22:44
Copy link
Contributor

@anitarua anitarua left a comment

Choose a reason for hiding this comment

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

yeah, looking good!

I forget, but does new middleware need to be exported in one of the index.ts files too?

@malandis
Copy link
Contributor

I think this middleware and the various data structures here best belong in a separate package, eg momento-local-utils. That way we don't couple testing with Momento local to the production SDK; a user could install momento-local-utils as a dev dependency in their project for testing. Can discuss further offline!

@rishtigupta rishtigupta force-pushed the feat/momento-local-test-config-middleware branch from 833b157 to 65eca3a Compare January 30, 2025 18:50
@rishtigupta rishtigupta requested a review from anitarua January 30, 2025 18:53
Copy link
Contributor

@anitarua anitarua left a comment

Choose a reason for hiding this comment

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

looking good! had some questions

Copy link
Contributor

@malandis malandis left a comment

Choose a reason for hiding this comment

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

Looks much cleaner! Thanks. Just a couple questions/small nits

@rishtigupta rishtigupta merged commit f7c584d into main Jan 31, 2025
15 checks passed
@rishtigupta rishtigupta deleted the feat/momento-local-test-config-middleware branch January 31, 2025 22:41
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.

3 participants