Skip to content

Support YAML specific profile documents in AWS S3 buckets#2825

Merged
ryanjbaxter merged 1 commit intospring-cloud:4.1.xfrom
ryanjbaxter:support-profile-specific-yaml-documents
Apr 21, 2025
Merged

Support YAML specific profile documents in AWS S3 buckets#2825
ryanjbaxter merged 1 commit intospring-cloud:4.1.xfrom
ryanjbaxter:support-profile-specific-yaml-documents

Conversation

@ryanjbaxter
Copy link
Copy Markdown
Contributor

Fixes #2815

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for YAML-specific profile documents stored in AWS S3 buckets. Key changes include:

  • A new multi-document YAML file (foo.yaml) that separates non-profile and profile-specific configurations.
  • Additional YAML and application configuration files for testing different profiles.
  • Refactoring and extension of the S3 environment repository to support both YAML and properties/JSON file types.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spring-cloud-config-server/src/test/resources/awss3/foo.yaml Introduces a multi-document YAML file with profile-specific configurations
spring-cloud-config-server/src/test/resources/awss3/foo-test1.yaml Adds profile-specific test configuration
spring-cloud-config-server/src/test/resources/awss3/application.yaml Adds non-profile-specific test configuration
spring-cloud-config-server/src/test/resources/awss3/application-test1.yaml Adds profile-specific test configuration
spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/AwsS3EnvironmentRepositoryTests.java Implements a new test (multiDocumentYaml) to validate YAML multi-document processing
spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/AwsS3EnvironmentRepository.java Refactors property source addition and extends S3 file handling to support YAML, JSON, and properties
Comments suppressed due to low confidence (1)

spring-cloud-config-server/src/test/resources/awss3/foo.yaml:6

  • Inconsistent key naming: line 6 uses 'onProfile' while line 12 uses 'on-profile'. If both are not intended to have distinct meanings, consider standardizing the property key for clarity.
      onProfile: test1

@ryanjbaxter ryanjbaxter force-pushed the support-profile-specific-yaml-documents branch from de63c9a to 709c687 Compare April 17, 2025 15:10
@ryanjbaxter ryanjbaxter linked an issue Apr 21, 2025 that may be closed by this pull request
@ryanjbaxter ryanjbaxter merged commit d13647e into spring-cloud:4.1.x Apr 21, 2025
2 checks passed
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.

Incorrect profile hadling of properties using AwsS3 repository

3 participants