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

Allow setting of cloud deduction with probes via env vars or property #9508

Merged
merged 6 commits into from
Jun 28, 2023

Conversation

timyates
Copy link
Member

In #8068 we disabled probing the OS/network to try and discover the cloud we were running on.

This PR adds an environment variable and property to allow it to be enabled.

Closes #9506

In #8068 we disabled probing the OS/network to try and
discover the cloud we were running on.

This PR adds an environment variable and property to allow it to be enabled.

Closes #9506
@timyates timyates self-assigned this Jun 27, 2023
@timyates
Copy link
Member Author

I couldn't find a way of testing this (apart from manually)...

In the test build script, we set the cloud provider to other and the methods that are invoked are both private an static to the DefaultEnvironment class...

@sdelamo
Copy link
Contributor

sdelamo commented Jun 28, 2023

I couldn't find a way of testing this (apart from manually)...

In the test build script, we set the cloud provider to other and the methods that are invoked are both private an static to the DefaultEnvironment class...

I wrote a unit test 2e8ad83 for the shouldDeduceCloudEnvironment method.

Copy link
Contributor

@sdelamo sdelamo left a comment

Choose a reason for hiding this comment

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

I mentioned the system property and environment variable in the breaking docs as well.

@timyates
Copy link
Member Author

@sdelamo removed the unused import and repetition in the test...

@sonarcloud
Copy link

sonarcloud bot commented Jun 28, 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 0 Code Smells

92.6% 92.6% Coverage
0.0% 0.0% Duplication

@sdelamo sdelamo merged commit a8ff23a into 4.0.x Jun 28, 2023
8 checks passed
@sdelamo sdelamo deleted the cloud-deduction-env branch June 28, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Cloud environment detection cannot be turn on again via env. variable in Micronaut Framework 4
3 participants