Skip to content

Http Client made consistent with Default Proxy Configurations #4957

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
Feb 29, 2024

Conversation

joviegas
Copy link
Contributor

@joviegas joviegas commented Feb 22, 2024

Motivation and Context

#4745

  • When no Proxy Configuration is given to V1 and Apache Client of V2 the Environment variables and System variables are resolved by default.
  • The Other Http clients like Url , Netty and Crt client

Modifications

Testing

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@joviegas joviegas requested a review from a team as a code owner February 22, 2024 01:44
@joviegas joviegas force-pushed the joviegas/proxy_config_consistent branch from a6e96b3 to 568de43 Compare February 22, 2024 05:49
@joviegas joviegas force-pushed the joviegas/proxy_config_consistent branch from 568de43 to 296dbc1 Compare February 22, 2024 05:52
@joviegas joviegas force-pushed the joviegas/proxy_config_consistent branch from df13605 to 4d2e472 Compare February 22, 2024 17:29
}

public static Stream<Arguments> proxyConfigurationSettingWithConnectionFails() {
return Stream.of(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we create a TestCase class to contain the arguments? It's hard just looking at these nested lists what they're meant to be.

Also can we reconsider renaming this method? It's not really clear what these configs are. These are "incorrect" proxy configs right?

import software.amazon.awssdk.testutils.EnvironmentVariableHelper;
import software.amazon.awssdk.utils.Pair;

public abstract class HttpClientDefaultProxyConfigTestSuite {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we close the HTTP client after the test is done? More specially, all CRT tests would fail if there are CRT resources that are not cleaned up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, note that I am not closing in @afterEach because we need to createClient for each test cases where each test case has unique system properties /env variable thus we need new createClient for each test cases. We delete it in same test case

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@joviegas joviegas merged commit 51c1657 into master Feb 29, 2024
@joviegas joviegas deleted the joviegas/proxy_config_consistent branch May 15, 2024 20:30
akidambisrinivasan pushed a commit to akidambisrinivasan/aws-sdk-java-v2 that referenced this pull request Jun 28, 2024
* Http Client made consistent with Default Proxy Configurations

* made changes for URL client

* Updated test case Name

* Updated comments related to test cases

* Updated change logs
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