Skip to content

{ARM} Update azure-mgmt-resource SDK to latest#31387

Merged
zhoxing-ms merged 2 commits intoAzure:devfrom
anthony-c-martin:ant/bump
May 8, 2025
Merged

{ARM} Update azure-mgmt-resource SDK to latest#31387
zhoxing-ms merged 2 commits intoAzure:devfrom
anthony-c-martin:ant/bump

Conversation

@anthony-c-martin
Copy link
Member

@anthony-c-martin anthony-c-martin commented Apr 29, 2025

Related command
az deployment ...

Description
Updates the SDK version for the azure-mgmt-resource SDK, without changing any API versions used.

Testing Guide
This PR relies on the existing tests.


This checklist is used to make sure that common guidelines for a pull request are followed.

As part of this change, I had to fix up a bunch of content-length headers that had been saved incorrectly by the test framework, without altering the recordings. I believe this was necessary because of Azure/azure-sdk-for-python#20888 which has been incorporated into this latest SDK. I used the following Python code to do this:

import os
import yaml
import glob

from yaml import CDumper as Dumper
from yaml import CLoader as Loader

def main():
    recordings_base = os.path.abspath(os.path.join(os.path.dirname(__file__), './src/azure-cli/azure/cli/command_modules'))

    # Recursively read all files in the directory    
    for file_path in glob.glob(recordings_base + '/**/recordings/**/*.yaml', recursive=True):
        has_changes = False

        # Read the content of the YAML file
        with open(file_path, 'r', encoding='utf-8') as f:
            content = yaml.load(f, Loader=Loader)

        for interaction in content['interactions']:
            request = interaction['request']
            response = interaction['response']

            if (request['body'] is not None and 'string' in request['body'] and
                request['headers'] is not None and 'content-length' in request['headers']):

                content_length = int(request['headers']['content-length'][0])
                if len(request['body']['string']) != content_length:
                    print(f"file: {file_path}, request - expected: {content_length}, actual: {len(request['body']['string'])}")
                    request['headers']['content-length'] = [str(len(request['body']['string']))]
                    has_changes = True

            if (response['body'] is not None and 'string' in response['body'] and
                response['headers'] is not None and 'content-length' in response['headers']):

                content_length = int(response['headers']['content-length'][0])
                if len(response['body']['string']) != content_length:
                    print(f"file: {file_path}, response - expected: {content_length}, actual: {len(response['body']['string'])}")
                    response['headers']['content-length'] = [str(len(response['body']['string']))]
                    has_changes = True

        if has_changes:
            print(f"Changes detected in file: {file_path}")
            with open(file_path, 'w', encoding='utf-8') as f:
                 yaml.dump(content, f, Dumper=Dumper)

if __name__ == "__main__":
    main()

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Apr 29, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️latest
️✔️3.12
️✔️3.9

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Apr 29, 2025

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 29, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@zhoxing-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@anthony-c-martin anthony-c-martin changed the title Bump resources SDK {ARM} Update azure-mgmt-resource SDK to latest Apr 30, 2025
@anthony-c-martin
Copy link
Member Author

@zhoxing-ms please could you re-run CI?

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 30, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@anthony-c-martin
Copy link
Member Author

@yonzhan please could you re-run validation?

@yonzhan
Copy link
Collaborator

yonzhan commented May 2, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@anthony-c-martin
Copy link
Member Author

@yonzhan please could you re-run validation?

@yonzhan
Copy link
Collaborator

yonzhan commented May 3, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@anthony-c-martin
Copy link
Member Author

@zhoxing-ms please could you review this change?

The remaining CI errors are all because of an unrelated build break, and not because of changes made in this PR - I believe #31399 contains the fix.

@zhoxing-ms
Copy link
Contributor

@anthony-c-martin Known issue. @kamperiadis Please note that the testing issue of app service module has blocked a amount of other PRs, could you please resolve it as soon as possible?

@anthony-c-martin
Copy link
Member Author

@yonzhan please could you re-run validation?

@yonzhan
Copy link
Collaborator

yonzhan commented May 7, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@zhoxing-ms zhoxing-ms merged commit e5f87ec into Azure:dev May 8, 2025
49 checks passed
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.

5 participants