Skip to content

Conversation

@sugmanue
Copy link
Contributor

Motivation and Context

Added or removed dependencies to clear all the warning related to use but undeclared, or unused but declared dependencies.

Given that codecatalyst does not use http-auth-aws this dependency was added to all the services but that one instead of just adding it to the services/pom.xml parent pom.

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

@sugmanue sugmanue requested a review from a team as a code owner August 15, 2023 00:37
@sugmanue sugmanue requested review from gosar and zoewangg August 15, 2023 00:37
<artifactId>aws-json-protocol</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of adding it to every service module, can we add it to this pom? https://github.com/aws/aws-sdk-java-v2/blob/master/services/pom.xml This way, if we need to change anything, say artifact ID, we can do it just in one place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a note to the description about it

Given that codecatalyst does not use http-auth-aws this dependency was added to all the services but that one instead of just adding it to the services/pom.xml parent pom.

So, we can add it to the services/pom.xml and live with one warning of unused dependency for codecatalyst, or we can just add it to all of the services but codecatalyst as done here and avoid having any warnings, thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

My bad, should've read the description first 😅 Agreed we should add the dependency to each service module since not all services use them. The last thing we want is adding unused dependency since it'll increase JAR size.

Copy link
Contributor

Choose a reason for hiding this comment

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

We need to update this template though https://github.com/aws/aws-sdk-java-v2/blob/master/services/new-service-template/pom.xml This is used to create new service modules. We need to figure out how to add this dependency conditionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The template is already updated, we do not have at the moment a way to "opt-out" other than editing the resulting pom. I can take a look at that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Discussed offline, new services will be addressed in another PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added on #4309

@sugmanue sugmanue requested a review from zoewangg August 15, 2023 20:17
@sugmanue sugmanue merged commit fe75306 into feature/master/sra-identity-auth Aug 15, 2023
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug B 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 231 Code Smells

0.0% 0.0% Coverage
2.7% 2.7% Duplication

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

@sugmanue sugmanue deleted the sugmanue/sra-ia-add-undeclared-dependencies branch August 16, 2023 20:46
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.

2 participants