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

CloudPlatform determination does not work correctly in Azure App Service (Windows) #27657

Closed
shibayan opened this issue Aug 13, 2021 · 6 comments
Assignees
Labels
status: superseded An issue that has been superseded by another

Comments

@shibayan
Copy link

CloudPlatform for Azure App Service was added in Pull Request #25829, but the environment is not correctly identified on App Service (Windows) because the WEBSITES_ENABLE_APP_SERVICE_STORAGE environment variable, which exists only on App Service (Linux), was used to identify the environment.

#25829 (comment)

Therefore, if you are running a Spring boot application on Windows, you may need to configure additional settings for handling Forwarded headers.

There are a number of environment variables that exist on both Windows and Linux, but the following three are probably unique to Azure App Service.

  • WEBSITE_INSTANCE_ID
  • WEBSITE_RESOURCE_GROUP
  • WEBSITE_SKU

Hello @jdubois, I would like to know if you have any opinions on this.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 13, 2021
@wilkinsona
Copy link
Member

Thanks for raising this, @shibayan. When the original support was added, I shared @cuspymd's concern that WEBSITE_SITE_NAME was too generic to use on its own. I have similar concerns about WEBSITE_INSTANCE_ID, WEBSITE_RESOURCE_GROUP, and WEBSITE_SKU. Ideally we'd find another environment variable that's more Azure-specific while also being present on Windows.

Let's wait for the opinion of @jdubois before we change anything here.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Aug 16, 2021
@jdubois
Copy link
Contributor

jdubois commented Aug 16, 2021

Thank you! I’ll have a look next week, when I’m back from holidays.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Aug 16, 2021
@philwebb philwebb added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Aug 16, 2021
@jdubois
Copy link
Contributor

jdubois commented Aug 23, 2021

I just had a talk with @ccompy who knows this far better than I do, and those three environment variables look good.
I'm going to do a PR to fix this in the next couple of days, if that's fine with everyone.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Aug 23, 2021
@wilkinsona
Copy link
Member

Thanks, @jdubois. I'm still a bit concerned about false positives as those three are all rather generic. If there's no single alternative that's more Azure-specific, I guess my concerns could be alleviated somewhat by looking for all three in combination.

@jdubois
Copy link
Contributor

jdubois commented Aug 23, 2021

Unfortunately there isn't one... And yes I believe the combination of all 3 variables makes it pretty unique.

@scottfrederick scottfrederick added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Aug 23, 2021
@scottfrederick scottfrederick added this to the 2.5.x milestone Aug 23, 2021
jdubois added a commit to jdubois/spring-boot that referenced this issue Aug 25, 2021
@scottfrederick
Copy link
Contributor

Closing in favor of #27819.

@scottfrederick scottfrederick added status: superseded An issue that has been superseded by another and removed type: bug A general bug labels Aug 25, 2021
@scottfrederick scottfrederick removed this from the 2.5.x milestone Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

6 participants