Skip to content
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

Disable the environment info contributor by default #28311

Closed
philwebb opened this issue Oct 13, 2021 · 2 comments
Closed

Disable the environment info contributor by default #28311

philwebb opened this issue Oct 13, 2021 · 2 comments
Assignees
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

For consistency with #28310 we should not expose the environment info contributor by default.

@philwebb philwebb added status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement labels Oct 13, 2021
@philwebb philwebb added this to the 2.6.x milestone Oct 13, 2021
@wilkinsona wilkinsona self-assigned this Oct 20, 2021
@wilkinsona wilkinsona changed the title Don't expose environment info contributor by default Disable the environment info contributor by default Oct 20, 2021
@wilkinsona wilkinsona modified the milestones: 2.6.x, 2.6.0-RC1 Oct 20, 2021
@charboubmustapha
Copy link

charboubmustapha commented Jan 5, 2022

Hello @wilkinsona @philwebb ,
Happy new year 🥳 best wishes.
I'm facing an issue using the version 2.6.2 even if the info is enable , the call to /info don't display custom info properties .
I think it's related to the configuration of EnvironmentInfoContributor in InfoContributorAutoConfiguration . the fallback is all time disabled

@wilkinsona
Copy link
Member

The fallback should only be used when the property has not been set and we have a test that verifies that the contributor can be enabled:

@Test
void envContributor() {
this.contextRunner.withPropertyValues("management.info.env.enabled=true")
.run((context) -> assertThat(context).hasSingleBean(EnvironmentInfoContributor.class));
}

if setting management.info.env.enabled=true does not work for you, please open a new issue with a minimal sample that reproduces the problem and we can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants