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

ci: upgrade az cli version #1195

Merged
merged 1 commit into from
Sep 25, 2024
Merged

ci: upgrade az cli version #1195

merged 1 commit into from
Sep 25, 2024

Conversation

arealmaas
Copy link
Collaborator

@arealmaas arealmaas commented Sep 25, 2024

Description

New version of Bicep dropped, upgrading to latest azure cli to include it.

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • Documentation is updated (either in docs-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)

Summary by CodeRabbit

  • New Features

    • Updated Azure CLI version to 2.64.0 for improved deployment capabilities.
  • Bug Fixes

    • Enhanced performance and stability with the latest Azure CLI updates.

@arealmaas arealmaas requested review from a team as code owners September 25, 2024 12:56
Copy link
Contributor

coderabbitai bot commented Sep 25, 2024

📝 Walkthrough

Walkthrough

The pull request includes updates to the Azure CLI version used in two GitHub Actions workflow files. Specifically, the environment variable AZ_CLI_VERSION has been changed from 2.61.0 to 2.64.0 in both the action-deploy-apps.yml and action-deploy-infra.yml files. This indicates an upgrade to the Azure CLI tool utilized in the deployment processes defined within these workflows.

Changes

Files Change Summary
.github/workflows/action-deploy-apps.yml, .github/workflows/action-deploy-infra.yml Environment variable AZ_CLI_VERSION updated from 2.61.0 to 2.64.0.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 4b8cd92 and c6f2bdb.

📒 Files selected for processing (2)
  • .github/workflows/action-deploy-apps.yml (1 hunks)
  • .github/workflows/action-deploy-infra.yml (1 hunks)
🔇 Additional comments not posted (6)
.github/workflows/action-deploy-infra.yml (3)

Line range hint 1-156: Summary of changes and potential impacts

The only change in this file is the update of the Azure CLI version from 2.61.0 to 2.64.0. This change aligns with the PR objective to upgrade the Azure CLI and incorporate the new version of Bicep.

Key points to consider:

  1. The change affects the entire workflow as it sets a global environment variable.
  2. The new version may include important updates and bug fixes that could benefit the workflow.
  3. It's crucial to verify compatibility with all Azure-related tasks, especially the az keyvault secret list command used in the "Fetch secret keys" step.

Overall, this change appears to be a positive upgrade, but careful testing is recommended to ensure it doesn't introduce any unexpected behavior in the workflow.


Line range hint 70-74: Verify compatibility with az keyvault secret list command

The updated Azure CLI version (2.64.0) is used in the "Fetch secret keys from source Azure Key Vault" step. Please ensure that the az keyvault secret list command and its output format remain compatible with this new version.

Run the following script to verify the command's behavior:

#!/bin/bash
# Description: Verify az keyvault secret list command behavior

# Install Azure CLI 2.64.0
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
sudo apt-get update
sudo apt-get install -y azure-cli=2.64.0-1~focal

# Check the command's help output for any changes
az keyvault secret list --help

# If possible, run a test command against a non-production key vault
# az keyvault secret list --vault-name <test-vault-name> --query "[].name" -o json

This will help confirm that the command's behavior and output format remain consistent with the workflow's expectations.


4-4: Approved: Azure CLI version update

The update of AZ_CLI_VERSION to 2.64.0 aligns with the PR objective to upgrade the Azure CLI version. This change is likely to include important updates and bug fixes.

To ensure this change doesn't introduce any issues:

  1. Verify that this version is compatible with all Azure-related tasks in the workflow.
  2. Check if this version includes the new Bicep version mentioned in the PR objectives.
  3. Review the Azure CLI changelog for any breaking changes or new features that might affect the workflow.

You can use the following script to check the Bicep version included in this Azure CLI version:

This will help confirm if the new Azure CLI version includes the required Bicep update.

.github/workflows/action-deploy-apps.yml (3)

Line range hint 1-324: Summary: Azure CLI version update is beneficial, consider thorough testing

The update to Azure CLI version 2.64.0 is a positive change that keeps your deployment tooling current. This aligns well with the PR objective of incorporating the new version of Bicep.

Key points:

  1. The change is minimal and focused, which reduces the risk of unintended side effects.
  2. The overall structure and logic of the workflow remain intact.
  3. This update may introduce new features or improvements that could potentially optimize your workflow.

Recommendations:

  1. Ensure thorough testing of the workflow with the new Azure CLI version across all environments.
  2. Review the Azure CLI 2.64.0 changelog for any new features or changes that might benefit your deployment process.
  3. Consider updating any documentation or team knowledge bases to reflect this change.

This update sets a good precedent for keeping dependencies current, which is crucial for maintaining a robust and secure CI/CD pipeline.


Line range hint 1-324: Consider reviewing Azure CLI usage for potential optimizations

While the Azure CLI version update is the primary change, it's worth reviewing the Azure CLI commands used throughout the workflow to ensure they're utilizing the latest best practices and any new features introduced in version 2.64.0.

Here are a few suggestions to consider:

  1. Review the az containerapp job start command used in the "Start migration job" step. Check if there are any new options or improvements in the latest Azure CLI version that could enhance this step.

  2. In the "Verify migration" and "Verify deployment" steps, you're using custom shell scripts (containerAppJobVerifier.sh and revisionVerifier.sh). Consider reviewing these scripts to ensure they're compatible with and taking advantage of any new Azure CLI features.

  3. If any new Azure CLI features in version 2.64.0 could simplify or improve parts of your workflow, consider incorporating them.

To help with this review, you can run the following command to list all Azure CLI commands used in the workflow:

#!/bin/bash
# List all Azure CLI commands used in the workflow
grep -n "az " .github/workflows/action-deploy-apps.yml

This will help you identify specific areas where you might want to review and potentially optimize your Azure CLI usage.


3-3: LGTM! Verify changelog and test the workflow.

The update of the Azure CLI version from 2.61.0 to 2.64.0 is a good practice to keep the tooling up-to-date. This change aligns with the PR objective of upgrading the Azure CLI to incorporate the new version of Bicep.

To ensure a smooth transition:

  1. Please review the changelog for Azure CLI version 2.64.0 to understand any breaking changes or new features that might affect your workflow.
  2. Test the workflow thoroughly with this new version to catch any potential issues early.

Let's verify if this version change is consistent throughout the file:

This will help us ensure that all uses of Azure CLI in this workflow are updated to version 2.64.0.

✅ Verification successful

Azure CLI version update is consistent

The Azure CLI version has been correctly updated to 2.64.0 in .github/workflows/action-deploy-apps.yml.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify Azure CLI version consistency
grep -n "azcliversion:" .github/workflows/action-deploy-apps.yml

Length of output: 259


Script:

#!/bin/bash
# Verify Azure CLI version consistency
grep -n "AZ_CLI_VERSION:" .github/workflows/action-deploy-apps.yml

Length of output: 93


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

sonarcloud bot commented Sep 25, 2024

@arealmaas arealmaas merged commit 49012ec into main Sep 25, 2024
22 checks passed
@arealmaas arealmaas deleted the ci/upgrade-az-cli branch September 25, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants