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

Limit memory usage when capturing SOAP request bodies #2274

Merged

Conversation

gregkalapos
Copy link
Contributor

Limit memory usage by creating an ArrayPool with limited MaxArrayLength and skipping capturing SOAP bodies larger than that.

Limit memory usage by creating an ArrayPool with limited MaxArrayLength and skipping capturing SOAP bodies larger than that.
@gregkalapos gregkalapos self-assigned this Feb 1, 2024
@gregkalapos
Copy link
Contributor Author

I see testcontainer setup issues, seems unrelated:

2m 6s
Run atomicjar/testcontainers-cloud-setup-action@v1
Run # download and run the agent at the background
Downloading https://app.testcontainers.cloud/download/testcontainers-cloud-agent_latest_windows_x86-64.exe
2024-02-01T19:28:47.858Z --- INF Testcontainers Cloud Agent arch=amd64 os="Windows Server 2022 Datacenter 10.0 (6.3)" version=1.7.0.4660+eac8767
2024-02-01T19:28:47.927Z --- INF Initializing config cloud="C:\\Users\\runneradmin\\.config\\testcontainers\\cloud.properties" dir="C:\\Users\\runneradmin\\.config\\testcontainers" tc="C:\\Users\\runneradmin\\.testcontainers.properties"
2024-02-01T19:28:47.928Z --- WRN Failed to parse TC_CLOUD_TOKEN as token
2024-02-01T19:28:47.929Z --- INF Creating new state file location="C:\\Users\\runneradmin\\AppData\\Local\\AtomicJar\\testcontainers.cloud.desktop\\state.json"
2024-02-01T19:28:47.930Z --- INF Assigning new installation ID iid=iid_10ac83f2-34d2-44d8-9f0e-8c2810d7b7aa
ERROR: incorrect token
Run # waiting for agent successful connection
2024-02-01T19:28:48.008Z --- INF Testcontainers Cloud Agent arch=amd64 os="Windows Server 2022 Datacenter 10.0 (6.3)" version=1.7.0.4660+eac8767
2024-02-01T19:28:48.028Z --- INF Initializing config cloud="C:\\Users\\runneradmin\\.config\\testcontainers\\cloud.properties" dir="C:\\Users\\runneradmin\\.config\\testcontainers" tc="C:\\Users\\runneradmin\\.testcontainers.properties"
2024-02-01T19:28:48.028Z --- INF Waiting up to 120 seconds for the agent to start...
2024-02-01T19:30:48.041Z --- FTL Timed out waiting for agent to be running addr=unknown
Error: Process completed with exit code 1.

@gregkalapos gregkalapos marked this pull request as ready for review February 1, 2024 19:39
@Mpdreamz
Copy link
Member

Mpdreamz commented Feb 2, 2024

I see testcontainer setup issues, seems unrelated:

2m 6s
Run atomicjar/testcontainers-cloud-setup-action@v1
Run # download and run the agent at the background
Downloading https://app.testcontainers.cloud/download/testcontainers-cloud-agent_latest_windows_x86-64.exe
2024-02-01T19:28:47.858Z --- INF Testcontainers Cloud Agent arch=amd64 os="Windows Server 2022 Datacenter 10.0 (6.3)" version=1.7.0.4660+eac8767
2024-02-01T19:28:47.927Z --- INF Initializing config cloud="C:\\Users\\runneradmin\\.config\\testcontainers\\cloud.properties" dir="C:\\Users\\runneradmin\\.config\\testcontainers" tc="C:\\Users\\runneradmin\\.testcontainers.properties"
2024-02-01T19:28:47.928Z --- WRN Failed to parse TC_CLOUD_TOKEN as token
2024-02-01T19:28:47.929Z --- INF Creating new state file location="C:\\Users\\runneradmin\\AppData\\Local\\AtomicJar\\testcontainers.cloud.desktop\\state.json"
2024-02-01T19:28:47.930Z --- INF Assigning new installation ID iid=iid_10ac83f2-34d2-44d8-9f0e-8c2810d7b7aa
ERROR: incorrect token
Run # waiting for agent successful connection
2024-02-01T19:28:48.008Z --- INF Testcontainers Cloud Agent arch=amd64 os="Windows Server 2022 Datacenter 10.0 (6.3)" version=1.7.0.4660+eac8767
2024-02-01T19:28:48.028Z --- INF Initializing config cloud="C:\\Users\\runneradmin\\.config\\testcontainers\\cloud.properties" dir="C:\\Users\\runneradmin\\.config\\testcontainers" tc="C:\\Users\\runneradmin\\.testcontainers.properties"
2024-02-01T19:28:48.028Z --- INF Waiting up to 120 seconds for the agent to start...
2024-02-01T19:30:48.041Z --- FTL Timed out waiting for agent to be running addr=unknown
Error: Process completed with exit code 1.

Yeah this is due to forks not having access to secrets, rightfully so.

#2273 addresses this.

#2275 is the continuation of that to ignore certain tests if run on from a pr from a fork that needs TestContainers

Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

@gregkalapos gregkalapos requested a review from Mpdreamz February 5, 2024 10:12
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

Lgtm!

@gregkalapos gregkalapos merged commit 88d3b05 into elastic:main Feb 5, 2024
14 checks passed
@gregkalapos gregkalapos deleted the SoapRequestBodyCapturingLimitMemUsage branch February 5, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants