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

chore(deps): revert upgrading version for resource microsoft.web/sites #1482

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

arealmaas
Copy link
Collaborator

@arealmaas arealmaas commented Nov 18, 2024

This reverts commit f9ccc96. #1479

The request in the ARM deployment towards this resource seem to time out 🤔

{
    "status": "Failed",
    "error": {
        "code": "RequestTimeout",
        "message": "The operation timed out and could not be completed. Please retry the action or try again later.",
        "details": [
            {
                "message": "The operation timed out and could not be completed. Please retry the action or try again later."
            },
            {
                "code": "RequestTimeout"
            },
            {}
        ]
    }
}

Description

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 the API version for the web application and Slack Notifier function app, enhancing compatibility with Azure's latest offerings.
    • Introduced structured parameters for the Slack Notifier, ensuring valid configurations for resources.
  • Bug Fixes

    • Addressed potential issues by aligning the function app's properties with the updated API version.
  • Documentation

    • Improved clarity on resource configurations and naming conventions within the Bicep templates.

@arealmaas arealmaas requested review from a team as code owners November 18, 2024 12:10
Copy link
Contributor

coderabbitai bot commented Nov 18, 2024

📝 Walkthrough

Walkthrough

The pull request updates the Azure resource versions for two Bicep templates: one for a web application and another for a Slack Notifier function app. The webApp resource version is changed from 2024-04-01 to 2023-12-01, while the functionApp resource in the Slack Notifier template is similarly updated. Additionally, the Slack Notifier template introduces a new SKU parameter and defines various properties for the function app, ensuring compliance with Azure's naming conventions and configurations.

Changes

File Change Summary
.azure/modules/functionApp/appSettings.bicep Resource version updated from 2024-04-01 to 2023-12-01 for the webApp resource.
.azure/modules/functionApp/slackNotifier.bicep - Resource version updated from 2024-04-01 to 2023-12-01 for the functionApp resource.
- Parameter sku added.

Possibly related PRs

Suggested reviewers

  • oskogstad
  • MagnusSandgren

Warning

Rate limit exceeded

@arealmaas has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c10ba00 and 7eed3e9.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c10ba00 and 7eed3e9.

📒 Files selected for processing (2)
  • .azure/modules/functionApp/appSettings.bicep (1 hunks)
  • .azure/modules/functionApp/slackNotifier.bicep (1 hunks)
🔇 Additional comments (5)
.azure/modules/functionApp/appSettings.bicep (2)

10-12: Version downgrade aligns with PR objective

The change from 2024-04-01 to 2023-12-01 for the webApp resource aligns with the PR's goal of reverting the version to resolve deployment timeout issues.


Line range hint 14-18: Potential version mismatch between resources

The siteconfig resource is still using version 2024-04-01 while the parent webApp resource has been downgraded to 2023-12-01. This version mismatch might cause deployment issues.

Consider applying this fix to maintain version consistency:

-resource siteconfig 'Microsoft.Web/sites/config@2024-04-01' = {
+resource siteconfig 'Microsoft.Web/sites/config@2023-12-01' = {
   parent: webApp
   name: 'appsettings'
   properties: union(currentAppSettings, appSettings)
}
.azure/modules/functionApp/slackNotifier.bicep (3)

100-100: LGTM: Version downgrade aligns with PR objectives.

The downgrade of the functionApp resource version from '2024-04-01' to '2023-12-01' is appropriate given the timeout issues encountered during ARM deployment.


100-100: 🛠️ Refactor suggestion

Consider downgrading applicationServicePlan version for consistency.

While the functionApp resource version has been downgraded, the applicationServicePlan resource is still using version '2024-04-01'. Consider downgrading it as well to maintain version consistency and prevent potential compatibility issues.

Apply this diff:

-resource applicationServicePlan 'Microsoft.Web/serverfarms@2024-04-01' = {
+resource applicationServicePlan 'Microsoft.Web/serverfarms@2023-12-01' = {

Likely invalid or redundant comment.


100-100: Verify version consistency across Bicep templates.

Let's ensure all related Bicep templates are using consistent resource versions.

✅ Verification successful

No Bicep templates found for version comparison

The verification process shows that there are no .bicep files in the codebase that could be found by our search. This suggests that either:

  1. The file .azure/modules/functionApp/slackNotifier.bicep is newly added
  2. Or the file path provided in the review is incorrect

Since we cannot find any other Bicep templates to compare versions with, there's no risk of version inconsistency at this time.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for inconsistent resource versions across Bicep templates

# Search for Microsoft.Web/sites resource versions
echo "Checking Microsoft.Web/sites versions:"
rg "Microsoft\.Web/sites@[0-9-]+" --type bicep

# Search for Microsoft.Web/serverfarms resource versions
echo "Checking Microsoft.Web/serverfarms versions:"
rg "Microsoft\.Web/serverfarms@[0-9-]+" --type bicep

Length of output: 349


Script:

#!/bin/bash
# Description: Check for inconsistent resource versions across Bicep templates

# Search for Microsoft.Web/sites resource versions without file type restriction
echo "Checking Microsoft.Web/sites versions:"
rg "Microsoft\.Web/sites@[0-9-]+" -g "*.bicep"

# Search for Microsoft.Web/serverfarms resource versions
echo "Checking Microsoft.Web/serverfarms versions:"
rg "Microsoft\.Web/serverfarms@[0-9-]+" -g "*.bicep"

Length of output: 587


Script:

#!/bin/bash
# First, let's find all Bicep files
echo "Finding all .bicep files:"
fd "\.bicep$"

# Then search for Microsoft.Web/sites resource versions in those files
echo -e "\nChecking Microsoft.Web/sites versions:"
fd "\.bicep$" --exec grep -l "Microsoft.Web/sites@"

# And Microsoft.Web/serverfarms versions
echo -e "\nChecking Microsoft.Web/serverfarms versions:"
fd "\.bicep$" --exec grep -l "Microsoft.Web/serverfarms@"

Length of output: 384


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.

@arealmaas arealmaas merged commit 8468720 into main Nov 18, 2024
20 checks passed
@arealmaas arealmaas deleted the chore/revert-slack-notifier-version branch November 18, 2024 13:33
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

Successfully merging this pull request may close these issues.

2 participants