Grrrr DevOps Pipeline... premier gros crash 😤/en: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

5 June 2025

  • curprev 14:5514:55, 5 June 2025 Lli talk contribs 2,541 bytes −56 Page créée avec « </syntaxhighlight>WorkArround<syntaxhighlight lang="powershell"> $azAccountsVersion = (Get-Module -ListAvailable -Name Az.Accounts | Sort-Object Version -Descending | Select-Object -First 1).Version $dexResourceUrl = 'https://database.windows.net/' if ($azAccountsVersion -ge [Version]'5.0.0') { write-host "Az.Accounts 5.0.0 and above" $AccessTokenSecure = (Get-AzAccessToken -ResourceUrl $dexResourceUrl).Token $token = ConvertFrom-SecureString -Sec... »
  • curprev 14:5514:55, 5 June 2025 Lli talk contribs 2,597 bytes −56 Page créée avec « <syntaxhighlight lang="pwsh"> get-azaccesstoken WARNING: Upcoming breaking changes in the cmdlet 'Get-AzAccessToken' : The Token property of the output type will be changed from String to SecureString. Add the [-AsSecureString] switch to avoid the impact of this upcoming breaking change. - The change is expected to take effect in Az version : '14.0.0' - The change is expected to take effect in Az.Accounts version : '5.0.0' Note : https://aka.ms/azps-changewarnings »
  • curprev 14:5514:55, 5 June 2025 Lli talk contribs 2,653 bytes −61 Page créée avec « Here’s the warning we should have taken seriously: » Tags: Mobile edit Mobile web edit
  • curprev 14:5514:55, 5 June 2025 Lli talk contribs 2,714 bytes −59 Page créée avec « 🔧 Fix: you need to add the -AsPlainText parameter in some cases, or completely revise how the token is handled depending on the module version used. » Tags: Mobile edit Mobile web edit
  • curprev 14:5414:54, 5 June 2025 Lli talk contribs 2,773 bytes −69 Page créée avec « 🎓 Lesson learned: never ignore warnings… even if they're buried deep in the logs. »
  • curprev 14:5414:54, 5 June 2025 Lli talk contribs 2,842 bytes −73 Page créée avec « The worst part? Since everything runs in the backend, we don’t get any warnings, so no one saw it coming. It was only after the exports started failing that we realized what was going on. »
  • curprev 14:5414:54, 5 June 2025 Lli talk contribs 2,915 bytes −147 Page créée avec « And this Sunday… boom 💥: they updated the Az.Accounts module from version 4 to 5, with a major breaking change: The token is no longer returned as a String, but as a SecureString! The result? All the older functions that handle these tokens can’t read them anymore, and everything breaks. In production. 😩 » Tags: Mobile edit Mobile web edit
  • curprev 14:5414:54, 5 June 2025 Lli talk contribs 3,062 bytes −75 Page créée avec « The catch? Microsoft continuously updates their backend. So the Azure Pipeline pool that runs our PowerShell scripts gets updated automatically, without any action on our part. »
  • curprev 14:5314:53, 5 June 2025 Lli talk contribs 3,137 bytes −37 Page créée avec « And for that, '''we use the token obtained with the Get-AzAccessToken function<code>Get-AzAccessToken</code>'''.. » Tags: Mobile edit Mobile web edit
  • curprev 14:5314:53, 5 June 2025 Lli talk contribs 3,174 bytes −101 Page créée avec « We work in a fullstack DevOps team, with scripts that call SQL procedures in thousands of Azure SQL databases, whether for maintenance, exports, cleanup… you know, the usual stuff. »
  • curprev 14:5214:52, 5 June 2025 Lli talk contribs 3,275 bytes −80 Page créée avec « I knew Microsoft had given a warning… but as usual, no one really took it seriously 😅 »
  • curprev 14:5214:52, 5 June 2025 Lli talk contribs 3,355 bytes +3,355 Page créée avec « Grrrr DevOps Pipeline... first major crash 😤 »