[AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696942 - #48552
[AutoPR azure-mgmt-relationships]-generated-from-SDK Generation - Python-6696942#48552azure-sdk-automation[bot] wants to merge 8 commits into
Conversation
…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.
|
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. |
There was a problem hiding this comment.
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-previewand add newContainsRelationshipsoperations pluslist_by_parentfor existing relationship types. - Introduce
types.pyTypedDict request/response shapes and addapi_version_validationgating 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_parentwithresource_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_parentwithresource_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.
[Pilot] PR Pipeline Failure AnalysisA CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green. What failedThe python - pullrequest pipeline (build #6693446) failed in the Build Analyze stage (job logs) during changelog verification for Recommended next steps
Raw pipeline analysis (azsdk ci analyze)
|
|
Hi, the new api version |
There was a problem hiding this comment.
Hi ningyixue-ms, we have approved the PR. You can move on to merge and release though the action suggestion in Release Plan.
There was a problem hiding this comment.
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_idrequired is not propagated to the package metadata or README:pyproject.toml:82still hasno_sub = true, which causes the packaging template to emit the credential-only constructor shown atREADME.md:39. That documented call now raisesTypeError. Removeno_sub = trueand 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_ida 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.
Management SDK PR review
Unverified checksUnverified checks: None. Review summaryReviewed package |
There was a problem hiding this comment.
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_idrequired breaks the documented authentication snippet:README.md:39still constructs this client with onlycredential, which now raisesTypeError. 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-pythonfrom 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.
There was a problem hiding this comment.
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 protectslist_by_parent.
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/operations/_operations.py:942 - For pagination (
nextLink) requests inlist_by_parent, the code reuses_headersfrom kwargs without ensuring anAcceptheader is present. The first page request uses the request builder, which setsAccept, but that header is not propagated back into_headers, so subsequent page requests may omitAccept. Fix by explicitly setting a defaultAccept: application/jsoninto_headersat method entry (or in thenextLinkbranch) 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
Noneforsubscription_id(whenAZURE_SUBSCRIPTION_IDisn’t set), but the client config requiressubscription_idand will raise aValueError. Prefer usingos.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.
There was a problem hiding this comment.
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_idbecomes 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.
There was a problem hiding this comment.
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_parentwithresource_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 returnNone, butsubscription_idis required by the client. Consider usingos.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_versionsupportsNoneand that the operation default will be used when unset, but the implementation treats the value as astrand will storeNoneif a caller passesapi_version=None. That can break@api_version_validation(it compares versions using list indices) and may make new methods unusable. Normalizeapi_versionso thatNoneis replaced with the default (or update the docstring/signature to indicateOptional[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_versionmay beNone(per the configuration docstrings), which causes_index_with_default(client_api_version)to return-1and will incorrectly fail validation for any method withmethod_added_onpresent. Either disallow/normalizeNonein configuration, or handleNonehere 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_versionmay beNone(per the configuration docstrings), which causes_index_with_default(client_api_version)to return-1and will incorrectly fail validation for any method withmethod_added_onpresent. Either disallow/normalizeNonein configuration, or handleNonehere 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
attris 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_durationcan returnisodate.Duration(e.g., for month/year-based durations). In that casevaluebecomes aDurationobject andint(value)/float(value)will fail. If these numeric duration formats are supported, the serializer should either (1) reject non-timedeltadurations with a clear error, or (2) convertisodate.Durationto a concretetimedeltawhen possible.
def _serialize_duration_numeric(attr, scale, as_int):
sdk/relationships/azure-mgmt-relationships/azure/mgmt/relationships/_utils/serialization.py:1132
isodate.parse_durationcan returnisodate.Duration(e.g., for month/year-based durations). In that casevaluebecomes aDurationobject andint(value)/float(value)will fail. If these numeric duration formats are supported, the serializer should either (1) reject non-timedeltadurations with a clear error, or (2) convertisodate.Durationto a concretetimedeltawhen 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_idrequirement, 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.
There was a problem hiding this comment.
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.14may 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 fromresource_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 validresource_uri(ideally derived fromresource_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_versionisNoneand thatNoneis 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 removeNoneas a known value, or change the implementation to truly supportNone).
: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_versionisNoneand thatNoneis 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 removeNoneas a known value, or change the implementation to truly supportNone).
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(). Ifclient_api_versionis set to a version string not present inapi_versions_list(e.g., a newer service version),_index_with_defaultreturns-1and the decorator will incorrectly reject the call as ‘too old’. Consider treating unknown versions as ‘newest’ (e.g., returnlen(api_versions_list)for unknownclient_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(). Ifclient_api_versionis set to a version string not present inapi_versions_list(e.g., a newer service version),_index_with_defaultreturns-1and the decorator will incorrectly reject the call as ‘too old’. Consider treating unknown versions as ‘newest’ (e.g., returnlen(api_versions_list)for unknownclient_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(). Ifclient_api_versionis set to a version string not present inapi_versions_list(e.g., a newer service version),_index_with_defaultreturns-1and the decorator will incorrectly reject the call as ‘too old’. Consider treating unknown versions as ‘newest’ (e.g., returnlen(api_versions_list)for unknownclient_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_strwill throw ifattrisn’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.0b2contains 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.
There was a problem hiding this comment.
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, theServiceGroupMemberRelationshipPropertiesV2replacement, 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.
There was a problem hiding this comment.
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.14may 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_idmay beNone, butsubscription_idis required and the client configuration explicitly errors onNone. Consider providing a placeholder fallback (e.g.,os.environ[...]), or add a short guard/error message instructing users to setAZURE_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_validationmetadata lists parameters (subscription_id,accept, andapi_version) that are not part of the public method signature and are not consumed by the method implementation (subscription ID comes fromself._config, Accept is set via headers). This is misleading for SDK consumers and can also encourage passing unsupported kwargs that may fail downstream. Suggest updatingparams_added_onto only include supported inputs (e.g.,filter,headers,params,cls) or plumb throughapi_versionproperly 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 returnFalsefor other common wire encodings like'1'(and will also throw ifattrisn’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., '
DependencyOfRelationshipsOperationsadded 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`
There was a problem hiding this comment.
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 attrpath 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 attrpath 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
DependencyOfRelationshipsOperationsadded methodlist_by_parent”).
- Model `DependencyOfRelationshipsOperations` added method `list_by_parent`
- Model `ServiceGroupMemberRelationshipsOperations` added method `list_by_parent`
resolved. |
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