-
Notifications
You must be signed in to change notification settings - Fork 6
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
Azure load tests #1665
base: main
Are you sure you want to change the base?
Azure load tests #1665
Conversation
… running in Azure Co-authored-by: somesylvie <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
THREAD_OBJECT_MAP.set(threadObjectMap); | ||
} | ||
|
||
public static void clearThreadRegistrations() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a more robust thread-local cleanup strategy. The current use of THREAD_OBJECT_MAP.remove() might lead to memory leaks if not all paths that add to the thread-local store also ensure to clear it after use. [important]
@@ -226,6 +227,12 @@ protected DomainResponse handleMessageRequest( | |||
boolean markMetadataAsFailed = false; | |||
String errorMessage = ""; | |||
|
|||
if ("True".equals(request.getHeaders().get("Load-Test")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor the conditional logic for registering the MockRSEndpointClient to ensure it's only applied under the correct conditions and does not interfere with production settings. [important]
@@ -118,6 +121,10 @@ def test_start(environment): | |||
|
|||
@events.quitting.add_listener | |||
def assert_stats(environment): | |||
if in_azure: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the environment-specific paths and configurations, such as file paths and environment variables, are documented and validated to prevent runtime errors in different environments. [medium]
PR Code Suggestions ✨Explore these optional code suggestions:
|
@@ -226,6 +227,12 @@ protected DomainResponse handleMessageRequest( | |||
boolean markMetadataAsFailed = false; | |||
String errorMessage = ""; | |||
|
|||
if ("True".equals(request.getHeaders().get("load-test")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to do something like Boolean.parseBoolean(request.getHeaders().get("load-test"))
? This handles casing and null safety
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that.
@@ -173,6 +174,12 @@ DomainResponse handleResults(DomainRequest request) { | |||
} | |||
|
|||
DomainResponse handleMetadata(DomainRequest request) { | |||
if (Boolean.parseBoolean(request.getHeaders().get("load-test")) | |||
&& ApplicationContext.isPropertyPresent("REPORT_STREAM_URL_PREFIX")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Application Context is set when we build the app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having a hard time understanding your question here. Can you rephrase it?
auth_token = f.read() | ||
|
||
# TODO - notes/clarification on 2 different creds, plus expiration date of jwt | ||
# TODO - do we want to TF the tests? If yes which envs? In CDC envs, may need to adjust IP allow list on app. Also set as private endpoints in test config? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good question. My assumption is that we don't want load test bombarding CDC environments unless they're okay with that. If they aren't, this could just be an internal running load test. However, I feel if we only run it in internal, it loses value since that would mean we're only running these until we pass the application off to the CDC.
@@ -226,6 +233,12 @@ protected DomainResponse handleMessageRequest( | |||
boolean markMetadataAsFailed = false; | |||
String errorMessage = ""; | |||
|
|||
if (Boolean.parseBoolean(request.getHeaders().get("load-test")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since any new places that call RS will also need to copy this code, we should document that (probably both in a comment here and the other location we evaluate this, plus in docs)
Co-Authored-By: Jeremy Rosenfeld <[email protected]> Co-Authored-By: halprin <[email protected]>
…intermediary into azure-load-tests
Quality Gate passedIssues Measures |
Description
Describe what changed in this PR at a high level.
Issue
#1122
Checklist
Note: You may remove items that are not applicable