-
Notifications
You must be signed in to change notification settings - Fork 184
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
Prejit support on FunctionsNetHost #2711
base: main
Are you sure you want to change the base?
Changes from all commits
fb4bd15
450b956
7068487
1833452
8f02352
4c51c4e
76651aa
4d8d4a4
2dd4703
e884965
c1a449c
1e58d2f
7377750
c24fa1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
jobs: | ||
|
||
- job: BuildPreJitApp | ||
displayName: Build Pre-jit placeholder app artifacts | ||
|
||
templateContext: | ||
outputParentDirectory: $(Build.ArtifactStagingDirectory) | ||
outputs: | ||
- output: pipelineArtifact | ||
displayName: Publish Pre-jit placeholder app artifacts | ||
path: $(Build.ArtifactStagingDirectory)/_preJitAppPackages | ||
artifact: _preJitAppPackages | ||
|
||
variables: | ||
dotnetVersions: 'net8.0,net9.0' | ||
|
||
steps: | ||
- template: /eng/ci/templates/steps/install-dotnet.yml@self | ||
|
||
- ${{ each version in split(variables.dotnetVersions, ',') }}: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. small nit: use |
||
- task: DotNetCoreCLI@2 | ||
displayName: ${{ version }} publish of pre-jit app | ||
inputs: | ||
command: publish | ||
publishWebProjects: false | ||
zipAfterPublish: false | ||
modifyOutputPath: false | ||
arguments: -c Release -o $(Build.ArtifactStagingDirectory)/_preJitAppPackages/${{ replace(version, 'net', '') }} -f ${{ version }} -p:UseAppHost=false | ||
projects: host/src/PlaceholderApp/FunctionsNetHost.PlaceholderApp.csproj | ||
workingDirectory: host/src |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,5 @@ jobs: | |
publishWebProjects: false | ||
zipAfterPublish: false | ||
modifyOutputPath: false | ||
arguments: -c Release -o $(Build.ArtifactStagingDirectory)/_preLaunchAppPackages/${{ version }} -f ${{ version }} -p:UseAppHost=false | ||
arguments: -c Release -o $(Build.ArtifactStagingDirectory)/_preLaunchAppPackages/${{ replace(version, 'net', '') }} -f ${{ version }} -p:UseAppHost=false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixing an existing error in output path value, which was introduced during the pipeline migration. |
||
projects: host/src/PrelaunchApp/App.csproj |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,13 @@ jobs: | |
displayName: Download prelaunch artifacts | ||
inputs: | ||
artifactName: _preLaunchAppPackages | ||
path: $(Build.SourcesDirectory)/host/dist/portable | ||
path: $(Build.SourcesDirectory)/host/dist/portable/prelaunchapps | ||
|
||
- task: DownloadPipelineArtifact@2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we supposed to use |
||
displayName: Download pre-jit artifacts | ||
inputs: | ||
artifactName: _preJitAppPackages | ||
path: $(Build.SourcesDirectory)/host/dist/portable/prejit-placeholder-app | ||
|
||
- task: DownloadPipelineArtifact@2 | ||
displayName: Download host artifacts - linux | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
namespace FunctionsNetHost.Shared | ||
{ | ||
public static class Constants | ||
{ | ||
public const string LogCategory = "FunctionsNetHost"; | ||
public const string DefaultLogPrefix = "LanguageWorkerConsoleLog"; | ||
public const string NetHostWaitHandleName = "AzureFunctionsNetHostSpecializationWaitHandle"; | ||
public const string LogTimeStampFormat = "yyyy-MM-dd HH:mm:ss.fff"; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
namespace FunctionsNetHost.Shared | ||
{ | ||
public static class EnvironmentVariables | ||
{ | ||
/// <summary> | ||
/// The environment variable which is used to specify the path to the jittrace file which will be used for prejitting. | ||
/// </summary> | ||
public const string PreJitFilePath = "AZURE_FUNCTIONS_NETHOST_PREJIT_FILE_PATH"; | ||
|
||
/// <summary> | ||
/// The .NET startup hooks environment variable. | ||
/// </summary> | ||
public const string DotnetStartupHooks = "DOTNET_STARTUP_HOOKS"; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
</Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider making this a variable