Azure / Azure/azure-functions-host
Host logging for EOL or soon-to-be EOL PowerShell Apps
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### What problem would the feature you're requesting solve? Please describe.
Show regular warnings when an EOL or soon-to-be EOL version is detected for a PowerShell app. This warning should be visible and accessible through App Insights.
#### Describe the solution you'd like
| Action | Condition | Behavior | Warning message. |
|-----------------|----------------|----------------|----------------|
| Upon app start/load | Functions version and/or stack version is out of support | Show warning message. | "Upgrade to Functions/Stack version as has reached end-of-life on and is no longer supported. Learn more: aka.ms/FunctionsStackUpgrade" |
| Regular cadence (24h?) | Functions version and/or stack version will be out of support in less than 6 months | Show warning message. | "Use Functions/Stack version as will reach end-of-life on and will no longer be supported. Learn more: aka.ms/FunctionsStackUpgrade" |
#### Describe alternatives you've considered
Warnings already exist for such apps in the portal and client tools, but host logging is critical for customer awareness.
#### Additional context
**Current Behavior:**
No warning/error is written by Host for EOL apps, and hence these logs are not available on AppInsights.
**Acceptance Criteria:**
Work item can be marked 'Completed' when we have implemented, tested and deployed the logic to show the above mentioned warning message when an app loads, and at a regular cadence thereafter when a Function App is configured with a stack runtime version that has a) reached its end-of-life date, or b) will reach its end-of-life date in <6months.
Additional information:
1. Getting current stack version information: [See this](https://github.com/Azure/azure-cli/blob/db09a85aba76aa31b791dc775b29f8e246461b30/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L8270-L8327)
For Linux:
> All stacks - get app runtime version from linux_fx_version (from site config)
For Windows:
> Node: WEBSITE_NODE_DEFAULT_VERSION (from app setting)
> .NET: netFrameworkVersion (from site config)
> Java: javaVersion (from site config)
>PowerShell: powerShellVersion (from site config)
2. Compare against EOL dates in StacksAPI: [See this](https://github.com/Azure/azure-functions-ux/tree/dev/server/src/stacks/2020-10-01/stacks/function-app-stacks)
Contributor guide
Research direction
Start by reviewing the runtime-version sources described in azure-cli's custom.py and the EOL data under server/src/stacks/2020-10-01/stacks/function-app-stacks. Trace where the host handles app load and recurring work, then implement and test warnings for already-EOL and under-six-month runtimes, with logs visible to Application Insights.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, powershell
- Domain
- backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100