Skip to content

Commit

Permalink
Merge branch 'main' into feature/eventgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
l0lawrence authored May 31, 2024
2 parents 66bafef + 1a6ba6c commit 6e4a87f
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 89 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@

# ServiceLabel: %Cosmos
# PRLabel: %Cosmos
/sdk/cosmos/ @kushagraThapar @simorenoh @xinlian12 @annatisch @bambriz
/sdk/cosmos/ @kushagraThapar @simorenoh @xinlian12 @annatisch @bambriz @pilchie

# ServiceLabel: %Cosmos %Service Attention
#/<NotInRepo>/ @pjohari-ms @simorenoh @AbhinavTrips @bambriz
#/<NotInRepo>/ @pjohari-ms @simorenoh @AbhinavTrips @bambriz @pilchie

# PRLabel: %Data Factory
/sdk/datafactory/ @hvermis
Expand Down
34 changes: 9 additions & 25 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-python": "0.23.12"
"@azure-tools/typespec-python": "0.23.13"
},
"devDependencies": {
"@typespec/http": "~0.56.0",
"@typespec/openapi": "~0.56.0",
"@azure-tools/typespec-azure-resource-manager": "~0.42.1",
"@azure-tools/typespec-azure-rulesets": "~0.42.1",
"@typespec/versioning": "~0.56.0",
"@azure-tools/typespec-azure-core": "~0.42.0",
"@azure-tools/typespec-autorest": "~0.42.0",
"@azure-tools/typespec-azure-core": "~0.42.0",
"@azure-tools/typespec-azure-resource-manager": "~0.42.0",
"@azure-tools/typespec-client-generator-core": "~0.42.3",
"@typespec/compiler": "~0.56.0",
"@typespec/http": "~0.56.0",
"@typespec/openapi": "~0.56.0",
"@typespec/rest": "~0.56.0",
"@typespec/compiler": "~0.56.0"
"@typespec/versioning": "~0.56.0"
}
}
22 changes: 13 additions & 9 deletions eng/pipelines/docindex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,18 @@ jobs:
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
PushArgs: -f

- task: PowerShell@2
- task: AzureCLI@2
displayName: Queue Docs CI build
inputs:
pwsh: true
filePath: eng/common/scripts/Queue-Pipeline.ps1
arguments: >
-Organization "apidrop"
-Project "Content%20CI"
-DefinitionId 5533
-AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
-BuildParametersJson (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
azureSubscription: msdocs-apidrop-connection
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv
$buildParamJson = (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
eng/common/scripts/Queue-Pipeline.ps1 `
-Organization "apidrop" `
-Project "Content%20CI" `
-DefinitionId 5533 `
-BuildParametersJson $buildParamJson `
-BearerToken $accessToken
2 changes: 1 addition & 1 deletion sdk/core/corehttp/corehttp/rest/_aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from itertools import groupby
from typing import Iterator, cast, TYPE_CHECKING
from multidict import CIMultiDict
import aiohttp.client_exceptions # pylint: disable=all
import aiohttp.client_exceptions # pylint: disable=networking-import-outside-azure-core-transport

from ._http_response_impl_async import AsyncHttpResponseImpl
from ..exceptions import (
Expand Down
10 changes: 2 additions & 8 deletions sdk/core/corehttp/corehttp/rest/_http_response_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,7 @@ def iter_bytes(self, **kwargs) -> Iterator[bytes]:
yield self.content[i : i + chunk_size]
else:
self._stream_download_check()
for part in self._stream_download_generator(
response=self,
pipeline=None,
decompress=True,
):
yield part
yield from self._stream_download_generator(response=self, pipeline=None, decompress=True)
self.close()

def iter_raw(self, **kwargs) -> Iterator[bytes]:
Expand All @@ -307,6 +302,5 @@ def iter_raw(self, **kwargs) -> Iterator[bytes]:
:rtype: Iterator[str]
"""
self._stream_download_check()
for part in self._stream_download_generator(response=self, pipeline=None, decompress=False):
yield part
yield from self._stream_download_generator(response=self, pipeline=None, decompress=False)
self.close()
7 changes: 3 additions & 4 deletions sdk/core/corehttp/corehttp/rest/_requests_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import logging
import collections.abc as collections
from typing import TYPE_CHECKING, Any
import requests # pylint: disable=all
from requests.structures import CaseInsensitiveDict # pylint: disable=all
import requests # pylint: disable=networking-import-outside-azure-core-transport
from requests.structures import CaseInsensitiveDict # pylint: disable=networking-import-outside-azure-core-transport
from urllib3.exceptions import (
DecodeError as CoreDecodeError,
ReadTimeoutError,
Expand Down Expand Up @@ -172,8 +172,7 @@ def _read_raw_stream(response, chunk_size=1):
# Special case for urllib3.
if hasattr(response.raw, "stream"):
try:
for chunk in response.raw.stream(chunk_size, decode_content=False):
yield chunk
yield from response.raw.stream(chunk_size, decode_content=False)
except ProtocolError as e:
raise ServiceResponseError(e, error=e) from e
except CoreDecodeError as e:
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/corehttp/corehttp/transport/aiohttp/_aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

import logging
import asyncio
import aiohttp # pylint: disable=all
import aiohttp.client_exceptions # pylint: disable=all
import aiohttp # pylint: disable=networking-import-outside-azure-core-transport
import aiohttp.client_exceptions # pylint: disable=networking-import-outside-azure-core-transport

from ...exceptions import (
ServiceRequestError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import sys
from typing import MutableMapping, Optional

from requests.adapters import HTTPAdapter # pylint: disable=all
from requests.adapters import HTTPAdapter # pylint: disable=networking-import-outside-azure-core-transport
from urllib3.connectionpool import ConnectionPool


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
NewConnectionError,
ConnectTimeoutError,
)
import requests # pylint: disable=all
import requests # pylint: disable=networking-import-outside-azure-core-transport

from ...exceptions import (
ServiceRequestError,
Expand Down
9 changes: 1 addition & 8 deletions sdk/eventgrid/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@
"metadata": {
"description": "The application client ID used to run tests."
}
},
"testApplicationSecret": {
"type": "string",
"metadata": {
"description": "The application client secret used to run tests."
}
},

}
},
"variables": {
"namespaceName": "[format('{0}-2', parameters('baseName'))]",
Expand Down
13 changes: 2 additions & 11 deletions sdk/eventgrid/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,10 @@ extends:
ServiceDirectory: eventgrid
BuildTargetingString: azure-eventgrid*
Location: eastus
UseFederatedAuth: true
MatrixReplace:
- TestSamples=.*/true
EnvVars:
TEST_MODE: 'RunLiveNoRecord'
AZURE_TEST_RUN_LIVE: 'true'
AZURE_SKIP_LIVE_RECORDING: 'True'
AZURE_STORAGE_CONNECTION_STRING: $(python-storage-blob-connection-string)
AZURE_SUBSCRIPTION_ID: $(azure-subscription-id)
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id)
AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret)
EVENTGRID_SAS: $(python-sdk-test-eg-sas)
STORAGE_QUEUE_NAME: $(python-storage-queue-name)
EVENTGRID_PARTNER_NAMESPACE_TOPIC_ENDPOINT: $(python-eventgrid-partner-endpoint)
EVENTGRID_PARTNER_NAMESPACE_TOPIC_KEY: $(python-eventgrid-partner-key)
EVENTGRID_PARTNER_CHANNEL_NAME: $(python-eventgrid-partner-channel-name)
AZURE_SKIP_LIVE_RECORDING: 'True'
4 changes: 4 additions & 0 deletions sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,13 @@ def _from_rest_object( # pylint: disable=too-many-return-statements
return ImportJob._load_from_rest(obj)

res_command: Job = Command._load_from_rest_job(obj)
if hasattr(obj, "name"):
res_command._name = obj.name # type: ignore[attr-defined]
return res_command
if obj.properties.job_type == RestJobType.SPARK:
res_spark: Job = Spark._load_from_rest_job(obj)
if hasattr(obj, "name"):
res_spark._name = obj.name # type: ignore[attr-defined]
return res_spark
if obj.properties.job_type == RestJobType.SWEEP:
return SweepJob._load_from_rest(obj)
Expand Down
8 changes: 1 addition & 7 deletions sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# Release History

## 1.4.3 (Unreleased)
## 1.5.0 (2024-05-31)

### Features Added

- Enable live metrics feature
([#35566](https://github.com/Azure/azure-sdk-for-python/pull/35566))

### Breaking Changes

### Bugs Fixed

### Other Changes

## 1.4.2 (2024-05-20)

### Features Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "1.4.3"
VERSION = "1.5.0"
2 changes: 1 addition & 1 deletion sdk/monitor/azure-monitor-opentelemetry/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
install_requires=[
"azure-core<2.0.0,>=1.28.0",
"azure-core-tracing-opentelemetry~=1.0.0b11",
"azure-monitor-opentelemetry-exporter~=1.0.0b25",
"azure-monitor-opentelemetry-exporter~=1.0.0b26",
"opentelemetry-instrumentation-django~=0.42b0",
"opentelemetry-instrumentation-fastapi~=0.42b0",
"opentelemetry-instrumentation-flask~=0.42b0",
Expand Down

0 comments on commit 6e4a87f

Please sign in to comment.