Skip to content

Commit bb373dd

Browse files
Merge branch 'main' into fix/keyvault-certificates-san-ip-uri-validator
2 parents 38a457f + 314c9ed commit bb373dd

42 files changed

Lines changed: 777 additions & 478 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

eng/common/scripts/Helpers/ApiView-Helpers.ps1

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ function Set-ApiViewCommentForRelatedIssues {
127127
[string]$APIViewHost = "https://apiview.dev",
128128
[ValidateNotNullOrEmpty()]
129129
[Parameter(Mandatory = $true)]
130-
$AuthToken
130+
$AuthToken,
131+
[string]$GitHubActionRunUrl = ""
131132
)
132133
. ${PSScriptRoot}\..\common.ps1
133134
$issuesForCommit = $null
@@ -144,7 +145,7 @@ function Set-ApiViewCommentForRelatedIssues {
144145
}
145146
$issuesForCommit.items | ForEach-Object {
146147
$urlParts = $_.url -split "/"
147-
Set-ApiViewCommentForPR -RepoOwner $urlParts[4] -RepoName $urlParts[5] -PrNumber $urlParts[7] -HeadCommitish $HeadCommitish -APIViewHost $APIViewHost -AuthToken $AuthToken
148+
Set-ApiViewCommentForPR -RepoOwner $urlParts[4] -RepoName $urlParts[5] -PrNumber $urlParts[7] -HeadCommitish $HeadCommitish -APIViewHost $APIViewHost -AuthToken $AuthToken -GitHubActionRunUrl $GitHubActionRunUrl
148149
}
149150
}
150151

@@ -162,7 +163,8 @@ function Set-ApiViewCommentForPR {
162163
[string]$APIViewHost,
163164
[ValidateNotNullOrEmpty()]
164165
[Parameter(Mandatory = $true)]
165-
$AuthToken
166+
$AuthToken,
167+
[string]$GitHubActionRunUrl = ""
166168
)
167169
$repoFullName = "$RepoOwner/$RepoName"
168170
$apiviewEndpoint = "$APIViewHost/api/pullrequests?pullRequestNumber=$PrNumber&repoName=$repoFullName&commitSHA=$HeadCommitish"
@@ -208,6 +210,11 @@ function Set-ApiViewCommentForPR {
208210
}
209211

210212
$commentText += "<!-- Fetch URI: $apiviewEndpoint -->"
213+
if (-not [string]::IsNullOrWhiteSpace($GitHubActionRunUrl)) {
214+
$commentText += ""
215+
$commentText += "---"
216+
$commentText += "Comment generated by [After APIView]($GitHubActionRunUrl) workflow run."
217+
}
211218
$commentText = $commentText -join "`r`n"
212219
$existingComment = $null;
213220
$existingAPIViewComment = $null;

sdk/monitor/azure-monitor-query/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
- Bump minimum dependency on `azure-core` to `>=1.37.0`.
14+
1315
## 2.0.0 (2025-07-30)
1416

1517
### Breaking Changes
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"apiVersion": "v1"
2+
"apiVersion": "v1",
3+
"apiVersions": {
4+
"MonitorQueryLogs": "v1"
5+
}
36
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
22
"CrossLanguagePackageId": "MonitorQueryLogs",
3-
"CrossLanguageDefinitionId": {
4-
"azure.monitor.query.models._ColumnType": "MonitorQueryLogs.ColumnDataType"
5-
}
3+
"CrossLanguageDefinitionId": {}
64
}

sdk/monitor/azure-monitor-query/azure/monitor/query/_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from azure.core.rest import HttpRequest, HttpResponse
1616

1717
from ._configuration import MonitorQueryLogsClientConfiguration
18-
from ._operations._operations import _MonitorQueryLogsClientOperationsMixin
18+
from ._operations import _MonitorQueryLogsClientOperationsMixin
1919
from ._utils.serialization import Deserializer, Serializer
2020

2121
if TYPE_CHECKING:
@@ -30,8 +30,8 @@ class MonitorQueryLogsClient(_MonitorQueryLogsClientOperationsMixin):
3030
:keyword endpoint: The Log Analytics service endpoint. Default value is
3131
"https://api.loganalytics.io".
3232
:paramtype endpoint: str
33-
:keyword api_version: The service API version. Known values are "v1" and None. Default value is
34-
"v1". Note that overriding this default value may result in unsupported behavior.
33+
:keyword api_version: The service API version. Known values are "v1". Default value is "v1".
34+
Note that overriding this default value may result in unsupported behavior.
3535
:paramtype api_version: str or ~azure.monitor.query.models.Versions
3636
"""
3737

sdk/monitor/azure-monitor-query/azure/monitor/query/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class MonitorQueryLogsClientConfiguration: # pylint: disable=too-many-instance-
2727
:param endpoint: The Log Analytics service endpoint. Default value is
2828
"https://api.loganalytics.io".
2929
:type endpoint: str
30-
:keyword api_version: The service API version. Known values are "v1" and None. Default value is
31-
"v1". Note that overriding this default value may result in unsupported behavior.
30+
:keyword api_version: The service API version. Known values are "v1". Default value is "v1".
31+
Note that overriding this default value may result in unsupported behavior.
3232
:paramtype api_version: str or ~azure.monitor.query.models.Versions
3333
"""
3434

sdk/monitor/azure-monitor-query/azure/monitor/query/_operations/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
if TYPE_CHECKING:
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

15+
from ._operations import _MonitorQueryLogsClientOperationsMixin # type: ignore # pylint: disable=unused-import
1516

1617
from ._patch import __all__ as _patch_all
1718
from ._patch import *

sdk/monitor/azure-monitor-query/azure/monitor/query/_operations/_operations.py

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8-
# pylint: disable=protected-access
98
from collections.abc import MutableMapping
109
from io import IOBase
1110
import json
12-
from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
11+
from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
1312

1413
from azure.core import PipelineClient
1514
from azure.core.exceptions import (
@@ -35,7 +34,7 @@
3534

3635
JSON = MutableMapping[str, Any]
3736
T = TypeVar("T")
38-
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
37+
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]]
3938

4039
_SERIALIZER = Serializer()
4140
_SERIALIZER.client_side_validation = False
@@ -156,9 +155,9 @@ def _execute(
156155
) -> _models._models.QueryResults:
157156
"""Execute an Analytics query.
158157
159-
Executes an Analytics query for data.
160-
`Here <https://learn.microsoft.com/azure/azure-monitor/logs/api/request-format>`_
161-
is an example for using POST with an Analytics query.
158+
Executes an Analytics query for data. `Here
159+
<https://learn.microsoft.com/azure/azure-monitor/logs/api/request-format>`_ is an example for
160+
using POST with an Analytics query.
162161
163162
:param workspace_id: Primary Workspace ID of the query. This is the Workspace ID from the
164163
Properties
@@ -211,6 +210,7 @@ def _execute(
211210
}
212211
_request.url = self._client.format_url(_request.url, **path_format_arguments)
213212

213+
_decompress = kwargs.pop("decompress", True)
214214
_stream = kwargs.pop("stream", False)
215215
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
216216
_request, stream=_stream, **kwargs
@@ -225,11 +225,14 @@ def _execute(
225225
except (StreamConsumedError, StreamClosedError):
226226
pass
227227
map_error(status_code=response.status_code, response=response, error_map=error_map)
228-
error = _failsafe_deserialize(_models._models.ErrorResponse, response.json())
228+
error = _failsafe_deserialize(
229+
_models._models.ErrorResponse, # pylint: disable=protected-access
230+
response,
231+
)
229232
raise HttpResponseError(response=response, model=error)
230233

231234
if _stream:
232-
deserialized = response.iter_bytes()
235+
deserialized = response.iter_bytes() if _decompress else response.iter_raw()
233236
else:
234237
deserialized = _deserialize(
235238
_models._models.QueryResults, response.json() # pylint: disable=protected-access
@@ -282,9 +285,9 @@ def _execute_with_resource_id(
282285
) -> _models._models.QueryResults:
283286
"""Execute an Analytics query using resource ID.
284287
285-
Executes an Analytics query for data in the context of a resource.
286-
`Here <https://learn.microsoft.com/azure/azure-monitor/logs/api/azure-resource-queries>`_
287-
is an example for using POST with an Analytics query.
288+
Executes an Analytics query for data in the context of a resource. `Here
289+
<https://learn.microsoft.com/azure/azure-monitor/logs/api/azure-resource-queries>`_ is an
290+
example for using POST with an Analytics query.
288291
289292
:param resource_id: The identifier of the resource. Required.
290293
:type resource_id: str
@@ -335,6 +338,7 @@ def _execute_with_resource_id(
335338
}
336339
_request.url = self._client.format_url(_request.url, **path_format_arguments)
337340

