Skip to content

Impement build props and targets #4468

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

Open
wants to merge 10 commits into
base: feature/build-project
Choose a base branch
from

Conversation

liliankasem
Copy link
Member

This PR implements the build props and targets that will directly replace each step in the build.csproj. Steps include:

  • Downloading templates into the output directory
  • Downloading distlib into the tools/python directory
  • Filtering PowerShell workers by RID
  • Removing the workers folder on .min builds

Second this PR also brings in the same repo props, and release targets as the Host repository to keep us consistent across our repos.

Refer to https://github.com/Azure/azure-functions-host/tree/dev/eng/build for the original files

Finally, we are updating the versioning of the core tools CLI. We will still follow the model we have today for now (4.0.xxxx) - but we no longer want this version set by the CI as we need more control of the version across our many pipelines. This PR sets a new version 4.0.10000 that is higher than any version we have released today to avoid issues. We can discuss the finally version we want to land on when this feature goes into main.

@liliankasem liliankasem requested a review from a team as a code owner June 6, 2025 23:04
@liliankasem
Copy link
Member Author

@jviau ready for a second pass!

<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile><!-- https://github.com/dotnet/runtime/issues/54684 -->
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a VB project somewhere? It seems DisableImplicitNamespaceImports is only for VB projects
"The DisableImplicitNamespaceImports property can be used to disable implicit namespace imports in Visual Basic projects that target .NET 6 or a later version. Implicit namespaces are the default namespaces that are imported globally in a Visual Basic project. Set this property to true to disable implicit namespace imports."
https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#disableimplicitnamespaceimports


<!-- When building in Azure pipelines, update the build number. -->
<!-- Specifically use '$(TF_BUILD)' and not '$(CI)' to ensure we are in Azure pipelines. -->
<Target Name="UpdateAzDoBuildNumber" Condition="'$(TF_BUILD)' == 'true' AND '$(UpdateBuildNumber)' == 'true'" BeforeTargets="BeforeBuild">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to update metadata.json script so it includes this build id as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point me to where metadata.json is generated? Does it currently use $(Version)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get the current release number from ADO: https://github.com/Azure/azure-functions-core-tools/blob/main/eng/scripts/artifact-assembler/generate-metadata-file.ps1#L17

Is this value saved as $env:BUILD_BUILDID as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think we need to update the parsing though for getting the out-of-proc version number since today in the script we look for $_.Name -match "^Azure\.Functions\.Cli\..*\.(\d+\.\d+\.\d+)$"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are setting BUILD_BUILDNUMBER here, not BUILD_BUILDID. I don't believe anything is changing for that script.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated zip artifacts so we're still using the same naming convention we have today Azure.Functions.Cli - I'll defo do an consolidated pipeline run once the feature branch is ready and we can fix anything that doesnt work

@aishwaryabh
Copy link
Contributor

aishwaryabh commented Jun 10, 2025

Should we update the in-proc branch to have similar targets for the versions? It might be strange if the in-proc vs default files have different names/versioning schemas but we can work with it technically (since we package everything in the consolidated pipeline).

I would also just run this through the consolidated pipeline once with the official build on the feature branch just to make sure it packages everything correctly :)

@liliankasem
Copy link
Member Author

Should we update the in-proc branch to have similar targets for the versions? It might be strange if the in-proc vs default files have different names/versioning schemas but we can work with it technically (since we package everything in the consolidated pipeline).

I would also just run this through the consolidated pipeline once with the official build on the feature branch just to make sure it packages everything correctly :)

Probably a good idea to update the in-proc versioning if nothing else; I can start a feature branch with in-proc changes once we're happy with main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants