VED-1260 Mock PDS lambda rate limiting in ref env#1427
Open
amarauzoma wants to merge 31 commits intomasterfrom
Open
VED-1260 Mock PDS lambda rate limiting in ref env#1427amarauzoma wants to merge 31 commits intomasterfrom
amarauzoma wants to merge 31 commits intomasterfrom
Conversation
- Added a new Lambda function to simulate PDS responses for patient lookups. - Implemented rate limiting with configurable average and spike thresholds. - Updated existing MNS publisher to utilize the new PDS base URL environment variable. - Enhanced tests to cover scenarios with the mock PDS service, including rate limit handling. - Created performance testing scripts to validate MNS behavior under load with the mock PDS. - Updated infrastructure to route PDS calls in the ref environment to the mock endpoint.
- Streamlined the initialization of MockPdsService by consolidating parameters. - Replaced multiple response methods with a unified error handling approach. - Enhanced readability by reducing redundant code in the patient lookup logic. - Updated tests to utilize helper functions for event creation and decision mocking.
- Deleted the performance testing plan document for MNS integration with mocked PDS. - This document outlined objectives, delivery approaches, and existing architecture for implementing a mocked PDS service.
…mock-PDS-in-Ref Made-with: Cursor # Conflicts: # tests/perf_tests/Makefile
- Removed the global service retrieval function and directly initialized the MockPdsService with a Redis client and rate limiter. - Updated the lambda_handler to use the initialized service directly, improving performance and readability. - Adjusted unit tests to accommodate the new service initialization approach, ensuring proper mocking and error handling.
… tests - Updated sonar-project.properties to include coverage report for mock_pds. - Added new unit tests for Mock PDS service to improve test coverage and handle edge cases. - Introduced a new test file for rate limiting functionality in the Mock PDS service. - Updated the quality-checks workflow to run tests for the new mock_pds service.
- Introduced a new Mock PDS Lambda function to simulate PDS responses. - Created an ECR repository for the Mock PDS service with appropriate policies. - Updated deployment workflows to include mock_pds in build flags and image overrides. - Enhanced infrastructure configuration to support the new Mock PDS service, including image URI handling and environment variable setup.
Thomas-Boyle
previously approved these changes
Apr 22, 2026
Contributor
avshetty1980
left a comment
There was a problem hiding this comment.
Nice, just a few nits.
I like the average + spike rate limiting with Redis atomicity per window
… server for rate limit testing
…ved clarity and maintainability
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Uh oh!
There was an error while loading. Please reload this page.