341+
_decompress = kwargs.pop("decompress", True)
338342
_stream = kwargs.pop("stream", False)
339343
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
340344
_request, stream=_stream, **kwargs
@@ -349,11 +353,14 @@ def _execute_with_resource_id(
349353
except (StreamConsumedError, StreamClosedError):
350354
pass
351355
map_error(status_code=response.status_code, response=response, error_map=error_map)
352-
error = _failsafe_deserialize(_models._models.ErrorResponse, response.json())
356+
error = _failsafe_deserialize(
357+
_models._models.ErrorResponse, # pylint: disable=protected-access
358+
response,
359+
)
353360
raise HttpResponseError(response=response, model=error)
354361

355362
if _stream:
356-
deserialized = response.iter_bytes()
363+
deserialized = response.iter_bytes() if _decompress else response.iter_raw()
357364
else:
358365
deserialized = _deserialize(
359366
_models._models.QueryResults, response.json() # pylint: disable=protected-access
@@ -383,9 +390,9 @@ def _batch(
383390
) -> _models._models.BatchResponse:
384391
"""Execute a batch of Analytics queries.
385392
386-
Executes a batch of Analytics queries for data.
387-
`Here <https://learn.microsoft.com/azure/azure-monitor/logs/api/batch-queries>`_
388-
is an example for using POST with an Analytics query.
393+
Executes a batch of Analytics queries for data. `Here
394+
<https://learn.microsoft.com/azure/azure-monitor/logs/api/batch-queries>`_ is an example for
395+
using POST with an Analytics query.
389396
390397
:param body: The batch request body. Is one of the following types: BatchRequest, JSON,
391398
IO[bytes] Required.
@@ -427,6 +434,7 @@ def _batch(
427434
}
428435
_request.url = self._client.format_url(_request.url, **path_format_arguments)
429436

437+
_decompress = kwargs.pop("decompress", True)
430438
_stream = kwargs.pop("stream", False)
431439
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
432440
_request, stream=_stream, **kwargs
@@ -441,11 +449,14 @@ def _batch(
441449
except (StreamConsumedError, StreamClosedError):
442450
pass
443451
map_error(status_code=response.status_code, response=response, error_map=error_map)
444-
error = _failsafe_deserialize(_models._models.ErrorResponse, response.json())
452+
error = _failsafe_deserialize(
453+
_models._models.ErrorResponse, # pylint: disable=protected-access
454+
response,
455+
)
445456
raise HttpResponseError(response=response, model=error)
446457

447458
if _stream:
448-
deserialized = response.iter_bytes()
459+
deserialized = response.iter_bytes() if _decompress else response.iter_raw()
449460
else:
450461
deserialized = _deserialize(
451462
_models._models.BatchResponse, response.json() # pylint: disable=protected-access

0 commit comments

Comments
 (0)