Skip to content

The wording of the client's settings override can be confusing and would be good to fixΒ #2372

Closed

Description

@Junuu

Hello and good day.
First of all, I thought this part of the bug report and feature request was a little ambiguous because it is a document part, but I tried to categorize it as a bug report first. Thank you for your understanding.

I'm taking a step-by-step approach to configuring Spring Cloud.

I was trying to override the value provided by the server in the spring cloud config client and finally succeeded in overriding it after looking at the spring official documentation and stackover.

I attach the git repository for your reference
https://github.com/Junuu/spring-study/tree/main/spring-cloud-config-server
https://github.com/Junuu/spring-study/tree/main/spring-cloud-config-client
https://github.com/Junuu/spring-study/blob/main/testapplication-local.yml
https://github.com/Junuu/spring-study/blob/main/testapplication-dev.yml

image

This is where I found the official documentation confusing, and it would be nice to see it added to say that you need to add an override setting to the "remote" part.

Here's that documentation
https://docs.spring.io/spring-cloud-config/docs/4.0.4/reference/html/#_using_bootstrap_to_override_properties

I thought I had to add it to the client or server configuration, and then I found out from other articles that it should be added to the remote configuration file.

Here's that documentation
https://cloud.spring.io/spring-cloud-static/spring-cloud.html#overriding-bootstrap-properties

As a result, I thought it would be nice to add the following.

"If you want to allow your applications to override the remote properties with their own System properties or config files, the remote property source has to grant it permission by setting"

Activity

  1. ryanjbaxter commented on Jan 10, 2024

    @ryanjbaxter
    Contributor

    That is basically the same as what we already say in the documentation

    within the applications configuration coming from the config server

  2. Junuu commented on Jan 10, 2024

    @Junuu
    Author

    Does the term config server refer to an external repository like Git or Valut?

    I think the yml configuration in Git or Valut etc is the remote configuration.

    So I made the mistake of thinking of the Config Server term as the Spring Cloud Config Server and writing the Override property in that server's application.yml.

    But in the end, I realized that I should have written the Override property in the application-local.yml of the Git repository.

    This could be an error in translation as I don't speak English very well.

    Thank you for your response.

  3. ryanjbaxter commented on Jan 10, 2024

    @ryanjbaxter
    Contributor

    No the key is the terms "applications configuration". This is referring to the the application's configuration being served up from the config server which is stored in Git, Vault, or any other environment repository.

  4. Junuu commented on Jan 10, 2024

    @Junuu
    Author

    Thank you for your prompt response.

    I appreciate your assistance in clarifying the documentation. Your explanation has certainly helped me understand the context better. However, I believe that the current wording might still be a bit confusing for others as well.

    I suggest making the following change in the documentation:

    as-is

    If you enable config first bootstrap, you can allow client applications to override configuration from the config server by placing two properties within the applications configuration coming from the config server.

    to-be

    "If you enable config first bootstrap, you can allow client settings to override configuration from the config server by placing two properties within the applications configuration, which may include settings from external environment repositories such as Valut and Git."

    If you find this suggestion reasonable, I would be more than happy to create a Pull Request to implement the proposed change. However, if you have any reservations or prefer an alternative approach, please feel free to discuss it further or close this issue accordingly.

    Once again, thank you for your help and consideration.

    Thank you.

  5. ryanjbaxter commented on Jan 10, 2024

    @ryanjbaxter
    Contributor

    Thanks, I would just change the wording slightly...

    If you enable config first bootstrap, you can allow client settings to override configuration from the config server by placing two properties within the applications configuration residing in the external environment repository(for example Git, Vault, SVN, etc) used by the config server.

    How does that sound?

  6. Buzzardo commented on Jan 10, 2024

    @Buzzardo
    Contributor

    I'd change that to:

    If you enable config-first bootstrap, you can let client settings override configuration from the config server by placing two properties within the applications configuration that reside in the external environment repository (for example, Git, Vault, SVN, and others) used by the config server.

  7. ryanjbaxter commented on Jan 10, 2024

    @ryanjbaxter
    Contributor

    Thanks @Buzzardo lets go with that!

  8. added a commit that references this issue on Jan 10, 2024
    c0d0851
  9. added this to the 4.0.5 milestone on Jan 10, 2024
  10. Junuu commented on Jan 11, 2024

    @Junuu
    Author

    Thanks for the quick reflection!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions