apache-airflow-providers-microsoft-azure 10.5.0__py3-none-any.whl → 10.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "10.5.0"
32
+ __version__ = "10.5.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.8.0"
@@ -28,8 +28,9 @@ def get_provider_info():
28
28
  "name": "Microsoft Azure",
29
29
  "description": "`Microsoft Azure <https://azure.microsoft.com/>`__\n",
30
30
  "state": "ready",
31
- "source-date-epoch": 1726861002,
31
+ "source-date-epoch": 1728485226,
32
32
  "versions": [
33
+ "10.5.1",
33
34
  "10.5.0",
34
35
  "10.4.0",
35
36
  "10.3.0",
@@ -108,7 +109,7 @@ def get_provider_info():
108
109
  "azure-synapse-artifacts>=0.17.0",
109
110
  "adal>=1.2.7",
110
111
  "azure-storage-file-datalake>=12.9.1",
111
- "azure-kusto-data>=4.1.0",
112
+ "azure-kusto-data>=4.1.0,!=4.6.0",
112
113
  "azure-mgmt-datafactory>=2.0.0",
113
114
  "azure-mgmt-containerregistry>=8.0.0",
114
115
  "azure-mgmt-containerinstance>=10.1.0",
@@ -81,12 +81,7 @@ class WasbTaskHandler(FileTaskHandler, LoggingMixin):
81
81
  return None
82
82
 
83
83
  def set_context(self, ti: TaskInstance, *, identifier: str | None = None) -> None:
84
- # todo: remove-at-min-airflow-version-2.8
85
- # after Airflow 2.8 can always pass `identifier`
86
- if getattr(super(), "supports_task_context_logging", False):
87
- super().set_context(ti, identifier=identifier)
88
- else:
89
- super().set_context(ti)
84
+ super().set_context(ti, identifier=identifier)
90
85
  # Local location and remote location is needed to open and
91
86
  # upload local log file to Wasb remote storage.
92
87
  if TYPE_CHECKING:
@@ -100,7 +100,7 @@ class MSGraphAsyncOperator(BaseOperator):
100
100
  timeout: float | None = None,
101
101
  proxies: dict | None = None,
102
102
  api_version: APIVersion | str | None = None,
103
- pagination_function: Callable[[MSGraphAsyncOperator, dict], tuple[str, dict]] | None = None,
103
+ pagination_function: Callable[[MSGraphAsyncOperator, dict, Context], tuple[str, dict]] | None = None,
104
104
  result_processor: Callable[[Context, Any], Any] = lambda context, result: result,
105
105
  serializer: type[ResponseSerializer] = ResponseSerializer,
106
106
  **kwargs: Any,
@@ -122,7 +122,6 @@ class MSGraphAsyncOperator(BaseOperator):
122
122
  self.pagination_function = pagination_function or self.paginate
123
123
  self.result_processor = result_processor
124
124
  self.serializer: ResponseSerializer = serializer()
125
- self.results: list[Any] | None = None
126
125
 
127
126
  def execute(self, context: Context) -> None:
128
127
  self.defer(
@@ -166,6 +165,8 @@ class MSGraphAsyncOperator(BaseOperator):
166
165
 
167
166
  self.log.debug("response: %s", response)
168
167
 
168
+ results = self.pull_xcom(context=context)
169
+
169
170
  if response:
170
171
  response = self.serializer.deserialize(response)
171
172
 
@@ -178,39 +179,46 @@ class MSGraphAsyncOperator(BaseOperator):
178
179
  event["response"] = result
179
180
 
180
181
  try:
181
- self.trigger_next_link(response=response, method_name=self.execute_complete.__name__)
182
+ self.trigger_next_link(
183
+ response=response, method_name=self.execute_complete.__name__, context=context
184
+ )
182
185
  except TaskDeferred as exception:
183
- self.results = self.pull_xcom(context=context)
184
186
  self.append_result(
187
+ results=results,
185
188
  result=result,
186
189
  append_result_as_list_if_absent=True,
187
190
  )
188
- self.push_xcom(context=context, value=self.results)
191
+ self.push_xcom(context=context, value=results)
189
192
  raise exception
190
193
 
191
- self.append_result(result=result)
194
+ if not results:
195
+ return result
192
196
 
193
- return self.results
197
+ self.append_result(results=results, result=result)
198
+ return results
194
199
  return None
195
200
 
201
+ @classmethod
196
202
  def append_result(
197
- self,
203
+ cls,
204
+ results: list[Any],
198
205
  result: Any,
199
206
  append_result_as_list_if_absent: bool = False,
200
- ):
201
- if isinstance(self.results, list):
207
+ ) -> list[Any]:
208
+ if isinstance(results, list):
202
209
  if isinstance(result, list):
203
- self.results.extend(result)
210
+ results.extend(result)
204
211
  else:
205
- self.results.append(result)
212
+ results.append(result)
206
213
  else:
207
214
  if append_result_as_list_if_absent:
208
215
  if isinstance(result, list):
209
- self.results = result
216
+ return result
210
217
  else:
211
- self.results = [result]
218
+ return [result]
212
219
  else:
213
- self.results = result
220
+ return result
221
+ return results
214
222
 
215
223
  def pull_xcom(self, context: Context) -> list:
216
224
  map_index = context["ti"].map_index
@@ -251,27 +259,25 @@ class MSGraphAsyncOperator(BaseOperator):
251
259
  self.xcom_push(context=context, key=self.key, value=value)
252
260
 
253
261
  @staticmethod
254
- def paginate(operator: MSGraphAsyncOperator, response: dict) -> tuple[Any, dict[str, Any] | None]:
262
+ def paginate(
263
+ operator: MSGraphAsyncOperator, response: dict, context: Context
264
+ ) -> tuple[Any, dict[str, Any] | None]:
255
265
  odata_count = response.get("@odata.count")
256
266
  if odata_count and operator.query_parameters:
257
267
  query_parameters = deepcopy(operator.query_parameters)
258
268
  top = query_parameters.get("$top")
259
- odata_count = response.get("@odata.count")
260
269
 
261
270
  if top and odata_count:
262
- if len(response.get("value", [])) == top:
263
- skip = (
264
- sum(map(lambda result: len(result["value"]), operator.results)) + top
265
- if operator.results
266
- else top
267
- )
271
+ if len(response.get("value", [])) == top and context:
272
+ results = operator.pull_xcom(context=context)
273
+ skip = sum(map(lambda result: len(result["value"]), results)) + top if results else top
268
274
  query_parameters["$skip"] = skip
269
275
  return operator.url, query_parameters
270
276
  return response.get("@odata.nextLink"), operator.query_parameters
271
277
 
272
- def trigger_next_link(self, response, method_name="execute_complete") -> None:
278
+ def trigger_next_link(self, response, method_name: str, context: Context) -> None:
273
279
  if isinstance(response, dict):
274
- url, query_parameters = self.pagination_function(self, response)
280
+ url, query_parameters = self.pagination_function(self, response, context)
275
281
 
276
282
  self.log.debug("url: %s", url)
277
283
  self.log.debug("query_parameters: %s", query_parameters)
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-microsoft-azure
3
- Version: 10.5.0
3
+ Version: 10.5.1
4
4
  Summary: Provider package apache-airflow-providers-microsoft-azure for Apache Airflow
5
5
  Keywords: airflow-provider,microsoft.azure,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
- Requires-Python: ~=3.8
8
+ Requires-Python: ~=3.9
9
9
  Description-Content-Type: text/x-rst
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: Framework :: Apache Airflow
16
16
  Classifier: Framework :: Apache Airflow :: Provider
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
- Classifier: Programming Language :: Python :: 3.8
19
18
  Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
@@ -29,7 +28,7 @@ Requires-Dist: azure-cosmos>=4.6.0
29
28
  Requires-Dist: azure-datalake-store>=0.0.45
30
29
  Requires-Dist: azure-identity>=1.3.1
31
30
  Requires-Dist: azure-keyvault-secrets>=4.1.0
32
- Requires-Dist: azure-kusto-data>=4.1.0
31
+ Requires-Dist: azure-kusto-data>=4.1.0,!=4.6.0
33
32
  Requires-Dist: azure-mgmt-containerinstance>=10.1.0
34
33
  Requires-Dist: azure-mgmt-containerregistry>=8.0.0
35
34
  Requires-Dist: azure-mgmt-cosmosdb>=3.0.0
@@ -49,8 +48,8 @@ Requires-Dist: apache-airflow-providers-google ; extra == "google"
49
48
  Requires-Dist: apache-airflow-providers-oracle ; extra == "oracle"
50
49
  Requires-Dist: apache-airflow-providers-sftp ; extra == "sftp"
51
50
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
52
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.0/changelog.html
53
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.0
51
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.1/changelog.html
52
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.1
54
53
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
55
54
  Project-URL: Source Code, https://github.com/apache/airflow
56
55
  Project-URL: Twitter, https://twitter.com/ApacheAirflow
@@ -104,7 +103,7 @@ Provides-Extra: sftp
104
103
 
105
104
  Package ``apache-airflow-providers-microsoft-azure``
106
105
 
107
- Release: ``10.5.0``
106
+ Release: ``10.5.1``
108
107
 
109
108
 
110
109
  `Microsoft Azure <https://azure.microsoft.com/>`__
@@ -117,7 +116,7 @@ This is a provider package for ``microsoft.azure`` provider. All classes for thi
117
116
  are in ``airflow.providers.microsoft.azure`` python package.
118
117
 
119
118
  You can find package information and changelog for the provider
120
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.0/>`_.
119
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.1/>`_.
121
120
 
122
121
  Installation
123
122
  ------------
@@ -126,14 +125,14 @@ You can install this package on top of an existing Airflow 2 installation (see `
126
125
  for the minimum Airflow version supported) via
127
126
  ``pip install apache-airflow-providers-microsoft-azure``
128
127
 
129
- The package supports the following python versions: 3.8,3.9,3.10,3.11,3.12
128
+ The package supports the following python versions: 3.9,3.10,3.11,3.12
130
129
 
131
130
  Requirements
132
131
  ------------
133
132
 
134
- ================================ ==================
133
+ ================================ ===================
135
134
  PIP package Version required
136
- ================================ ==================
135
+ ================================ ===================
137
136
  ``apache-airflow`` ``>=2.8.0``
138
137
  ``adlfs`` ``>=2023.10.0``
139
138
  ``azure-batch`` ``>=8.0.0``
@@ -152,12 +151,12 @@ PIP package Version required
152
151
  ``azure-synapse-artifacts`` ``>=0.17.0``
153
152
  ``adal`` ``>=1.2.7``
154
153
  ``azure-storage-file-datalake`` ``>=12.9.1``
155
- ``azure-kusto-data`` ``>=4.1.0``
154
+ ``azure-kusto-data`` ``>=4.1.0,!=4.6.0``
156
155
  ``azure-mgmt-datafactory`` ``>=2.0.0``
157
156
  ``azure-mgmt-containerregistry`` ``>=8.0.0``
158
157
  ``azure-mgmt-containerinstance`` ``>=10.1.0``
159
158
  ``msgraph-core`` ``>=1.0.0``
160
- ================================ ==================
159
+ ================================ ===================
161
160
 
162
161
  Cross provider package dependencies
163
162
  -----------------------------------
@@ -182,4 +181,4 @@ Dependent package
182
181
  ==================================================================================================== ==========
183
182
 
184
183
  The changelog for the provider package can be found in the
185
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.0/changelog.html>`_.
184
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure/10.5.1/changelog.html>`_.
@@ -1,6 +1,6 @@
1
1
  airflow/providers/microsoft/azure/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
2
- airflow/providers/microsoft/azure/__init__.py,sha256=dvoFXfr0vpDQnGpXKvaJZO3UXAxLm20FFOE8-X8Bam4,1503
3
- airflow/providers/microsoft/azure/get_provider_info.py,sha256=axIPRoQg7Tpkyu-CORRISVA_P1IOdQxK_-6gcmkYlDo,21446
2
+ airflow/providers/microsoft/azure/__init__.py,sha256=GlS6DTCOoEQsDH9lJughkhw5BHXYjmMGtBFOEn1rIAw,1503
3
+ airflow/providers/microsoft/azure/get_provider_info.py,sha256=qLunVRhPLcVB3fdQIiIn1j5aqRJ5hELQH6nOIs-W_P4,21476
4
4
  airflow/providers/microsoft/azure/utils.py,sha256=pvBiwBKRYMtEnqkQWLTqvhrsCOkMTRiPH97GkIYHUQc,8429
5
5
  airflow/providers/microsoft/azure/fs/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
6
6
  airflow/providers/microsoft/azure/fs/adls.py,sha256=kXZOVulLNfqwJNR0X9MBN23kcYr3dyv8K_0KqAcWvnk,3679
@@ -21,7 +21,7 @@ airflow/providers/microsoft/azure/hooks/powerbi.py,sha256=TDigFDTxiaFou9GYBFQPLm
21
21
  airflow/providers/microsoft/azure/hooks/synapse.py,sha256=VNFLIA6T55_db9ZgwF6zMY2Ri5hpjOpvLL5zNt8019Y,16595
22
22
  airflow/providers/microsoft/azure/hooks/wasb.py,sha256=pIIjbsWoVRlcQkjbkktyuts1PN8g7Hmw1TJ1jovloHE,29724
23
23
  airflow/providers/microsoft/azure/log/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
24
- airflow/providers/microsoft/azure/log/wasb_task_handler.py,sha256=EG9S43uNgklNcmNAVnziQ1YGoM45fY23cXQmUZsni2Y,8691
24
+ airflow/providers/microsoft/azure/log/wasb_task_handler.py,sha256=SfiBAaNDyMUuwVy8oGSgISfdLnWS62YW-Y_Y6eWuTrA,8459
25
25
  airflow/providers/microsoft/azure/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
26
26
  airflow/providers/microsoft/azure/operators/adls.py,sha256=CSTn9Ukpcs8e5AUEGUM7nmn2vlzRQQ_mRTQ4TsB30pU,5789
27
27
  airflow/providers/microsoft/azure/operators/adx.py,sha256=2dWB1SUHtjn7WmDIKoOONt0Zll9F5n3JJSY2GmNUgRw,3407
@@ -30,7 +30,7 @@ airflow/providers/microsoft/azure/operators/batch.py,sha256=BxhI8H9vzCtvPZo7bjQt
30
30
  airflow/providers/microsoft/azure/operators/container_instances.py,sha256=4V9gNYhwRTr_4rz7Rdlrfuxv975DsHSQKXixtdCtbt0,18383
31
31
  airflow/providers/microsoft/azure/operators/cosmos.py,sha256=EyQQOhQmb0S1N32HrBKagjlij3lkoEPF4LZJ3SRZjHg,2787
32
32
  airflow/providers/microsoft/azure/operators/data_factory.py,sha256=TrPMXlOAY3VHVeoysqJnq-ugBC_H53cKKSGfJfu9Dno,12441
33
- airflow/providers/microsoft/azure/operators/msgraph.py,sha256=OQ07pK0pYDqNH2iiW0ONvFM21DVlfu8yLS2UXmr86w8,11225
33
+ airflow/providers/microsoft/azure/operators/msgraph.py,sha256=38LiJKdmTtD79i0TrYI-3qEnl9IXVPo6oVHrtZCR9A4,11344
34
34
  airflow/providers/microsoft/azure/operators/powerbi.py,sha256=XBKjjesJfcOR0IsD0CQvpAoK6OXbcFFBfO6C_7ihpVY,4733
35
35
  airflow/providers/microsoft/azure/operators/synapse.py,sha256=gDniGvmCUooT8_jvIAJlc8zgPS57d0N_esL4e9xz7bo,12386
36
36
  airflow/providers/microsoft/azure/operators/wasb_delete_blob.py,sha256=GUfV9DLU1bGYvn2TE54iTYBTbxn3Jm_e985pXp_0IsE,2687
@@ -53,7 +53,7 @@ airflow/providers/microsoft/azure/triggers/data_factory.py,sha256=UjSvsvN6bh0BZM
53
53
  airflow/providers/microsoft/azure/triggers/msgraph.py,sha256=PSAyB93ajaM5lCBlm9gjxLatVPpWK_ZsRUAWw5SktRE,8617
54
54
  airflow/providers/microsoft/azure/triggers/powerbi.py,sha256=Il1vWMzHkXAHK1ZUGbpkgerIZLGMuGrq7w9NgM8sQIA,7338
55
55
  airflow/providers/microsoft/azure/triggers/wasb.py,sha256=PkCoOGGNpqOukIeHtgBGrCRPWn4aAOXA6eOOnobzVNw,7429
56
- apache_airflow_providers_microsoft_azure-10.5.0.dist-info/entry_points.txt,sha256=6iWHenOoUC3YZBb3OKn6g0HlJsV58Ba56i8USmQrcJI,111
57
- apache_airflow_providers_microsoft_azure-10.5.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
58
- apache_airflow_providers_microsoft_azure-10.5.0.dist-info/METADATA,sha256=MiCOrDQlhcVm8_rCDE5tnJ-mfeaB6bDiIugogZ55hQo,8477
59
- apache_airflow_providers_microsoft_azure-10.5.0.dist-info/RECORD,,
56
+ apache_airflow_providers_microsoft_azure-10.5.1.dist-info/entry_points.txt,sha256=6iWHenOoUC3YZBb3OKn6g0HlJsV58Ba56i8USmQrcJI,111
57
+ apache_airflow_providers_microsoft_azure-10.5.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
58
+ apache_airflow_providers_microsoft_azure-10.5.1.dist-info/METADATA,sha256=yghOx0zm2_T4-yFgV0UKGVS34bFEaxHMybs8NbxkThQ,8442
59
+ apache_airflow_providers_microsoft_azure-10.5.1.dist-info/RECORD,,