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

📢 Azure/login v2 Release Announcement #424

Open
MoChilia opened this issue Mar 4, 2024 · 11 comments
Open

📢 Azure/login v2 Release Announcement #424

MoChilia opened this issue Mar 4, 2024 · 11 comments
Assignees

Comments

@MoChilia
Copy link
Member

MoChilia commented Mar 4, 2024

👀 What’s new in azure/login@v2?

⚠️ This is breaking change

To apply this change, please update the version of azure/login to v2 in your workflow files.

    - name: Azure Login
      uses: azure/login@v2
      with:
        client-id: ${{ secrets.AZURE_CLIENT_ID }}
        tenant-id: ${{ secrets.AZURE_TENANT_ID }}
        subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
        enable-AzPSSession: true
@MoChilia MoChilia self-assigned this Mar 4, 2024
@MoChilia MoChilia pinned this issue Mar 4, 2024
@JimSuplizio
Copy link
Member

@MoChilia
One thing that I'm noticing with the update to azure/login@v2 is a warning concerning the Az version that doesn't happen with the azure/login@v1. It's just an informational warning that's output during the Pre Az CLI login and I wanted to bring this to your attention.
Clearing azure cli accounts from the local cache.

/usr/bin/az account clear
{
Result: '/usr/share/az_11.3.1/Az.Accounts/2.17.0/Az.Accounts.psd1',
Success: true
}
Clearing azure powershell accounts from the local cache.
/usr/bin/pwsh -Command Clear-AzContext -Scope Process
/usr/bin/pwsh -Command Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue
WARNING: You're using Az version 11.3.1. The latest version of Az is 11.5.0. Upgrade your Az modules using the following commands:
Update-PSResource Az -WhatIf -- Simulate updating your Az modules.
Update-PSResource Az -- Update your Az modules.

@YanaXu
Copy link
Collaborator

YanaXu commented Apr 16, 2024

@MoChilia One thing that I'm noticing with the update to azure/login@v2 is a warning concerning the Az version that doesn't happen with the azure/login@v1. It's just an informational warning that's output during the Pre Az CLI login and I wanted to bring this to your attention. Clearing azure cli accounts from the local cache.

/usr/bin/az account clear { Result: '/usr/share/az_11.3.1/Az.Accounts/2.17.0/Az.Accounts.psd1', Success: true } Clearing azure powershell accounts from the local cache. /usr/bin/pwsh -Command Clear-AzContext -Scope Process /usr/bin/pwsh -Command Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue WARNING: You're using Az version 11.3.1. The latest version of Az is 11.5.0. Upgrade your Az modules using the following commands: Update-PSResource Az -WhatIf -- Simulate updating your Az modules. Update-PSResource Az -- Update your Az modules.

@JimSuplizio, it's because the default Azure PowerShell version on the runner is not the latest. It's not related to the Azure Login Action release.

@JimSuplizio
Copy link
Member

@MoChilia yes, but this warning wasn't happening on the v1 version, only the v2. I'm just bringing that to your attention.

@mennlo
Copy link

mennlo commented Apr 19, 2024

@MoChilia can you please let me know if the v2 tag will be updated to be the same commit as v2.1.0. It's still v2.0.0.

@ChamalGomesHSO
Copy link

ChamalGomesHSO commented Apr 22, 2024

Hi - could you confirm if the issue #403 is expected to be resolved in v2 ? We just tried a CICD workflow run with v2 and we still get the error message as specified in issue 403. i.e. We have concurrent jobs running with az login in both jobs, when one job finishes before another, the post clean up of credentials causes the other job to fail. Keep in mind both jobs run on the same self hosted runner.

@MoChilia
Copy link
Member Author

@MoChilia can you please let me know if the v2 tag will be updated to be the same commit as v2.1.0. It's still v2.0.0.

Hi @mennlo, we've updated v2 to v2.1.0. Feel free to test it out now. Last week, we were testing the tag and awaiting customer feedback to ensure there are no issues with v2.1.0. Thanks for understanding.

@MoChilia
Copy link
Member Author

Hi - could you confirm if the issue #403 is expected to be resolved in v2 ? We just tried a CICD workflow run with v2 and we still get the error message as specified in issue 403. i.e. We have concurrent jobs running with az login in both jobs, when one job finishes before another, the post clean up of credentials causes the other job to fail. Keep in mind both jobs run on the same self hosted runner.

Hi @ChamalGomesHSO, the issue with #403 is due to installing azure-cli within the job, which can cause failures in the pre cleanup step. This has been fixed since v1.6.1. Your issue seems to be unrelated to that.

It appears you have multiple runners on a single VM to run jobs in parallel, which can be risky. If you log in to different accounts in two jobs, you may switch to the wrong Azure account. We recommend using one single VM user per runner. For more details, see https://github.com/Azure/login?tab=readme-ov-file#security-hardening.

@MoChilia MoChilia unpinned this issue Apr 28, 2024
@ViltsuV
Copy link

ViltsuV commented May 8, 2024

Would be nice to have these kind of announcements in a changelog file or something.

@JackBruceShell
Copy link

Screenshot 2024-05-10 at 14 15 52

I am facing this issue when trying to change to azure/login@v2

Any help please?

@MoChilia
Copy link
Member Author

Hi @JackBruceShell, could you open a new issue with your sample workflow and runner configuration?

@JackBruceShell
Copy link

Hi @JackBruceShell, could you open a new issue with your sample workflow and runner configuration?

#442

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

No branches or pull requests

7 participants