spring-cloud-config icon indicating copy to clipboard operation
spring-cloud-config copied to clipboard

Fixes gh-1611 - AWS S3 environment repository can read the default property file as well as a profile-specific file

Open dmaiken opened this issue 3 years ago • 5 comments

When fetching properties from S3, always look for the default property file [application-name].[yml|json|properties] as well as [application-name]-[profile].[yml|json|properties]. Previously it was only doing this if we were supplying the property that was configured as the default on the Config Server (usually "default").

This aligns the AWS S3 environment repository behavior with that of the native implementation, git.

dmaiken avatar Feb 27 '22 23:02 dmaiken

Codecov Report

Merging #2053 (feae90c) into main (863285d) will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2053      +/-   ##
============================================
+ Coverage     77.11%   77.17%   +0.05%     
- Complexity     1440     1442       +2     
============================================
  Files           183      183              
  Lines          5362     5366       +4     
  Branches        699      699              
============================================
+ Hits           4135     4141       +6     
+ Misses          956      954       -2     
  Partials        271      271              
Impacted Files Coverage Δ
...server/environment/AwsS3EnvironmentRepository.java 90.00% <100.00%> (+0.46%) :arrow_up:
...d/config/server/config/ConfigServerProperties.java 57.14% <0.00%> (+3.57%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 863285d...feae90c. Read the comment docs.

codecov[bot] avatar Feb 28 '22 00:02 codecov[bot]

Should this be merging into a development branch and not main?

dmaiken avatar Mar 18 '22 16:03 dmaiken

Main is our development branch

spencergibb avatar Mar 18 '22 17:03 spencergibb

Okay, double checking. I had seen PRs to branches like spring-cloud:3.1.x, and I wanted to confirm I should still be merging into main

dmaiken avatar Mar 21 '22 20:03 dmaiken

I see. Bug fixes still go into 3.1.x

spencergibb avatar Mar 21 '22 22:03 spencergibb

Pulled changes into https://github.com/spring-cloud/spring-cloud-config/pull/2234

ryanjbaxter avatar Feb 24 '23 21:02 ryanjbaxter