Skip to content

Comments

Align diagnostic environment variable names with command-line options#7164

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-diagnostic-option-names
Closed

Align diagnostic environment variable names with command-line options#7164
Copilot wants to merge 2 commits intomainfrom
copilot/fix-diagnostic-option-names

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

Command-line options were renamed in #6165 (--diagnostic-output-fileprefix--diagnostic-file-prefix, --diagnostic-filelogger-synchronouswrite--diagnostic-synchronous-write), but environment variable names were not updated, creating inconsistency.

Changes

  • Renamed TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIXTESTINGPLATFORM_DIAGNOSTIC_FILE_PREFIX
  • Renamed TESTINGPLATFORM_DIAGNOSTIC_FILELOGGER_SYNCHRONOUSWRITETESTINGPLATFORM_DIAGNOSTIC_SYNCHRONOUS_WRITE
  • Updated references in TestApplication.cs and integration tests

Example

// Before (inconsistent)
environment.GetEnvironmentVariable(EnvironmentVariableConstants.TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX)

// After (matches --diagnostic-file-prefix)
environment.GetEnvironmentVariable(EnvironmentVariableConstants.TESTINGPLATFORM_DIAGNOSTIC_FILE_PREFIX)

Breaking Change

Users setting TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX or TESTINGPLATFORM_DIAGNOSTIC_FILELOGGER_SYNCHRONOUSWRITE must update to the new names.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • kijvsblobprodcus387.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet build ./src/Platform/Microsoft.Testing.Platform/Microsoft.Testing.Platform.csproj (dns block)
  • rcxvsblobprodcus328.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/testfx/testfx/.dotnet/dotnet /home/REDACTED/work/testfx/testfx/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/testfx/testfx/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/testfx/testfx/artifacts/toolset/11.0.0-beta.25617.1.txt (dns block)
    • Triggering command: /usr/bin/dotnet dotnet build ./src/Platform/Microsoft.Testing.Platform/Microsoft.Testing.Platform.csproj (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Inconsistent diagnostic option names for command line and environment variable</issue_title>
<issue_description>## Describe the bug

Diagnostic option name was renamed from --diagnostic-output-fileprefix to --diagnostic-file-prefix (#6165) but the environment variable name is still TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX.

https://github.com/dotnet/docs/blob/fde0a56ed2df06307faec6bfa9fba7ea7e687f02/docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md?plain=1#L70

This problem also exists for --diagnostic-synchronous-write option (former --diagnostic-filelogger-synchronouswrite).

The documentation is still using the old option name:
https://github.com/dotnet/docs/blob/main/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md

Steps To Reproduce

Check code for diagnostic extension and documentation:

public const string DiagnosticOutputFilePrefixOptionKey = "diagnostic-file-prefix";

public const string TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX = nameof(TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX);

https://github.com/dotnet/docs/blob/fde0a56ed2df06307faec6bfa9fba7ea7e687f02/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md?plain=1#L21

https://github.com/dotnet/docs/blob/fde0a56ed2df06307faec6bfa9fba7ea7e687f02/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md?plain=1#L31

Expected behavior

documentation and environment variable name use identical name e.g. environment name: TESTINGPLATFORM_DIAGNOSTIC_FILE_PREFIX

Actual behavior

names are mixed up in documentation and implementation

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mariam-abdulla <122357303+mariam-abdulla@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix inconsistent diagnostic option names for command line and environment variable Align diagnostic environment variable names with command-line options Jan 6, 2026
Copilot AI requested a review from mariam-abdulla January 6, 2026 10:10
Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

It's not going to affect many, but it's a breaking change and I'm not sure if we should take it at this point.

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.

Inconsistent diagnostic option names for command line and environment variable

3 participants