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

deduceCloudEnvironment doesn't add "cloud" in AppEngine #10799

Open
TWiStErRob opened this issue May 4, 2024 · 3 comments
Open

deduceCloudEnvironment doesn't add "cloud" in AppEngine #10799

TWiStErRob opened this issue May 4, 2024 · 3 comments
Labels
info: good first issue Good for newcomers

Comments

@TWiStErRob
Copy link

Expected Behavior

As documented:

The application is running in a Cloud environment (present for all other cloud platform types)
-- https://docs.micronaut.io/latest/guide/#:~:text=present%20for%20all%20other%20cloud%20platform%20types

Actual Behaviour

// deduce GAE
if (StringUtils.isNotEmpty(CachedEnvironment.getenv(GOOGLE_APPENGINE_ENVIRONMENT))) {
environments.add(Environment.GAE);
environments.add(Environment.GOOGLE_COMPUTE);
deduceComputePlatform = false;
}

(compare to branches above, and notice that each add CLOUD explicitly.)

Steps To Reproduce

I haven't tried, I just stumbled upon the code.

Environment Information

https://cloud.google.com/appengine/docs/standard/java-gen2/runtime#environment_variables

Example Application

No response

Version

4.4.8

@TWiStErRob TWiStErRob changed the title deduceCloudEnvironment doesn't seem to add "cloud" in AppEngine deduceCloudEnvironment doesn't add "cloud" in AppEngine May 4, 2024
@TWiStErRob
Copy link
Author

Confirmed not working in GAE:

textPayload: "�[2;37m2024-05-04T21:08:54,634 INFO [main] io.micronaut.context.DefaultApplicationContext$RuntimeConfiguredEnvironment(DefaultEnvironment.java:168)�[m �[1;37mEstablished active environments: [gae, gcp, production]�[m"

@sdelamo
Copy link
Collaborator

sdelamo commented May 6, 2024

Do you want to submit an PR?

@sdelamo sdelamo added the info: good first issue Good for newcomers label May 6, 2024
@TWiStErRob
Copy link
Author

No, because there are no tests for this as far as I found, therefore it should be in scope to add regression tests, which is not as trivial as adding the line I highlighted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info: good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants