Skip to content
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

Fix S2342 FP: Flaky reports #9683

Open
bart-vmware opened this issue Oct 10, 2024 · 8 comments
Open

Fix S2342 FP: Flaky reports #9683

bart-vmware opened this issue Oct 10, 2024 · 8 comments
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Type: False Positive Rule IS triggered when it shouldn't be.

Comments

@bart-vmware
Copy link

Description

During ci-build, we randomly get build errors such as the following:

error S2342: Rename this enumeration to match the regular expression: '^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?s$'

The affected [Flags] enum is named FastTestConfigurations, which complies with the rule. Because we sometimes get this error, but not always, I suspect a static regex is being used that isn't thread-safe.

[Flags]
public enum FastTestConfigurations
{
    ConfigServer = 1,
    Discovery = 2,
    Connectors = 4,
    WaveFrontExport = 8,
    All = ConfigServer | Discovery | Connectors | WaveFrontExport
}

Repro steps

Not available, it happens randomly, but not always. I've seen this multiple times in Azure DevOps, running on Ubuntu against .NET 8. I haven't experienced it locally on Windows 11.

Known workarounds

Restart the cibuild, which usually makes the error go away.

Related information

  • C#/VB.NET Plugins version: 9.25.1.91650
  • Visual Studio version: 17.11.5
  • MSBuild / dotnet version: .NET 8
  • SonarScanner for .NET version (if used): N/A
  • Operating System: Ubuntu
@gregory-paidis-sonarsource gregory-paidis-sonarsource added Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Type: False Positive Rule IS triggered when it shouldn't be. labels Oct 11, 2024
@gregory-paidis-sonarsource gregory-paidis-sonarsource changed the title Flaky reports from S2342 Fix S2342 FP: Flaky reports Oct 11, 2024
@gregory-paidis-sonarsource
Copy link
Contributor

Hey there,
This is an interesting problem.
Since it is flaky, I am not sure how to investigate it.

Can you clarify what you mean by this?

Because we sometimes get this error, but not always, I suspect a static regex is being used that isn't thread-safe

@bart-vmware
Copy link
Author

Yeah, these things are usually hard to diagnose. I was just guessing, without looking at the source code. It may as well be a race condition somewhere in Sonar code or the underlying compiler.

The project where this happens is open-source under the .NET Foundation. Sources are at https://github.com/SteeltoeOSS/Steeltoe. I've tried to dig up a build log, but couldn't find it back in the large amount of builds. I'll post it here when it happens again.

@TimHess
Copy link

TimHess commented Feb 10, 2025

This issue popped up again on Friday during this run on a Microsoft-hosted MacOS pipeline, here is the output from the failed step:

2025-02-07T16:22:36.5315990Z ##[section]Starting: dotnet build
2025-02-07T16:22:36.5325350Z ==============================================================================
2025-02-07T16:22:36.5325750Z Task         : .NET Core
2025-02-07T16:22:36.5325960Z Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command
2025-02-07T16:22:36.5326280Z Version      : 2.247.3
2025-02-07T16:22:36.5326490Z Author       : Microsoft Corporation
2025-02-07T16:22:36.5326630Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
2025-02-07T16:22:36.5326970Z ==============================================================================
2025-02-07T16:22:36.8894620Z Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
2025-02-07T16:22:36.8942820Z [command]/Users/runner/hostedtoolcache/dotnet/dotnet build /Users/runner/work/1/s/src/Steeltoe.Management.slnf -dl:CentralLogger,"/Users/runner/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.247.3/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"/Users/runner/work/_tasks/DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b/2.247.3/dotnet-build-helpers/Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" --no-restore -c Release -v minimal
2025-02-07T16:22:46.8462090Z   ConfigurationSchemaGenerator -> /Users/runner/work/1/s/src/Tools/src/ConfigurationSchemaGenerator/bin/Release/net8.0/ConfigurationSchemaGenerator.dll
2025-02-07T16:22:54.5932250Z ##[error]src/Common/test/TestResources/FastTestConfigurations.cs(8,13): Error S2342: Rename this enumeration to match the regular expression: '^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?s$'. (https://rules.sonarsource.com/csharp/RSPEC-2342)
2025-02-07T16:22:54.6946760Z /Users/runner/work/1/s/src/Common/test/TestResources/FastTestConfigurations.cs(8,13): error S2342: Rename this enumeration to match the regular expression: '^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?s$'. (https://rules.sonarsource.com/csharp/RSPEC-2342) [/Users/runner/work/1/s/src/Common/test/TestResources/Steeltoe.Common.TestResources.csproj]
2025-02-07T16:22:56.3910270Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Common
2025-02-07T16:22:57.1309510Z   Steeltoe.Common -> /Users/runner/work/1/s/src/Common/src/Common/bin/Release/net8.0/Steeltoe.Common.dll
2025-02-07T16:22:57.3535550Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Common/bin/Release/Steeltoe.Common.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:22:57.3589370Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Common/bin/Release/Steeltoe.Common.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:01.1568110Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Configuration.Abstractions
2025-02-07T16:23:01.5404410Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Common.Certificates
2025-02-07T16:23:02.3982440Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Common.Hosting
2025-02-07T16:23:02.4207370Z   Steeltoe.Configuration.Abstractions -> /Users/runner/work/1/s/src/Configuration/src/Abstractions/bin/Release/net8.0/Steeltoe.Configuration.Abstractions.dll
2025-02-07T16:23:03.9238030Z   Steeltoe.Common.Certificates -> /Users/runner/work/1/s/src/Common/src/Certificates/bin/Release/net8.0/Steeltoe.Common.Certificates.dll
2025-02-07T16:23:03.9440230Z   Steeltoe.Common.Hosting -> /Users/runner/work/1/s/src/Common/src/Hosting/bin/Release/net8.0/Steeltoe.Common.Hosting.dll
2025-02-07T16:23:05.1116910Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Configuration.Placeholder
2025-02-07T16:23:06.3179050Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Management.Abstractions
2025-02-07T16:23:06.5970760Z   Steeltoe.Configuration.Placeholder -> /Users/runner/work/1/s/src/Configuration/src/Placeholder/bin/Release/net8.0/Steeltoe.Configuration.Placeholder.dll
2025-02-07T16:23:06.6455770Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Management.Tasks
2025-02-07T16:23:07.2198870Z   Steeltoe.Management.Abstractions -> /Users/runner/work/1/s/src/Management/src/Abstractions/bin/Release/net8.0/Steeltoe.Management.Abstractions.dll
2025-02-07T16:23:08.7786040Z   Successfully created package '/Users/runner/work/1/s/src/Configuration/src/Abstractions/bin/Release/Steeltoe.Configuration.Abstractions.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:09.6527310Z   Successfully created package '/Users/runner/work/1/s/src/Configuration/src/Abstractions/bin/Release/Steeltoe.Configuration.Abstractions.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:10.2564990Z   Steeltoe.Management.Tasks -> /Users/runner/work/1/s/src/Management/src/Tasks/bin/Release/net8.0/Steeltoe.Management.Tasks.dll
2025-02-07T16:23:11.1997540Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Hosting/bin/Release/Steeltoe.Common.Hosting.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:11.1998920Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Hosting/bin/Release/Steeltoe.Common.Hosting.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:11.3003980Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Abstractions/bin/Release/Steeltoe.Management.Abstractions.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:11.4007500Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Abstractions/bin/Release/Steeltoe.Management.Abstractions.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:11.5011980Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Logging.Abstractions
2025-02-07T16:23:11.6427460Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Common.Http
2025-02-07T16:23:11.6544240Z   Steeltoe.Logging.Abstractions -> /Users/runner/work/1/s/src/Logging/src/Abstractions/bin/Release/net8.0/Steeltoe.Logging.Abstractions.dll
2025-02-07T16:23:11.6697580Z   Steeltoe.Common.Http -> /Users/runner/work/1/s/src/Common/src/Http/bin/Release/net8.0/Steeltoe.Common.Http.dll
2025-02-07T16:23:11.8618700Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Tasks/bin/Release/Steeltoe.Management.Tasks.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:12.1069620Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Tasks/bin/Release/Steeltoe.Management.Tasks.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:12.2367470Z   Successfully created package '/Users/runner/work/1/s/src/Configuration/src/Placeholder/bin/Release/Steeltoe.Configuration.Placeholder.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:12.2805880Z   Successfully created package '/Users/runner/work/1/s/src/Configuration/src/Placeholder/bin/Release/Steeltoe.Configuration.Placeholder.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:12.6254590Z   Successfully created package '/Users/runner/work/1/s/src/Logging/src/Abstractions/bin/Release/Steeltoe.Logging.Abstractions.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:12.7776180Z   Successfully created package '/Users/runner/work/1/s/src/Logging/src/Abstractions/bin/Release/Steeltoe.Logging.Abstractions.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:13.2447950Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Configuration.CloudFoundry
2025-02-07T16:23:14.1565810Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Common.Logging
2025-02-07T16:23:15.0680070Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Logging.DynamicLogger
2025-02-07T16:23:15.9298900Z   Steeltoe.Logging.DynamicLogger -> /Users/runner/work/1/s/src/Logging/src/DynamicLogger/bin/Release/net8.0/Steeltoe.Logging.DynamicLogger.dll
2025-02-07T16:23:15.9737200Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Logging.DynamicSerilog
2025-02-07T16:23:18.1470140Z   Steeltoe.Configuration.CloudFoundry -> /Users/runner/work/1/s/src/Configuration/src/CloudFoundry/bin/Release/net8.0/Steeltoe.Configuration.CloudFoundry.dll
2025-02-07T16:23:18.3890700Z   Steeltoe.Logging.DynamicSerilog -> /Users/runner/work/1/s/src/Logging/src/DynamicSerilog/bin/Release/net8.0/Steeltoe.Logging.DynamicSerilog.dll
2025-02-07T16:23:18.4890250Z   Successfully created package '/Users/runner/work/1/s/src/Logging/src/DynamicLogger/bin/Release/Steeltoe.Logging.DynamicLogger.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:18.5404830Z   Successfully created package '/Users/runner/work/1/s/src/Logging/src/DynamicLogger/bin/Release/Steeltoe.Logging.DynamicLogger.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:18.6970230Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Configuration.Encryption
2025-02-07T16:23:18.7870540Z   Successfully created package '/Users/runner/work/1/s/src/Logging/src/DynamicSerilog/bin/Release/Steeltoe.Logging.DynamicSerilog.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:18.7932800Z   Successfully created package '/Users/runner/work/1/s/src/Logging/src/DynamicSerilog/bin/Release/Steeltoe.Logging.DynamicSerilog.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:19.8598830Z   Successfully created package '/Users/runner/work/1/s/src/Configuration/src/CloudFoundry/bin/Release/Steeltoe.Configuration.CloudFoundry.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:19.9372570Z   Successfully created package '/Users/runner/work/1/s/src/Configuration/src/CloudFoundry/bin/Release/Steeltoe.Configuration.CloudFoundry.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:20.4341670Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Http/bin/Release/Steeltoe.Common.Http.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:20.4396600Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Http/bin/Release/Steeltoe.Common.Http.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:20.4539690Z   Steeltoe.Common.Logging -> /Users/runner/work/1/s/src/Common/src/Logging/bin/Release/net8.0/Steeltoe.Common.Logging.dll
2025-02-07T16:23:20.4707770Z   Steeltoe.Configuration.Encryption -> /Users/runner/work/1/s/src/Configuration/src/Encryption/bin/Release/net8.0/Steeltoe.Configuration.Encryption.dll
2025-02-07T16:23:20.6383110Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Logging/bin/Release/Steeltoe.Common.Logging.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:20.6431380Z   Successfully created package '/Users/runner/work/1/s/src/Common/src/Logging/bin/Release/Steeltoe.Common.Logging.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:35.3540650Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Management.Endpoint
2025-02-07T16:23:36.4704770Z   Steeltoe.Management.Endpoint -> /Users/runner/work/1/s/src/Management/src/Endpoint/bin/Release/net8.0/Steeltoe.Management.Endpoint.dll
2025-02-07T16:23:38.0129700Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Management.Prometheus
2025-02-07T16:23:39.6552380Z   Running ConfigurationSchemaGenerator for project: Steeltoe.Management.Tracing
2025-02-07T16:23:40.6665270Z   Steeltoe.Management.Tracing -> /Users/runner/work/1/s/src/Management/src/Tracing/bin/Release/net8.0/Steeltoe.Management.Tracing.dll
2025-02-07T16:23:40.8542820Z   Steeltoe.Management.Prometheus -> /Users/runner/work/1/s/src/Management/src/Prometheus/bin/Release/net8.0/Steeltoe.Management.Prometheus.dll
2025-02-07T16:23:43.1124420Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Endpoint/bin/Release/Steeltoe.Management.Endpoint.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:43.1220250Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Endpoint/bin/Release/Steeltoe.Management.Endpoint.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:43.7047370Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Tracing/bin/Release/Steeltoe.Management.Tracing.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:43.7090600Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Tracing/bin/Release/Steeltoe.Management.Tracing.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:43.7220930Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Prometheus/bin/Release/Steeltoe.Management.Prometheus.4.0.566-alpha-g3ce339059e.nupkg'.
2025-02-07T16:23:43.7252620Z   Successfully created package '/Users/runner/work/1/s/src/Management/src/Prometheus/bin/Release/Steeltoe.Management.Prometheus.4.0.566-alpha-g3ce339059e.snupkg'.
2025-02-07T16:23:43.7934430Z 
2025-02-07T16:23:43.7964960Z Build FAILED.
2025-02-07T16:23:43.7966270Z 
2025-02-07T16:23:43.7970400Z /Users/runner/work/1/s/src/Common/test/TestResources/FastTestConfigurations.cs(8,13): error S2342: Rename this enumeration to match the regular expression: '^([A-Z]{1,3}[a-z0-9]+)*([A-Z]{2})?s$'. (https://rules.sonarsource.com/csharp/RSPEC-2342) [/Users/runner/work/1/s/src/Common/test/TestResources/Steeltoe.Common.TestResources.csproj]
2025-02-07T16:23:43.7972500Z     0 Warning(s)
2025-02-07T16:23:43.7974410Z     1 Error(s)
2025-02-07T16:23:43.7975860Z 
2025-02-07T16:23:43.7978030Z Time Elapsed 00:01:06.54
2025-02-07T16:23:43.8187420Z 
2025-02-07T16:23:43.8208270Z ##[error]Error: The process '/Users/runner/hostedtoolcache/dotnet/dotnet' failed with exit code 1
2025-02-07T16:23:43.8214010Z ##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
2025-02-07T16:23:43.8222770Z Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
2025-02-07T16:23:43.8225780Z ##[error]Dotnet command failed with non-zero exit code on the following projects : [ '/Users/runner/work/1/s/src/Steeltoe.Management.slnf' ]
2025-02-07T16:23:43.8287370Z ##[section]Finishing: dotnet build

@gregory-paidis-sonarsource gregory-paidis-sonarsource removed their assignment Feb 10, 2025
@martin-strecker-sonarsource
Copy link
Contributor

martin-strecker-sonarsource commented Feb 11, 2025

Hello,

I looked into your project and it seems, that the error is raised when the ConfigurationSchemaGenerator.csproj project is build and/or run.

That project does it's own Roslyn based compilation here and raises its own issues, like here.

My suspicion is that during the compilation that takes place when ConfigurationSchemaGenerator is executed our analyzers run as well. This may lead to problems especially with parameterized rules (like S2342 where you can parameterize the regex used) but also in general because we orchestrate the build (e.g. to inject configuration into the analyzers). That orchestration is most likely not picked up correctly when another compilation is created by ConfigurationSchemaGenerator.

I would recommend to run ConfigurationSchemaGenerator outside of the sonar code analysis.

Note: I haven't studied what ConfigurationSchemaGenerator is and how it is used in your pipeline, so I may be wrong here. It would help, if you could shed some light on what ConfigurationSchemaGenerator is (it seems to be related to Aspire, right?).

@bart-vmware
Copy link
Author

Hi @martin-strecker-sonarsource, thanks for looking into this.

We maintain a copy of Aspire's generator because there's no NuGet package for it. It executes during build, producing a JSON schema file (that gets embedded in our output NuGet package) to enable IntelliSense in Visual Studio for appsettings.json files.

I don't think Sonar analyzers run during build of the tool, because it has no references to Sonar:

Image

I also don't think Sonar analyzers run when the tool executes (which is when other projects are built). You can verify by uncommenting the LAUNCH_DEBUGGER line in ConfigurationSchemaGenerator.csproj. Then rebuild project Steeltoe.Common and wait for the Just In Time Debugger (which can be installed using Visual Studio Installer) to pop up. Add a breakpoint in RootGenerateCommand.cs at the line:

ConfigSchemaGenerator.GenerateSchema(inputAssembly, references, outputFile);

Once the breakpoint is hit, the list of references does not include any Sonar assemblies. Disassembly of Steeltoe.Common (the inputAssembly variable) also doesn't contain any Sonar references:

Image

@martin-strecker-sonarsource
Copy link
Contributor

martin-strecker-sonarsource commented Feb 11, 2025

Thank you for the clarifications. I looked into the other successful runs and it seems indeed unrelated to ConfigurationSchemaGenerator (it looks like the 'ConfigurationSchemaGenerator' isn't even run for the project Steeltoe.Common.TestResources).

I haven't found another failing build step here and I was wondering if the failure is specific to MacOS (you mentioned Ubuntu in the issue description but I haven't found a failing build there). Have you seen the same error in other builds on other platforms?

The background is that I have a hard time to understand what can possibly be flaky here. The RegEx looks as expected and the position in code found is correct.

Can you please also link to the pipeline yaml definition for these builds. It would also help if you could turn verbose mode on and send us the logs for a failed run:

- task: SonarCloudPrepare@3
    inputs:
      SonarCloud: 'sonarcloud'
      organization: 'foo'
      scannerMode: 'dotnet'
      projectKey: 'foo_sonar-scanning-someconsoleapp'
      projectName: 'sonar-scanning-someconsoleapp'
      extraProperties: |
        sonar.verbose=true

The important logs are in the END step (i.e. SonarCloudAnalyze / “Run Code Analysis”)

The build should also be executed with verbose logs:

dotnet build -v:d

Thank you.

@bart-vmware
Copy link
Author

bart-vmware commented Feb 12, 2025

The failure on Ubuntu was months ago, those logs have been cleaned up by now.

Pipeline yaml files are at https://github.com/SteeltoeOSS/Steeltoe/tree/main/build and https://github.com/SteeltoeOSS/Steeltoe/blob/main/azure-pipelines.yml.

What's the performance impact on activating verbose logging? Given the failure occurs only once every few months.

@bart-vmware
Copy link
Author

Also, note the failures haven't occurred in the Sonar build pipeline so far, so we'd need verbose logging in all pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Type: False Positive Rule IS triggered when it shouldn't be.
Projects
None yet
Development

No branches or pull requests

4 participants