microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.72k stars 866 forks source link

[BUG]: Variables with equals in the name are null at the task level but are fine at env: level on win os 2022 #4931

Open TrentBie opened 2 months ago

TrentBie commented 2 months ago

What happened?

Migrated our onprem ados agents to windows server 2022 and a task started to fail with null value issues

Versions

Agent version 3.242.1 - Windows 2022 OS

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Azure DevOps Server Version (if applicable)

Azure Devops Server 2022,1 20240130.2

Operation system

Windows 2022 OS

Version controll system

GIT

Relevant log output

Initialize Job
[SPEC_METADATA[?(@_NAME=='CLIENTID')]_VALUE] --> [12345689]
                [SPEC_METADATA[?(@_NAME=='CLIENTSECRET')]_VALUE] --> [jnH8Q~uHASs0hLk3WXLqg1CvE3umheKHcR-JDbCT]
                [SPEC_METADATA[?(@_NAME=='SCOPES')]_VALUE] --> [api://NautilusApi-tst/.default]
                [SPEC_METADATA[?(@_NAME=='TOKENURL')]_VALUE] --> [https://login.microsoftonline.com/12345789/oauth2/v2.0/token]

At Task Level
##[debug]spec.metadata[?(@.name=='scopes')].value=undefined
##[debug]spec.metadata[?(@.name=='tokenURL')].value=undefined
##[debug]spec.metadata[?(@.name=='clientSecret')].value=undefined
vmapetr commented 2 months ago

Hi @TrentBie thank you for your report! This looks like an external issue related on prem. Could you please confirm that the same issue happens on agent versions before 3.242.1, like 3.240.1 ?

TrentBie commented 2 months ago

It did but only on server 2022 OS Here some logs

So we can see the correct value at the initialize job [SPEC_METADATA[?(@_NAME=='CLIENTSECRET')]_VALUE] --> [jnH8Q~uHASs0hLk3WXLqg1CvE3umheKHcR-JDbC1]

But at the Task level the same variable is null @.***=='clientSecret')].value=undefined

Trent Bielejeski Senior DevOps Engineer

Bell Bank 3100 13th Avenue South | Fargo, ND 58103 Phone 701.237.2839 | Mobile 218.304.1093 @.**@.> | www.bell.bankhttps://bell.bank/ | Member FDIC A Local and National Award-Winning Companyhttps://bell.bank/awards

Bell cares about safeguarding your information. Never email or text documents that contain personal or sensitive information. Please contact me to discuss possible options I can provide to securely upload documentation that may contain personal information.

From: Maksim Petrov @.> Sent: Monday, August 12, 2024 6:34 AM To: microsoft/azure-pipelines-agent @.> Cc: Trent Bielejeski @.>; Mention @.> Subject: Re: [microsoft/azure-pipelines-agent] [BUG]: Variables with equals in the name are null at the task level but are fine at env: level on win os 2022 (Issue #4931)

Hi @TrentBie [github. com] thank you for your report! This looks like an external issue related on prem. Could you please confirm that the same issue happens on agent versions before 3. 242. 1, like 3. 240. 1 [github. com] ? — Reply to this

Hi @TrentBie [github.com]https://urldefense.com/v3/__https:/github.com/TrentBie__;!!A251HDo3!SPn66lgeiYj6hmVrF55qFEGGDSdUAMSvmASeJx9yKH6OAfqRM9w64LDZ5rxwMOJV4FttIrxPnZk0SAkWPzrJIoosiTHj$ thank you for your report! This looks like an external issue related on prem. Could you please confirm that the same issue happens on agent versions before 3.242.1, like 3.240.1 [github.com]https://urldefense.com/v3/__https:/github.com/microsoft/azure-pipelines-agent/releases/tag/v3.240.1__;!!A251HDo3!SPn66lgeiYj6hmVrF55qFEGGDSdUAMSvmASeJx9yKH6OAfqRM9w64LDZ5rxwMOJV4FttIrxPnZk0SAkWPzrJIjD_IOVQ$ ?

— Reply to this email directly, view it on GitHub [github.com]https://urldefense.com/v3/__https:/github.com/microsoft/azure-pipelines-agent/issues/4931*issuecomment-2283728326__;Iw!!A251HDo3!SPn66lgeiYj6hmVrF55qFEGGDSdUAMSvmASeJx9yKH6OAfqRM9w64LDZ5rxwMOJV4FttIrxPnZk0SAkWPzrJIjJdEJ1L$, or unsubscribe [github.com]https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4HIW3SUT46VT6C3BR27BULZRCMR7AVCNFSM6AAAAABMEP2CC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTG4ZDQMZSGY__;!!A251HDo3!SPn66lgeiYj6hmVrF55qFEGGDSdUAMSvmASeJx9yKH6OAfqRM9w64LDZ5rxwMOJV4FttIrxPnZk0SAkWPzrJIuUNMVWZ$. You are receiving this because you were mentioned.Message ID: @.**@.>>

NOTICE: The information in this e-mail and any attachments is for the sole use by the addressee and may contain information that is privileged, confidential or exempt from disclosure. If you are not the addressee, any review, use, retention or distribution of this e-mail or its attachments is prohibited and may be a violation of law. If you have received this e-mail in error, please notify the sender immediately and permanently delete this e-mail and all attachments. Any opinions or comments are personal to the sender and may not represent those of Bell Bank. This e-mail and its attachments neither constitute an agreement to conduct transactions by electronic means nor create a legally binding contract or enforceable obligation in the absence of a fully signed written agreement.