-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
AzurePowerShell@4: blob property set stopped working #14409
Comments
@pkgw Have you tried the above script locally in Windows PowerShell ? |
@20shivangi I have tried it on PowerShell on Linux. It works fine with Az 5.5.0, as well as some of the older versions I've used before. And again, it used to work in the Azure Pipelines environment, up until about a month or two ago. |
@pkgw I got that the script was working before. If so, then problem is with command and we have to raise bug on AzurePowerShell team |
Sorry if I was unclear. Yes, it works for me locally now, on PowerShell on Linux. I could spin up a Windows VM if you want to have confirmation about whether it works specifically on Windows. |
Can you print object values for this object ? |
Whee, pushing straight to `master` to debug CI issues: microsoft/azure-pipelines-tasks#14409
With this powershell code: I get blank output for the properties:
(caveat that I'm not super familiar with PowerShell — is it sufficient to just include the |
you need to echo value of this $blob.ICloudBlob.Properties
|
Az 5.5.0 is available on windows agent now.
Here is the output
Please confirm if its resolved for you as well |
Hi — I still see the same problem. I changed my PowerShell script to add the
edit: log link — logs are public |
Here's the log output from a debugging run: link. I'll copy/paste the contents below for posterity. The content-type of the file is currently Log contents
|
I followed exact similar steps as yours but its not reproing for me. I think service connection which is being used in task doesn't have access to storage container or expired. |
Not obvious to me if there's an auth problem from the logging info, but I'll try to explore the possibility. |
I tried adding a specific new Blob RBAC role for the service principal and that seems to have fixed the problem! Thank you for your help in figuring out what was going on. I would say that there's a "bug" here in the sense that the cause of the failure was quite hard to pin down, but I doubt that edit BTW, my guess is that this stopped working beacuse the service principal hit the two-year expiration date mentioned in the docs, — I think that timeline would be about right. |
@pkgw yes you are right. As I stated earlier as well service principal might have expired. Since this task just connects to Azure and make available Az modules. And every user might have different Azure Powershell Script written. its difficult to fix it in Task. Since its resolved for you I am closing this issue |
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AzurePowerShell@4
Environment
Server - Azure Pipelines or TFS on-premises?
Agent - Hosted or Private:
Issue Description
I have a build task that modifies the content-type of a blob on an Azure Storage Account. The (abbreviated) definition is:
This used to work, and it stopped working at some point in the past month or two. Nothing in my configuration has changed in that time.
Error logs
The only output of interest is the error report:
The text was updated successfully, but these errors were encountered: