Skip to content

[Java][RestTemplate][WebClient] Templatized query params for metrics and evicts oom #9871

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

Merged
merged 13 commits into from
Jul 21, 2021
Merged

[Java][RestTemplate][WebClient] Templatized query params for metrics and evicts oom #9871

merged 13 commits into from
Jul 21, 2021

Conversation

jorgerod
Copy link
Contributor

@jorgerod jorgerod commented Jun 30, 2021

For both RestTemplate and WebClient java clients were not being query params

This causes uriTags to be created for each query parameter and could lead to an Out Of Memory.

This PR Resolves #7899 and extends the feature for RestTemplate.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master, 5.1.x, 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request. CC/ @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @nmuesch

@jorgerod jorgerod changed the title Fix/gh 7899 java client metrics [Java][RestTemplate][WebClient] Templatized query params for metrics and evicts oom Jun 30, 2021
@jorgerod jorgerod marked this pull request as ready for review June 30, 2021 15:49
@jorgerod
Copy link
Contributor Author

jorgerod commented Jul 1, 2021

Hi

I see the next error in continous-integration/appveyor/pr

  Stack Trace:
     at Org.OpenAPITools.Api.PetApi.UpdatePetWithFormWithHttpInfoAsync(Int64 petId, String name, String status, CancellationToken cancellationToken) in C:\projects\openapi-generator\samples\client\petstore\csharp-netcore\OpenAPIClient-httpclient\src\Org.OpenAPITools\Api\PetApi.cs:line 1680
   at Org.OpenAPITools.Api.PetApi.UpdatePetWithFormAsync(Int64 petId, String name, String status, CancellationToken cancellationToken) in C:\projects\openapi-generator\samples\client\petstore\csharp-netcore\OpenAPIClient-httpclient\src\Org.OpenAPITools\Api\PetApi.cs:line 1623
   at Org.OpenAPITools.Test.Api.PetApiTestsV2.UpdatePetWithFormAsync_GivenExistentId_UpdatesTheFields() in C:\projects\openapi-generator\samples\client\petstore\csharp-netcore\OpenAPIClient-httpclient\src\Org.OpenAPITools.Test\Api\PetApiTestsV2.cs:line 442

but i have not changed anything related with csharp-netcore.
Can you help me? @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @nmuesch @wing328

thank you

@jorgerod jorgerod requested a review from wing328 July 6, 2021 11:31
@jorgerod
Copy link
Contributor Author

jorgerod commented Jul 8, 2021

Hi @wing328

I don't understand why failed continuous-integration/appveyor/pr — AppVeyor build failed
Can you help me?

@wing328 wing328 modified the milestones: 5.2.0, 5.2.1 Jul 13, 2021
@wing328
Copy link
Member

wing328 commented Jul 21, 2021

Appveyor failure not related to this change.

@wing328 wing328 merged commit e568376 into OpenAPITools:master Jul 21, 2021
@jorgerod jorgerod deleted the fix/gh-7899-java-client-metrics branch July 21, 2021 09:12
@admoca60
Copy link

Thank you and congratulations @jorgerod !

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.

[BUG][Java][spring][webclient] webclient metrics contains actual query parameters, resulting in OOM
3 participants