Skip to content

[AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696942 - #48552

Open
azure-sdk-automation[bot] wants to merge 8 commits into
mainfrom
sdkauto/azure-mgmt-relationships-6693387
Open

[AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696942#48552
azure-sdk-automation[bot] wants to merge 8 commits into
mainfrom
sdkauto/azure-mgmt-relationships-6693387

Conversation

@azure-sdk-automation

@azure-sdk-automation azure-sdk-automation Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Configurations: 'specification/relationships/resource-manager/Microsoft.Relationships/Relationships/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: 'e9b8d33567e9422a09711667279fe178fada51a1' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6696942 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://azsdk-releaseplan-dashboard-hveph5aqhhcfhtgu.westus-01.azurewebsites.net/?releaseplan=36017 Submitted by: ningyixue@microsoft.com

…ft.Relationships/Relationships/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: '2831f359f052615c26675394fd3939cf6ca92a3b' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6693387 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copilot AI balanced review requested due to automatic review settings August 12, 2026 19:36
@azure-sdk-automation azure-sdk-automation Bot added the auto-release When merged to main, release pipelines for this PR's changed packages trigger automatically. label Aug 12, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Updates the azure-mgmt-relationships package to the newer 2026-03-01-preview API surface, adding new relationship operations/models and refreshing generated assets.

Changes:

  • Bump default API version to 2026-03-01-preview and add new ContainsRelationships operations plus list_by_parent for existing relationship types.
  • Introduce types.py TypedDict request/response shapes and add api_version_validation gating for new methods.
  • Update packaging/runtime metadata (Python >=3.10, version 1.0.0b2), and refresh generated samples/tests.

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sdk/relationships/azure-mgmt-relationships/tsp-location.yaml Points generation to the new swagger/spec path + commit.
sdk/relationships/azure-mgmt-relationships/pyproject.toml Drops Python 3.9 support and raises requires-python to >=3.10.
sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_service_group_member_relationships_operations_async.py Updates payload shape and adds list_by_parent test (async).
sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_service_group_member_relationships_operations.py Updates payload shape and adds list_by_parent test (sync).
sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_dependency_of_relationships_operations_async.py Updates payload shape and adds list_by_parent test (async).
sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_dependency_of_relationships_operations.py Updates payload shape and adds list_by_parent test (sync).
sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_contains_relationships_operations_async.py Adds generated ContainsRelationships tests (async, skipped).
sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_contains_relationships_operations.py Adds generated ContainsRelationships tests (sync, skipped).
sdk/relationships/azure-mgmt-relationships/generated_samples/service_group_member_relationships_list_by_parent.py Adds sample for new list_by_parent operation.
sdk/relationships/azure-mgmt-relationships/generated_samples/service_group_member_relationships_get.py Updates sample for new api-version and required subscription_id.
sdk/relationships/azure-mgmt-relationships/generated_samples/service_group_member_relationships_delete.py Updates sample for new api-version and required subscription_id.
sdk/relationships/azure-mgmt-relationships/generated_samples/service_group_member_relationships_create_or_update.py Updates sample payload shape and required subscription_id.
sdk/relationships/azure-mgmt-relationships/generated_samples/operations_list_maximum_set_gen.py Updates sample for new api-version and required subscription_id.
sdk/relationships/azure-mgmt-relationships/generated_samples/dependency_of_relationships_list_by_parent.py Adds sample for new list_by_parent operation.
sdk/relationships/azure-mgmt-relationships/generated_samples/dependency_of_relationships_get.py Updates sample for new api-version and required subscription_id.
sdk/relationships/azure-mgmt-relationships/generated_samples/dependency_of_relationships_delete.py Updates sample for new api-version and required subscription_id.
sdk/relationships/azure-mgmt-relationships/generated_samples/dependency_of_relationships_create_or_update.py Updates sample for new api-version and required subscription_id.
sdk/relationships/azure-mgmt-relationships/generated_samples/contains_relationships_list_by_subscription.py Adds sample for new ContainsRelationships subscription list.
sdk/relationships/azure-mgmt-relationships/generated_samples/contains_relationships_list_by_resource_group.py Adds sample for new ContainsRelationships RG list.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/types.py Adds public TypedDict shapes for request bodies.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/operations/_operations.py Adds new request builders + operations classes/methods and API version validation.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/operations/init.py Exposes ContainsRelationshipsOperations in sync operations namespace.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/models/_models.py Adds ContainsRelationship model and updates relationship property models (V2).
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/models/init.py Exports new/renamed models.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/aio/operations/_operations.py Async equivalents for new operations/builders and API version validation.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/aio/operations/init.py Exposes ContainsRelationshipsOperations in async operations namespace.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/aio/_configuration.py Makes subscription_id required and bumps default api-version (async).
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/aio/_client.py Requires subscription_id and wires contains_relationships (async).
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_version.py Version bump to 1.0.0b2.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_validation.py Adds api_version_validation decorator used by new ops.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/serialization.py Adds duration numeric formats + deserializer fast path and Self import handling.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/model_base.py Adds faster XML init path, duration formats, and rest_field deserializer hook.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_configuration.py Makes subscription_id required and bumps default api-version (sync).
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_client.py Requires subscription_id and wires contains_relationships (sync).
sdk/relationships/azure-mgmt-relationships/apiview-properties.json Updates APIView mapping for new operations/models.
sdk/relationships/azure-mgmt-relationships/api.metadata.yml Adds API MD metadata for the generated surface.
sdk/relationships/azure-mgmt-relationships/api.md Adds generated API review file for the new surface.
sdk/relationships/azure-mgmt-relationships/_metadata.json Bumps API version/commit/emitter metadata.
sdk/relationships/azure-mgmt-relationships/README.md Updates Python support statement and Entra auth wording.
sdk/relationships/azure-mgmt-relationships/CHANGELOG.md Adds 1.0.0b2 section but leaves placeholder text.
Suppressed comments (2)

sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_dependency_of_relationships_operations.py:1

  • This recorded test calls list_by_parent with resource_uri=\"str\", which will generate an invalid ARM path and is very likely to fail (or record a useless 404). Use a valid resource ID (e.g., derived from the preparer-created resource group and subscription) to ensure the test exercises the operation successfully and produces meaningful recordings.
    sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_dependency_of_relationships_operations_async.py:1
  • This recorded async test calls list_by_parent with resource_uri=\"str\", which will generate an invalid ARM path and is very likely to fail (or record a useless 404). Use a real ARM resource ID (typically built from subscription + resource group + provider/resource) so the test validates paging and response shape against a successful call.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread sdk/relationships/azure-mgmt-relationships/CHANGELOG.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor
[Pilot] PR Pipeline Failure Analysis

A CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green.

What failed

The python - pullrequest pipeline (build #6693446) failed in the Build Analyze stage (job logs) during changelog verification for azure-mgmt-relationships. The changelog entry for version 1.0.0b2 exists and has a valid date (2026-08-12), but its body only contains the placeholder text tool can't generate changelog for this release, please update manually. — it is missing at least one of the required sections: Features Added, Breaking Changes, Bugs Fixed, or Other Changes.

Recommended next steps

  • Edit sdk/relationships/azure-mgmt-relationships/CHANGELOG.md and replace the placeholder in the 1.0.0b2 entry with a real description under at least one of the required section headings (e.g., ### Features Added).
  • See the changelog guidelines: https://aka.ms/azsdk/guideline/changelogs
  • See the CI troubleshooting guide: https://aka.ms/ci-fix
  • Push new commits to address the failures; this comment updates automatically on the next failing run.
Raw pipeline analysis (azsdk ci analyze)
Analyzing pipeline https://github.com/Azure/azure-sdk-for-python/pull/48552...
Getting failed workflow runs for commit 43fb6ac137f39f2f1dd9928bb478978753a12f8b in Azure/azure-sdk-for-python
Build: 6693446 Project: public PipelineUrl: https://dev.azure.com/azure-sdk/public/_build/results?buildId=6693446
--------------------------------------------------------------------------------
Failed Tasks
--------------------------------------------------------------------------------
### Errors:
Verifying changelog for azure-mgmt-relationships
Found the following change log entry for version '1.0.0b2' in [sdk/relationships/azure-mgmt-relationships/CHANGELOG.md].
-----
## 1.0.0b2 (2026-08-12)

tool can't generate changelog for this release, please update manually.

-----
[debug]Verifying as a release build because the changelog entry has a valid date.
##[error]The changelog entry did not contain any of the recommended sections (Features Added, Breaking Changes, Bugs Fixed, Other Changes), please add at least one. See https://aka.ms/azsdk/guideline/changelogs for more info.
##[error]PowerShell exited with code '1'.

### Pipeline: https://dev.azure.com/azure-sdk/public/_build/results?buildId=6693446

Failing checks on the pull request:
  python - pullrequest [FAILURE]
  python - pullrequest (Build Analyze) [FAILURE]

Copilot detected the failing pipeline and generated the analysis above. To have it attempt a fix automatically, reply with @copilot please fix the failing pipeline on this PR.

Generated by Pipeline Analysis - Next Steps · 19 AIC · ⌖ 6.19 AIC · ⊞ 6.6K ·

@ChenxiJiang333

Copy link
Copy Markdown
Member

Hi, the new api version 2026-03-01-preview seems not deployed on portal yet, we recommend making sure the api version to be deployed before releasing the SDK, though we won't block the release in self-serve release flow.

Copilot AI review requested due to automatic review settings August 13, 2026 02:32
@ChenxiJiang333 ChenxiJiang333 added the mgmt-review-needed PR for Mgmt SDK is ready to review label Aug 13, 2026

@ChenxiJiang333 ChenxiJiang333 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi ningyixue-ms, we have approved the PR. You can move on to merge and release though the action suggestion in Release Plan.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.

Suppressed comments (4)

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_client.py:74

  • Making subscription_id required is not propagated to the package metadata or README: pyproject.toml:82 still has no_sub = true, which causes the packaging template to emit the credential-only constructor shown at README.md:39. That documented call now raises TypeError. Remove no_sub = true and regenerate/update the README so it supplies the subscription ID.
        subscription_id: str,

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:7

  • The release note says only “Regular release,” but this release raises the minimum Python version to 3.10 and makes subscription_id a required client constructor argument. These user-facing breaking changes need to be disclosed so existing users know how to migrate.
### Other Changes

  - Regular release

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_client.py:55

  • Use “a UUID,” not “an UUID.”

This issue also appears on line 74 of the same file.

    :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/aio/_client.py:55

  • Use “a UUID,” not “an UUID.”
    :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.

@github-actions

Copy link
Copy Markdown
Contributor

Management SDK PR review

Severity Finding Location Evidence Rule Remediation
Blocking README client example omits required subscription_id argument sdk/relationships/azure-mgmt-relationships/README.md (Authentication section) _client.py __init__ requires credential, subscription_id (no default) and base_url, but the README snippet only calls RelationshipsMgmtClient(credential=DefaultAzureCredential()), which would raise a TypeError for missing subscription_id if run as written. README CODE SNIPPETS Update the README example to include a subscription_id argument, e.g. RelationshipsMgmtClient(credential=DefaultAzureCredential(), subscription_id="00000000-0000-0000-0000-000000000000").
Suggestion no_sub = true set even though subscription_id is present in the client signature sdk/relationships/azure-mgmt-relationships/pyproject.toml _client.py.__init__ includes subscription_id as a required positional parameter, but pyproject.toml sets no_sub = true, which normally indicates the client has no subscription parameter. CLIENT SIGNATURE Confirm whether no_sub = true is intentional for this client; if subscription_id is required, consider setting no_sub = false to keep metadata consistent with the generated signature.

Unverified checks

Unverified checks: None.

Review summary

Reviewed package sdk/relationships/azure-mgmt-relationships (PR #48552, first revision 43fb6ac137f39f2f1dd9928bb478978753a12f8b → latest revision 97040fdd5441b05389ddd8abb785d67482df1266). Checks completed: API version drift (unchanged at 2026-03-01-preview), _version.py/CHANGELOG.md version consistency (1.0.0b2 in both), preview API version vs. beta SDK version alignment, changelog release date (2026-08-12, not excessively future-dated), pyproject.toml stability flags (is_stable = false, "Development Status :: 4 - Beta" classifier present, consistent with the b2 version), client __init__ signature order (credential, subscription_id, base_url), client name consistency across _client.py, README.md, and pyproject.toml (RelationshipsMgmtClient), and README code snippet accuracy. This review is advisory only.

Copilot AI review requested due to automatic review settings August 13, 2026 03:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.

Suppressed comments (2)

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_client.py:74

  • Making subscription_id required breaks the documented authentication snippet: README.md:39 still constructs this client with only credential, which now raises TypeError. Update that snippet to supply a subscription ID, and disclose this constructor change in the release notes so existing beta users can migrate.
        subscription_id: str,

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:7

  • This release raises requires-python from 3.9 to 3.10, but the changelog does not disclose that Python 3.9 support is being dropped. Add an explicit migration note, as done for other packages (for example, sdk/core/azure-core/CHANGELOG.md:27-30).
  - Regular release

…ft.Relationships/Relationships/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: 'ad48a6c4c835ed1a4242ff178cdeb32a74c5c6a3' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6696107 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copilot AI review requested due to automatic review settings August 13, 2026 03:44
@azure-sdk-automation azure-sdk-automation Bot changed the title [AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6693387 [AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696107 Aug 13, 2026
@ChenxiJiang333 ChenxiJiang333 removed the mgmt-review-needed PR for Mgmt SDK is ready to review label Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.

Suppressed comments (4)

sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_dependency_of_relationships_operations.py:1

  • This newly added test exercises the paging call but doesn’t assert anything about the result, so regressions (e.g., empty iteration due to deserialization issues) may still pass. Add at least minimal assertions (e.g., isinstance(result, list) and/or validate expected fields when recordings provide stable data) so the test meaningfully protects list_by_parent.
    sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/operations/_operations.py:942
  • For pagination (nextLink) requests in list_by_parent, the code reuses _headers from kwargs without ensuring an Accept header is present. The first page request uses the request builder, which sets Accept, but that header is not propagated back into _headers, so subsequent page requests may omit Accept. Fix by explicitly setting a default Accept: application/json into _headers at method entry (or in the nextLink branch) so both initial and subsequent requests include consistent headers.
            else:
                # make call to next link with the client's api-version
                _parsed_next_link = urllib.parse.urlparse(next_link)
                _next_request_params = case_insensitive_dict(
                    {
                        key: [urllib.parse.quote(v) for v in value]
                        for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
                    }
                )
                _next_request_params["api-version"] = self._config.api_version
                _request = HttpRequest(
                    "GET",
                    urllib.parse.urljoin(next_link, _parsed_next_link.path),
                    headers=_headers,
                    params=_next_request_params,
                )

sdk/relationships/azure-mgmt-relationships/README.md:42

  • The README example can pass None for subscription_id (when AZURE_SUBSCRIPTION_ID isn’t set), but the client config requires subscription_id and will raise a ValueError. Prefer using os.environ[\"AZURE_SUBSCRIPTION_ID\"] (fail fast with a clear KeyError), or show a placeholder string and explicitly mention that the variable must be set.
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = RelationshipsMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:6

  • The new changelog entry contains a tool placeholder instead of release notes. Please replace it with a brief summary of user-facing changes (API version bump, new operations/models, Python support change, etc.) so consumers can understand what changed in 1.0.0b2.
## 1.0.0b2 (2026-08-13)

tool can't generate changelog for this release, please update manually.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1ad075a4-44e8-4fea-b342-0dbe2f0d3035
Copilot AI review requested due to automatic review settings August 13, 2026 03:49
@ChenxiJiang333 ChenxiJiang333 added the mgmt-review-needed PR for Mgmt SDK is ready to review label Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.

Suppressed comments (1)

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:7

  • The release note says only “Regular release,” but this update contains user-visible breaking changes: Python 3.9 support is dropped, subscription_id becomes required, and the public service-group-member properties model/creation fields change. Users upgrading from b1 need these called out explicitly; the repository also consistently documents minimum-Python increases (for example, sdk/core/azure-core/CHANGELOG.md:27-30).
### Other Changes

  - Regular release

…ft.Relationships/Relationships/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: 'e9b8d33567e9422a09711667279fe178fada51a1' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6696817 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copilot AI review requested due to automatic review settings August 13, 2026 06:36
@azure-sdk-automation azure-sdk-automation Bot changed the title [AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696107 [AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696817 Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.

Suppressed comments (10)

sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_service_group_member_relationships_operations_async.py:1

  • The new test calls list_by_parent with resource_uri="str", which will produce an invalid ARM path and should reliably fail when the test is not skipped. Use a real resource ID (ideally derived from the prepared resource group / subscription) or mark the test skipped until a valid resource URI can be constructed.
    sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_service_group_member_relationships_operations.py:1
  • Same issue as the async variant: resource_uri="str" is not a valid ARM resource ID, so this test will fail by default when executed. Please replace with a valid resource URI (or skip the test until a real ARM resource can be created/used for listing).
    sdk/relationships/azure-mgmt-relationships/README.md:42
  • The sample can raise at runtime because os.getenv(...) may return None, but subscription_id is required by the client. Consider using os.environ["AZURE_SUBSCRIPTION_ID"] (so the error is immediate and clear), or add a fallback/explicit placeholder to prevent readers from copy/pasting a failing snippet.
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = RelationshipsMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_configuration.py:52

  • The docstring says api_version supports None and that the operation default will be used when unset, but the implementation treats the value as a str and will store None if a caller passes api_version=None. That can break @api_version_validation (it compares versions using list indices) and may make new methods unusable. Normalize api_version so that None is replaced with the default (or update the docstring/signature to indicate Optional[str] is not supported).
    def __init__(
        self,
        credential: "TokenCredential",
        subscription_id: str,
        base_url: str = "https://management.azure.com",
        cloud_setting: Optional["AzureClouds"] = None,
        **kwargs: Any
    ) -> None:
        api_version: str = kwargs.pop("api_version", "2026-03-01-preview")

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_validation.py:36

  • client_api_version may be None (per the configuration docstrings), which causes _index_with_default(client_api_version) to return -1 and will incorrectly fail validation for any method with method_added_on present. Either disallow/normalize None in configuration, or handle None here by treating it as the client’s default API version.
                client = args[0]
                client_api_version = client._config.api_version  # pylint: disable=protected-access

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_validation.py:44

  • client_api_version may be None (per the configuration docstrings), which causes _index_with_default(client_api_version) to return -1 and will incorrectly fail validation for any method with method_added_on present. Either disallow/normalize None in configuration, or handle None here by treating it as the client’s default API version.
            if _index_with_default(method_added_on) > _index_with_default(client_api_version):
                raise ValueError(
                    f"'{func.__name__}' is not available in API version "
                    f"{client_api_version}. Pass service API version {method_added_on} or newer to your client."
                )

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/model_base.py:356

  • This boolean deserializer will throw if attr is not a string (e.g., 1, 0, None) and it only treats "true" as truthy (ignoring common wire variants like "1" / "false"). Consider mirroring the looser handling already used elsewhere (e.g., accept "true"/"false" case-insensitively and "1"/"0"), and guard non-string inputs to avoid runtime attribute errors.
def _deserialize_bool_as_str(attr):
    if isinstance(attr, bool):
        return attr
    return attr.lower() == "true"

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/serialization.py:1121

  • isodate.parse_duration can return isodate.Duration (e.g., for month/year-based durations). In that case value becomes a Duration object and int(value) / float(value) will fail. If these numeric duration formats are supported, the serializer should either (1) reject non-timedelta durations with a clear error, or (2) convert isodate.Duration to a concrete timedelta when possible.
    def _serialize_duration_numeric(attr, scale, as_int):

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/serialization.py:1132

  • isodate.parse_duration can return isodate.Duration (e.g., for month/year-based durations). In that case value becomes a Duration object and int(value) / float(value) will fail. If these numeric duration formats are supported, the serializer should either (1) reject non-timedelta durations with a clear error, or (2) convert isodate.Duration to a concrete timedelta when possible.
        if isinstance(attr, str):
            attr = isodate.parse_duration(attr)
        value = attr.total_seconds() * scale if isinstance(attr, datetime.timedelta) else attr
        return int(value) if as_int else float(value)

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:6

  • The changelog entry is a placeholder and doesn’t describe user-visible changes (new operations, API version bump, subscription_id requirement, etc.). Please replace this with actual release notes before publishing to avoid shipping incomplete documentation.
## 1.0.0b2 (2026-08-13)

tool can't generate changelog for this release, please update manually.

Copilot AI review requested due to automatic review settings August 13, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.

Suppressed comments (10)

sdk/relationships/azure-mgmt-relationships/pyproject.toml:1

  • The trove classifier Programming Language :: Python :: 3.14 may not be a valid classifier on PyPI yet (and may cause publishing/validation failures in tooling that checks known classifiers). Consider removing it until the classifier is officially available, or confirm the project’s release tooling accepts it.
    sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_service_group_member_relationships_operations.py:1
  • This test uses resource_uri=\"str\", which is not a valid ARM resource ID and will almost certainly fail with 4xx (or at least not exercise meaningful behavior). Since the test already provisions a resource group, consider using a real resource ID derived from resource_group (or a known resource created in-test) and add at least a minimal assertion (e.g., that iteration works and returns a list) so this test is stable under playback/recording.
    sdk/relationships/azure-mgmt-relationships/generated_tests/test_relationships_mgmt_dependency_of_relationships_operations.py:1
  • Same issue as the ServiceGroupMember list-by-parent test: resource_uri=\"str\" is not valid and likely causes test failures or meaningless recordings. Please use a valid resource_uri (ideally derived from resource_group) and add a minimal assertion to ensure the paging path is actually exercised.
    sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_configuration.py:41
  • The docstring states the default api_version is None and that None is a known value, but the implementation defaults to the string \"2026-03-01-preview\". Please align the documentation with the actual behavior (either document the string default and remove None as a known value, or change the implementation to truly support None).
    :keyword api_version: The API version to use for this operation. Known values are
     "2026-03-01-preview" and None. Default value is None. If not set, the operation's default API
     version will be used. Note that overriding this default value may result in unsupported
     behavior.
    :paramtype api_version: str

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_configuration.py:52

  • The docstring states the default api_version is None and that None is a known value, but the implementation defaults to the string \"2026-03-01-preview\". Please align the documentation with the actual behavior (either document the string default and remove None as a known value, or change the implementation to truly support None).
        api_version: str = kwargs.pop("api_version", "2026-03-01-preview")

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_validation.py:15

  • The version ordering logic is based on list.index(). If client_api_version is set to a version string not present in api_versions_list (e.g., a newer service version), _index_with_default returns -1 and the decorator will incorrectly reject the call as ‘too old’. Consider treating unknown versions as ‘newest’ (e.g., return len(api_versions_list) for unknown client_api_version) or compare versions by parsing the date portion instead of relying on list membership.
    def _index_with_default(value: str, default: int = -1) -> int:

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_validation.py:28

  • The version ordering logic is based on list.index(). If client_api_version is set to a version string not present in api_versions_list (e.g., a newer service version), _index_with_default returns -1 and the decorator will incorrectly reject the call as ‘too old’. Consider treating unknown versions as ‘newest’ (e.g., return len(api_versions_list) for unknown client_api_version) or compare versions by parsing the date portion instead of relying on list membership.
        try:
            return api_versions_list.index(value)
        except ValueError:
            return default

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_validation.py:44

  • The version ordering logic is based on list.index(). If client_api_version is set to a version string not present in api_versions_list (e.g., a newer service version), _index_with_default returns -1 and the decorator will incorrectly reject the call as ‘too old’. Consider treating unknown versions as ‘newest’ (e.g., return len(api_versions_list) for unknown client_api_version) or compare versions by parsing the date portion instead of relying on list membership.
            if _index_with_default(method_added_on) > _index_with_default(client_api_version):
                raise ValueError(
                    f"'{func.__name__}' is not available in API version "
                    f"{client_api_version}. Pass service API version {method_added_on} or newer to your client."
                )

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/model_base.py:356

  • _deserialize_bool_as_str will throw if attr isn’t a string (e.g., int/None) and it treats values like "1"/"0" as False/False, which isn’t consistent with the bool fast-path added in _utils/serialization.py (which treats "1" as True). Consider hardening this to handle common bool wire encodings ("true"/"false", "1"/"0", case-insensitive) and to safely handle non-string inputs.
def _deserialize_bool_as_str(attr):
    if isinstance(attr, bool):
        return attr
    return attr.lower() == "true"

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:6

  • The changelog entry for 1.0.0b2 contains a placeholder message instead of user-facing release notes. Please replace it with a brief summary of the actual changes (e.g., API version bump to 2026-03-01-preview, new contains relationships operations, new list-by-parent methods, Python version floor change).
## 1.0.0b2 (2026-08-13)

tool can't generate changelog for this release, please update manually.

Copilot AI review requested due to automatic review settings August 13, 2026 06:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.

Suppressed comments (1)

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:5

  • Replace this generator placeholder before release. Version 1.0.0b2 introduces user-visible features and breaking changes—including the new Contains/list-by-parent operations, a newly required subscription_id, the ServiceGroupMemberRelationshipPropertiesV2 replacement, and dropping Python 3.9—so users currently have no release or migration guidance.
tool can't generate changelog for this release, please update manually.

…ft.Relationships/Relationships/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: 'e9b8d33567e9422a09711667279fe178fada51a1' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6696942 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copilot AI review requested due to automatic review settings August 13, 2026 07:01
@azure-sdk-automation azure-sdk-automation Bot changed the title [AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696817 [AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696942 Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.

Suppressed comments (6)

sdk/relationships/azure-mgmt-relationships/pyproject.toml:1

  • The Trove classifier Programming Language :: Python :: 3.14 may not exist yet on PyPI, which can cause publishing/validation failures. Consider removing it until the classifier is officially available (or confirm via PyPI’s classifier list during release automation).
    sdk/relationships/azure-mgmt-relationships/README.md:42
  • This example can raise at runtime because sub_id may be None, but subscription_id is required and the client configuration explicitly errors on None. Consider providing a placeholder fallback (e.g., os.environ[...]), or add a short guard/error message instructing users to set AZURE_SUBSCRIPTION_ID.
from azure.mgmt.relationships import RelationshipsMgmtClient
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = RelationshipsMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/operations/_operations.py:1549

  • The api_version_validation metadata lists parameters (subscription_id, accept, and api_version) that are not part of the public method signature and are not consumed by the method implementation (subscription ID comes from self._config, Accept is set via headers). This is misleading for SDK consumers and can also encourage passing unsupported kwargs that may fail downstream. Suggest updating params_added_on to only include supported inputs (e.g., filter, headers, params, cls) or plumb through api_version properly if per-call override is intended.
    @api_version_validation(
        method_added_on="2026-03-01-preview",
        params_added_on={"2026-03-01-preview": ["api_version", "subscription_id", "filter", "accept"]},
        api_versions_list=["2026-03-01-preview"],
    )
    def list_by_subscription(
        self, *, filter: Optional[str] = None, **kwargs: Any
    ) -> ItemPaged["_models.ContainsRelationship"]:

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/model_base.py:356

  • This deserializer only treats case-insensitive 'true' as truthy and will return False for other common wire encodings like '1' (and will also throw if attr isn’t a string). Elsewhere in the SDK, boolean header parsing accepts '1'/'0' and 'True'/'False'. Align this helper with those semantics (handle '1' as True, '0' as False, and guard non-string inputs).
def _deserialize_bool_as_str(attr):
    if isinstance(attr, bool):
        return attr
    return attr.lower() == "true"

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:12

  • These bullets refer to operation groups as 'Model'. To avoid confusion, update the wording to describe them as operation groups/clients (e.g., 'DependencyOfRelationshipsOperations added method ...').
  - Model `DependencyOfRelationshipsOperations` added method `list_by_parent`
  - Model `ServiceGroupMemberRelationshipsOperations` added method `list_by_parent`

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:18

  • The PR also changes minimum supported Python from 3.9 to 3.10 (requires-python = \">=3.10\"). If that is intentional, it should be recorded as a breaking change in the changelog as well so consumers don’t discover it only at install time.
### Breaking Changes

  - Method `RelationshipsMgmtClient.__init__` inserted a `positional_or_keyword` parameter `subscription_id`
  - Deleted or renamed model `ServiceGroupMemberRelationshipProperties`

Copilot AI review requested due to automatic review settings August 13, 2026 07:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.

Suppressed comments (5)

sdk/relationships/azure-mgmt-relationships/pyproject.toml:1

  • "Programming Language :: Python :: 3.14" is likely not a valid Trove classifier yet (PyPI rejects unknown classifiers). Please remove it until the official classifier exists, or gate it behind the repo policy that updates classifiers only after PyPI adds them.
    sdk/relationships/azure-mgmt-relationships/README.md:42
  • The sample passes a potentially-None subscription ID into a required parameter, which will raise a ValueError at runtime. Prefer showing a non-optional retrieval (e.g., os.environ["AZURE_SUBSCRIPTION_ID"]) or add an explicit check that raises a clear error if the env var is missing.
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = RelationshipsMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/serialization.py:1121

  • If attr is a duration string that parses to isodate.Duration (e.g., it contains years/months), this will fall into the else attr path and then int()/float() will raise TypeError. Numeric duration wire formats can’t represent months/years reliably, so this should explicitly reject non-timedelta parsed values with a clear exception (or convert only when it’s safe).
    @staticmethod
    def _serialize_duration_numeric(attr, scale, as_int):

sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/serialization.py:1132

  • If attr is a duration string that parses to isodate.Duration (e.g., it contains years/months), this will fall into the else attr path and then int()/float() will raise TypeError. Numeric duration wire formats can’t represent months/years reliably, so this should explicitly reject non-timedelta parsed values with a clear exception (or convert only when it’s safe).
        if isinstance(attr, str):
            attr = isodate.parse_duration(attr)
        value = attr.total_seconds() * scale if isinstance(attr, datetime.timedelta) else attr
        return int(value) if as_int else float(value)

sdk/relationships/azure-mgmt-relationships/CHANGELOG.md:12

  • These entries label operation groups as “Model”. To avoid confusion in release notes, update wording to “Operation group” or “Operations” (e.g., “Operation group DependencyOfRelationshipsOperations added method list_by_parent”).
  - Model `DependencyOfRelationshipsOperations` added method `list_by_parent`
  - Model `ServiceGroupMemberRelationshipsOperations` added method `list_by_parent`

@msyyc

Copy link
Copy Markdown
Member

Management SDK PR review

Severity Finding Location Evidence Rule Remediation
Blocking README client example omits required subscription_id argument sdk/relationships/azure-mgmt-relationships/README.md (Authentication section) _client.py __init__ requires credential, subscription_id (no default) and base_url, but the README snippet only calls RelationshipsMgmtClient(credential=DefaultAzureCredential()), which would raise a TypeError for missing subscription_id if run as written. README CODE SNIPPETS Update the README example to include a subscription_id argument, e.g. RelationshipsMgmtClient(credential=DefaultAzureCredential(), subscription_id="00000000-0000-0000-0000-000000000000").
Suggestion no_sub = true set even though subscription_id is present in the client signature sdk/relationships/azure-mgmt-relationships/pyproject.toml _client.py.__init__ includes subscription_id as a required positional parameter, but pyproject.toml sets no_sub = true, which normally indicates the client has no subscription parameter. CLIENT SIGNATURE Confirm whether no_sub = true is intentional for this client; if subscription_id is required, consider setting no_sub = false to keep metadata consistent with the generated signature.

Unverified checks

Unverified checks: None.

Review summary

Reviewed package sdk/relationships/azure-mgmt-relationships (PR #48552, first revision 43fb6ac137f39f2f1dd9928bb478978753a12f8b → latest revision 97040fdd5441b05389ddd8abb785d67482df1266). Checks completed: API version drift (unchanged at 2026-03-01-preview), _version.py/CHANGELOG.md version consistency (1.0.0b2 in both), preview API version vs. beta SDK version alignment, changelog release date (2026-08-12, not excessively future-dated), pyproject.toml stability flags (is_stable = false, "Development Status :: 4 - Beta" classifier present, consistent with the b2 version), client __init__ signature order (credential, subscription_id, base_url), client name consistency across _client.py, README.md, and pyproject.toml (RelationshipsMgmtClient), and README code snippet accuracy. This review is advisory only.

resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-release When merged to main, release pipelines for this PR's changed packages trigger automatically. mgmt-review-needed PR for Mgmt SDK is ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants