Skip to content

ProfileFile: Corrects behaviour when config and credentials not found #3942

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 2 commits into from
May 4, 2023

Conversation

martinKindall
Copy link
Contributor

@martinKindall martinKindall commented Apr 24, 2023

Now it returns an empty map, as it used to in previous sdk versions.

Motivation and Context

#3869

Modifications

Returning empty map instead of null. This prevents null-pointer exceptions when calling the profiles() method.

Testing

The included tests were tested running the unit tests of that module with ./mvnw package
Testing environment

Java version: 1.8.0_361, vendor: Oracle Corporation
OS name: "windows 10", version: "10.0", arch: "amd64"

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

@martinKindall martinKindall requested a review from a team as a code owner April 24, 2023 17:21
@debora-ito
Copy link
Member

@martinKindall thank you for the PR.

To make the changelog entry you need to run the scripts/new-change script and follow the instructions, then commit the new file created by the script in .changes/next-release.

You can review our CONTRIBUTING guide here to make sure you've checked all guidelines.

@martinKindall
Copy link
Contributor Author

To make the changelog entry you need to run the scripts/new-change script and follow the instructions, then commit the new file created by the script in .changes/next-release.

Ok, now I added the changelog changes according to the script.

@debora-ito debora-ito added the needs-review This issue or PR needs review from the team. label Apr 28, 2023
@martinKindall martinKindall force-pushed the profile_fix branch 3 times, most recently from f12e749 to 4f5037e Compare April 28, 2023 19:43
…found in ~/.aws/ and ProfileFile.profiles() method is called
@martinKindall
Copy link
Contributor Author

Some pipelines are failing but seems like not because of the changes, but rather the action aws-actions/configure-aws-credentials@v1 is missing credentials. Is there something I can do?

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@debora-ito
Copy link
Member

Only the builds marked as required are necessary. One of those failed though, I'll retry.

@debora-ito debora-ito enabled auto-merge (squash) May 4, 2023 00:10
@debora-ito debora-ito merged commit 5c4ccff into aws:master May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review This issue or PR needs review from the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants