Skip to content

Conversation

@bouwkast
Copy link
Collaborator

@bouwkast bouwkast commented Oct 2, 2025

Summary of changes

This removes the ability to change the test filter that is used when running the Azure Functions Tests and it will just fallback on the default values.

Reason for change

When someone sets the test filter for a CI build to something that requires a sample project that is not an Azure Functions sample app this stage will fail at it cannot find the sample application as only Azure Function samples are build prior to this stage.
We don't build all of the sample applications when running these as that takes significant time.
We have these in their own stage because they are a pain to build and test.

19:09:24 [ERR] Target RunWindowsAzureFunctionsTests has thrown an exception
Nuke.Common.Tooling.ProcessException: Process 'dotnet.exe' exited with code 1.
   > C:\dotnet\dotnet.exe test D:\a\_work\1\s\tracer\test\Datadog.Trace.ClrProfiler.IntegrationTests\Datadog.Trace.ClrProfiler.IntegrationTests.csproj --configuration Release --framework net7.0 --filter QuartzTests --logger trx --no-build --no-restore --results-directory D:\a\_work\1\s\artifacts\build_data\results\Datadog.Trace.ClrProfiler.IntegrationTests --settings D:\a\_work\1\s\tracer\test\test.settings /property:Platform=AnyCPU
   @ D:\a\_work\1\s
Error output:
   [xUnit.net 00:00:04.64]     Datadog.Trace.ClrProfiler.IntegrationTests.QuartzTests.SubmitsTraces(packageVersion: "") [FAIL]

Implementation details

.SetFilter just always uses the default.

Test coverage

Other details

Can likely fix this betterer some how, maybe just a new separate test filter, but I actually don't know how often we actually are filtering the Azure Functions tests.

When setting the filter we will hit this test
stage, but since we only compile the
Azure Functions Samples here we will hit an
application not found issue.

We should look into this to make it better though
@bouwkast bouwkast requested a review from a team as a code owner October 2, 2025 21:26
@bouwkast
Copy link
Collaborator Author

bouwkast commented Oct 2, 2025

@github-actions github-actions bot added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Oct 2, 2025
Copy link
Collaborator

@NachoEchevarria NachoEchevarria left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

Thanks for trying, but I'm not sure this will actually solve the problem? 🤔

.EnableNoRestore()
.EnableNoBuild()
.SetFilter(string.IsNullOrWhiteSpace(Filter) ? "(RunOnWindows=True)&(Category=AzureFunctions)&(SkipInCI!=True)" : Filter)
.SetFilter("(RunOnWindows=True)&(Category=AzureFunctions)&(SkipInCI!=True)") // FIXME: ignoring the global Filter as when set it may cause issues
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Will this actually solve the problem? The problem is typically that we're not building the same apps. With this change, it means we will always run the azure functions tests, but that won't change the fact that we aren't building the samples, right?

On the assumption that you always specify both, maybe we should actually just always & these instead? e.g.🤔

Suggested change
.SetFilter("(RunOnWindows=True)&(Category=AzureFunctions)&(SkipInCI!=True)") // FIXME: ignoring the global Filter as when set it may cause issues
.SetFilter($"(RunOnWindows=True)&(Category=AzureFunctions)&(SkipInCI!=True){(string.IsNullOrWhiteSpace(Filter)? "" : "&" + Filter)}")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I thought about this over the weekend and would rather not do this at all and just let it fail, I think it is a reasonable failure for some PRs as we don't do this that much so asking to re-run the normal pipeline is better (or ideally getting it to not link to the PR at all) - I wasn't sure how the build was actually ran.

@bouwkast
Copy link
Collaborator Author

Closing as can just re-run the normal pipeline

@bouwkast bouwkast closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builds project files, build scripts, pipelines, versioning, releases, packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants