Skip to content

Commit

Permalink
feat: remove in-process functions worker project option (#867)
Browse files Browse the repository at this point in the history
* feat: remove functions worker project option in az func servicebus topic

* feat: remove functions worker project option in az func servicebus queue

* feat: remove functions worker project option in az func http

* feat: remove functions worker project option in az func eventhubs

* feat: remove databricks az in-process project

* docs: remove functions worker project option in docs

* pr-chore: remove in-process docker integration tests

* pr-fix: correct w/ last references to in-process + new func tool support

* pr-fix: use older func version for now

* pr-remove: unused FunctionsWorker enum
  • Loading branch information
stijnmoreels authored May 3, 2024
1 parent 3cd7e25 commit ca6e01f
Show file tree
Hide file tree
Showing 66 changed files with 115 additions and 2,261 deletions.
2 changes: 2 additions & 0 deletions build/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ stages:
steps:
- task: FuncToolsInstaller@0
displayName: 'Install Azure Functions Core tools'
inputs:
version: '4.0.5390'
- template: test/run-integration-tests.yml@templates
parameters:
dotnetSdkVersion: '$(DotNet.Sdk.Version)'
Expand Down
90 changes: 0 additions & 90 deletions build/templates/docker-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,61 +86,21 @@ stages:
ARCUS_STORAGEACCOUNT_CONNECTIONSTRING=$(Arcus.EventHubs.BlobStorage.StorageAccountConnectionString)
ARCUS_SERVICEBUS_CONNECTIONSTRING=$(Arcus.Worker.ServiceBus.Queue.ConnectionString)
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.Databricks.JobMetrics'
projectAlias: 'arcus-az-databricks-jobmetrics'
ports: '$(Arcus.AzureFunctions.Databricks.HttpPort):80'
script: |
Get-Content './Arcus.Demo.AzureFunctions.Databricks.JobMetrics/Startup.cs' -Raw |
% { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.Databricks.JobMetrics/Startup.cs'
envVars: |
Arcus__Databricks__Url=$(Arcus.Databricks.Url)
Arcus__ApplicationInsights__MetricName=$(Arcus.ApplicationInsights.MetricName)
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.InProcess.Http'
projectAlias: 'arcus-az-func-http'
projectOptions: '--functions-worker inProcess'
ports: '$(Arcus.AzureFunctions.Http.InProcess.HttpPort):80'
script: |
Get-Content './Arcus.Demo.AzureFunctions.InProcess.Http/Startup.cs' -Raw |
% { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.InProcess.Http/Startup.cs'
envVars: |
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.Isolated.Http'
projectAlias: 'arcus-az-func-http'
projectOptions: '--functions-worker isolated'
ports: '$(Arcus.AzureFunctions.Http.Isolated.HttpPort):80'
script: |
Get-Content './Arcus.Demo.AzureFunctions.Isolated.Http/Program.cs' -Raw |
% { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.Isolated.Http/Program.cs'
envVars: |
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.ServiceBus.Queue.InProcess'
projectAlias: 'arcus-az-func-servicebus-queue'
projectOptions: '--functions-worker inProcess'
ports: '$(Arcus.AzureFunctions.ServiceBus.Queue.InProcess.Port):$(Arcus.AzureFunctions.ServiceBus.Queue.InProcess.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue.InProcess/Startup.cs' -Raw |
% { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue.InProcess/Startup.cs'
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Queue.ConnectionString)
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.ServiceBus.Queue.Isolated'
projectAlias: 'arcus-az-func-servicebus-queue'
projectOptions: '--functions-worker isolated'
ports: '$(Arcus.AzureFunctions.ServiceBus.Queue.Isolated.Port):$(Arcus.AzureFunctions.ServiceBus.Queue.Isolated.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Queue.Isolated/Program.cs' -Raw |
Expand All @@ -149,24 +109,10 @@ stages:
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Queue.ConnectionString)
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.ServiceBus.Topic.InProcess'
projectAlias: 'arcus-az-func-servicebus-topic'
projectOptions: '--functions-worker inProcess'
ports: '$(Arcus.AzureFunctions.ServiceBus.Topic.InProcess.Port):$(Arcus.AzureFunctions.ServiceBus.Topic.InProcess.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic.InProcess/Startup.cs' -Raw |
% { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic.InProcess/Startup.cs'
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Topic.ConnectionString)
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.ServiceBus.Topic.Isolated'
projectAlias: 'arcus-az-func-servicebus-topic'
projectOptions: '--functions-worker isolated'
ports: '$(Arcus.AzureFunctions.ServiceBus.Topic.Isolated.Port):$(Arcus.AzureFunctions.ServiceBus.Topic.Isolated.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.ServiceBus.Topic.Isolated/Program.cs' -Raw |
Expand All @@ -175,28 +121,10 @@ stages:
envVars: |
ServiceBusConnectionString=$(Arcus.Worker.ServiceBus.Topic.ConnectionString)
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.EventHubs.InProcess'
projectAlias: 'arcus-az-func-eventhubs'
projectOptions: '--functions-worker inProcess'
ports: '$(Arcus.AzureFunctions.EventHubs.InProcess.Port):$(Arcus.AzureFunctions.EventHubs.InProcess.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.EventHubs.InProcess/Startup.cs' -Raw |
% { $_ -replace '#error', '#warning' -replace '#if DEBUG', '#if RELEASE' } |
Set-Content './Arcus.Demo.AzureFunctions.EventHubs.InProcess/Startup.cs'
Get-Content './Arcus.Demo.AzureFunctions.EventHubs.InProcess/SensorReadingFunction.cs' -Raw |
% { $_ -replace 'sensors', '$(Arcus.EventHubs.Docker.EventHubsName)' } |
Set-Content './Arcus.Demo.AzureFunctions.EventHubs.InProcess/SensorReadingFunction.cs'
envVars: |
EventHubsConnectionString=$(Arcus.EventHubs.ConnectionString)
AzureWebJobsStorage=$(Arcus.EventHubs.BlobStorage.StorageAccountConnectionString)
APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=$(Arcus.ApplicationInsights.InstrumentationKey)
- template: 'run-new-project-from-template.yml'
parameters:
projectName: 'Arcus.Demo.AzureFunctions.EventHubs.Isolated'
projectAlias: 'arcus-az-func-eventhubs'
projectOptions: '--functions-worker isolated'
ports: '$(Arcus.AzureFunctions.EventHubs.Isolated.Port):$(Arcus.AzureFunctions.EventHubs.Isolated.Port)'
script: |
Get-Content './Arcus.Demo.AzureFunctions.EventHubs.Isolated/Program.cs' -Raw |
Expand Down Expand Up @@ -238,36 +166,18 @@ stages:
targetType: 'inline'
script: 'docker logs Arcus.Demo.EventHubs'
condition: failed()
- task: PowerShell@2
displayName: 'Get Docker container logs for Arcus.Demo.AzureFunctions.EventHubs.InProcess'
inputs:
targetType: 'inline'
script: 'docker logs Arcus.Demo.AzureFunctions.EventHubs.InProcess'
condition: failed()
- task: PowerShell@2
displayName: 'Get Docker container logs for Arcus.Demo.AzureFunctions.EventHubs.Isolated'
inputs:
targetType: 'inline'
script: 'docker logs Arcus.Demo.AzureFunctions.EventHubs.Isolated'
condition: failed()
- task: PowerShell@2
displayName: 'Get Docker container logs for Arcus.Demo.AzureFunctions.ServiceBus.Topic.InProcess'
inputs:
targetType: 'inline'
script: 'docker logs Arcus.Demo.AzureFunctions.ServiceBus.Topic.InProcess'
condition: failed()
- task: PowerShell@2
displayName: 'Get Docker container logs for Arcus.Demo.AzureFunctions.ServiceBus.Topic.Isolated'
inputs:
targetType: 'inline'
script: 'docker logs Arcus.Demo.AzureFunctions.ServiceBus.Topic.Isolated'
condition: failed()
- task: PowerShell@2
displayName: 'Get Docker container logs for Arcus.Demo.AzureFunctions.InProcess.Http'
inputs:
targetType: 'inline'
script: 'docker logs Arcus.Demo.AzureFunctions.InProcess.Http'
condition: failed()
- task: PowerShell@2
displayName: 'Get Docker container logs for Arcus.Demo.AzureFunctions.Isolated.Http'
inputs:
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions docs/preview/features/azurefunctions-eventhubs-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ Creates a starter worker project with by default configured:
### Configuration

And additional features available with options:
* `--functions-worker`: Configures the type of Azure Functions worker type the project should target.
* `isolated` (default): Uses the isolated Azure Functions worker type which runs on a different process as the Azure Function
* `inProcess`: Uses the in-process Azure Functions worker type which runs on the same process as run Azure Function
For more information on the difference between the two, see [Microsoft's documentation](https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide).
* `-es|--exclude-serilog`: Exclude the [Serilog](https://serilog.net/) logging infrastructure in the worker project which includes default enrichers ([version](https://observability.arcus-azure.net/features/telemetry-enrichment#version-enricher) and [application](https://observability.arcus-azure.net/features/telemetry-enrichment#application-enricher)), and sinking to Application Insights.
4 changes: 0 additions & 4 deletions docs/preview/features/azurefunctions-http-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ Creates a starter worker project with by default configured:

And additional features available with options:

* `--functions-worker`: Configures the type of Azure Functions worker type the project should target.
* `isolated` (default): Uses the isolated Azure Functions worker type which runs on a different process as the Azure Function
* `inProcess`: Uses the in-process Azure Functions worker type which runs on the same process as run Azure Function
For more information on the difference between the two, see [Microsoft's documentation](https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide).
* `--include-healthchecks` (default `false`): include a default Health Azure Function and health check services from the project
* `--exclude-openapi` (default `false`): exclude the [Azure Functions OpenAPI docs generation and UI](https://github.com/Azure/azure-functions-openapi-extension) from the project.
* `--exclude-serilog` (default `false`): exclude the [Serilog](https://serilog.net/) logging infrastructure in the Azure Functions project which includes default enrichers ([version](https://observability.arcus-azure.net/features/telemetry-enrichment#version-enricher) and [application](https://observability.arcus-azure.net/features/telemetry-enrichment#application-enricher)), and sinking to Application Insights.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ Creates a starter worker project with by default configured:
### Configuration

And additional features available with options:
* `--functions-worker`: Configures the type of Azure Functions worker type the project should target.
* `isolated` (default): Uses the isolated Azure Functions worker type which runs on a different process as the Azure Function
* `inProcess`: Uses the in-process Azure Functions worker type which runs on the same process as run Azure Function
For more information on the difference between the two, see [Microsoft's documentation](https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide).
* `--exclude-serilog`: Exclude the [Serilog](https://serilog.net/) logging infrastructure in the Azure Functions project which includes default enrichers ([version](https://observability.arcus-azure.net/features/telemetry-enrichment#version-enricher) and [application](https://observability.arcus-azure.net/features/telemetry-enrichment#application-enricher)), and sinking to Application Insights.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ Creates a starter worker project with by default configured:
### Configuration

And additional features available with options:
* `--functions-worker`: Configures the type of Azure Functions worker type the project should target.
* `isolated` (default): Uses the isolated Azure Functions worker type which runs on a different process as the Azure Function
* `inProcess`: Uses the in-process Azure Functions worker type which runs on the same process as run Azure Function
For more information on the difference between the two, see [Microsoft's documentation](https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide).
* `--exclude-serilog`: Exclude the [Serilog](https://serilog.net/) logging infrastructure in the Azure Functions project which includes default enrichers ([version](https://observability.arcus-azure.net/features/telemetry-enrichment#version-enricher) and [application](https://observability.arcus-azure.net/features/telemetry-enrichment#application-enricher)), and sinking to Application Insights.
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@
"**/*.filelist",
"**/*.user",
"**/*.lock.json"
],
"modifiers": [
{
"condition": "Isolated",
"exclude": [
"Startup.cs"
]
},
{
"condition": "InProcess",
"exclude": [
"Program.cs"
]
}
]
}
],
Expand Down Expand Up @@ -75,30 +61,6 @@
},
"replaces": "//#error"
},
"functions-worker": {
"type": "parameter",
"datatype": "choice",
"choices": [
{
"choice": "inProcess",
"description": "Uses Azure Functions in-process worker template"
},
{
"choice": "isolated",
"description": "Uses Azure Functions isolated worker template"
}
],
"defaultValue": "isolated",
"description": "Chooses the kind of Azure Functions worker template"
},
"InProcess": {
"type": "computed",
"value": "(functions-worker == \"inProcess\")"
},
"Isolated": {
"type": "computed",
"value": "(functions-worker == \"isolated\")"
},
"exclude-serilog": {
"type": "parameter",
"datatype": "bool",
Expand All @@ -109,24 +71,5 @@
"type": "computed",
"value": "!(exclude-serilog)"
}
},
"postActions": [
{
"condition": "InProcess",
"description": "Adding Reference to Microsoft.NET.Sdk.Functions NuGet package",
"actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814",
"continueOnError": false,
"manualInstructions": [
{
"text": "Manually add the reference to Microsoft.NET.Sdk.Functions to your project file"
}
],
"args": {
"referenceType": "package",
"reference": "Microsoft.NET.Sdk.Functions",
"version": "4.1.3",
"projectFileExtensions": ".csproj"
}
}
]
}
}
Loading

0 comments on commit ca6e01f

Please sign in to comment.