Skip to content

Commit 957b750

Browse files
authored
Batch updates for 15.1.0 (#46415)
* updating chagnelog and review feedback
1 parent fa82d6d commit 957b750

15 files changed

Lines changed: 400 additions & 184 deletions

File tree

sdk/batch/azure-batch/CHANGELOG.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,52 @@
44

55
### Other Changes
66

7-
- This is the GA release of the features introduced in the 15.0.0 and 15.1.0 beta versions, including LRO support, job-level FIFO scheduling, CMK support on pools, IPv6 support, metadata security protocol support, IP tag support, and confidential VM enhancements. No additional changes were made from the last beta release.
7+
- This is the GA release of the features introduced in the 15.0.0 and 15.1.0 beta versions, including LRO support, job-level FIFO scheduling, CMK support on pools, IPv6 support, metadata security protocol support, IP tag support, and confidential VM enhancements.
8+
9+
### Breaking Changes
10+
11+
- Renamed `BatchNodeUserUpdateOptions` to `BatchNodeUserReplaceOptions`.
12+
- Renamed `OutputFileUploadConfig` to `OutputFileUploadConfiguration`.
13+
14+
- Removed Models:
15+
- Removed `AuthenticationTokenSettings`
16+
17+
- NameSpace changed `azure.batch.models._models`:
18+
- `BatchJobTerminateOptions`
19+
- `BatchNodeDeallocateOptions`
20+
- `BatchNodeRebootOptions`
21+
- `BatchNodeReimageOptions`
22+
23+
- Removed Enums:
24+
- Removed `BatchAccessScope`
25+
26+
- NameSpace changed `azure.batch.models._enums`:
27+
- `BatchNodeDeallocateOption`
28+
- `BatchNodeRebootKind`
29+
- `BatchNodeReimageOption`
30+
31+
- Renamed public methods:
32+
- `list_sub_tasks` -> `list_subtasks`
33+
- `get_task_file` -> `download_task_file`
34+
- `get_node_file` -> `download_node_file`
35+
36+
- Renamed parameters across all operation methods:
37+
- `timeout` -> `service_timeout`
38+
- `ocpdate` -> `ocp_date`
39+
- `starttime` -> `start_time`
40+
- `endtime` -> `end_time`
41+
- `concurrencies` -> `max_concurrency`
42+
43+
- Renamed properties in models:
44+
- `e_tag` -> `etag` in `BatchJob`, `BatchJobSchedule`, `BatchPool`, `BatchTask`, and `BatchTaskCreateResult`
45+
- `values_property` -> `error_values` in `AutoScaleRunError`, `BatchError`, and `ResizeError`
46+
- `values_property` -> `result_values` in `CollectionResult`
47+
- `values_property` -> `task_values` in `BatchTaskGroup`
48+
- `avg_memory_gi_b` -> `avg_memory_gib`, `peak_memory_gi_b` -> `peak_memory_gib`, `avg_disk_gi_b` -> `avg_disk_gib`, `peak_disk_gi_b` -> `peak_disk_gib`, `disk_read_gi_b` -> `disk_read_gib`, `disk_write_gi_b` -> `disk_write_gib`, `network_read_gi_b` -> `network_read_gib`, `network_write_gi_b` -> `network_write_gib` in `BatchPoolResourceStatistics`
49+
50+
- Removed Properties:
51+
- Removed `authentication_token_settings` from `BatchJobManagerTask`, `BatchStartTask`, and `BatchTask`
52+
- Removed `access` from `AuthenticationTokenSettings`
853

954
## 15.1.0b3 (2026-02-05)
1055

sdk/batch/azure-batch/apiview-properties.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"azure.batch.models.OutputFile": "Azure.Batch.OutputFile",
129129
"azure.batch.models.OutputFileBlobContainerDestination": "Azure.Batch.OutputFileBlobContainerDestination",
130130
"azure.batch.models.OutputFileDestination": "Azure.Batch.OutputFileDestination",
131-
"azure.batch.models.OutputFileUploadConfig": "Azure.Batch.OutputFileUploadConfig",
131+
"azure.batch.models.OutputFileUploadConfiguration": "Azure.Batch.OutputFileUploadConfig",
132132
"azure.batch.models.OutputFileUploadHeader": "Azure.Batch.OutputFileUploadHeader",
133133
"azure.batch.models.ProxyAgentSettings": "Azure.Batch.ProxyAgentSettings",
134134
"azure.batch.models.RecentBatchJob": "Azure.Batch.RecentBatchJob",
@@ -269,16 +269,16 @@
269269
"azure.batch.aio.BatchClient.get_task": "Client.BatchClient.getTask",
270270
"azure.batch.BatchClient.replace_task": "Client.BatchClient.replaceTask",
271271
"azure.batch.aio.BatchClient.replace_task": "Client.BatchClient.replaceTask",
272-
"azure.batch.BatchClient.list_sub_tasks": "Client.BatchClient.listSubTasks",
273-
"azure.batch.aio.BatchClient.list_sub_tasks": "Client.BatchClient.listSubTasks",
272+
"azure.batch.BatchClient.list_subtasks": "Client.BatchClient.listSubTasks",
273+
"azure.batch.aio.BatchClient.list_subtasks": "Client.BatchClient.listSubTasks",
274274
"azure.batch.BatchClient.terminate_task": "Client.BatchClient.terminateTask",
275275
"azure.batch.aio.BatchClient.terminate_task": "Client.BatchClient.terminateTask",
276276
"azure.batch.BatchClient.reactivate_task": "Client.BatchClient.reactivateTask",
277277
"azure.batch.aio.BatchClient.reactivate_task": "Client.BatchClient.reactivateTask",
278278
"azure.batch.BatchClient.delete_task_file": "Client.BatchClient.deleteTaskFile",
279279
"azure.batch.aio.BatchClient.delete_task_file": "Client.BatchClient.deleteTaskFile",
280-
"azure.batch.BatchClient.get_task_file": "Client.BatchClient.getTaskFile",
281-
"azure.batch.aio.BatchClient.get_task_file": "Client.BatchClient.getTaskFile",
280+
"azure.batch.BatchClient.download_task_file": "Client.BatchClient.getTaskFile",
281+
"azure.batch.aio.BatchClient.download_task_file": "Client.BatchClient.getTaskFile",
282282
"azure.batch.BatchClient.list_task_files": "Client.BatchClient.listTaskFiles",
283283
"azure.batch.aio.BatchClient.list_task_files": "Client.BatchClient.listTaskFiles",
284284
"azure.batch.BatchClient.create_node_user": "Client.BatchClient.createNodeUser",
@@ -305,8 +305,8 @@
305305
"azure.batch.aio.BatchClient.list_node_extensions": "Client.BatchClient.listNodeExtensions",
306306
"azure.batch.BatchClient.delete_node_file": "Client.BatchClient.deleteNodeFile",
307307
"azure.batch.aio.BatchClient.delete_node_file": "Client.BatchClient.deleteNodeFile",
308-
"azure.batch.BatchClient.get_node_file": "Client.BatchClient.getNodeFile",
309-
"azure.batch.aio.BatchClient.get_node_file": "Client.BatchClient.getNodeFile",
308+
"azure.batch.BatchClient.download_node_file": "Client.BatchClient.getNodeFile",
309+
"azure.batch.aio.BatchClient.download_node_file": "Client.BatchClient.getNodeFile",
310310
"azure.batch.BatchClient.list_node_files": "Client.BatchClient.listNodeFiles",
311311
"azure.batch.aio.BatchClient.list_node_files": "Client.BatchClient.listNodeFiles"
312312
}

sdk/batch/azure-batch/azure/batch/_model_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,16 +821,16 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
821821

822822
# is it optional?
823823
try:
824-
if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore
824+
if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore # pylint: disable=unidiomatic-typecheck
825825
if len(annotation.__args__) <= 2: # pyright: ignore
826826
if_obj_deserializer = _get_deserialize_callable_from_annotation(
827-
next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore
827+
next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore # pylint: disable=unidiomatic-typecheck
828828
)
829829

830830
return functools.partial(_deserialize_with_optional, if_obj_deserializer)
831831
# the type is Optional[Union[...]], we need to remove the None type from the Union
832832
annotation_copy = copy.copy(annotation)
833-
annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore
833+
annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore # pylint: disable=unidiomatic-typecheck
834834
return _get_deserialize_callable_from_annotation(annotation_copy, module, rf)
835835
except AttributeError:
836836
pass

sdk/batch/azure-batch/azure/batch/_operations/_operations.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ def build_batch_replace_task_request(
19681968
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
19691969

19701970

1971-
def build_batch_list_sub_tasks_request(
1971+
def build_batch_list_subtasks_request(
19721972
job_id: str,
19731973
task_id: str,
19741974
*,
@@ -2139,7 +2139,7 @@ def build_batch_delete_task_file_request(
21392139
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
21402140

21412141

2142-
def build_batch_get_task_file_request(
2142+
def build_batch_download_task_file_request(
21432143
job_id: str,
21442144
task_id: str,
21452145
file_path: str,
@@ -2862,7 +2862,7 @@ def build_batch_delete_node_file_request(
28622862
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
28632863

28642864

2865-
def build_batch_get_node_file_request(
2865+
def build_batch_download_node_file_request(
28662866
pool_id: str,
28672867
node_id: str,
28682868
file_path: str,
@@ -8245,7 +8245,7 @@ def replace_task( # pylint: disable=inconsistent-return-statements
82458245
return cls(pipeline_response, None, response_headers) # type: ignore
82468246

82478247
@distributed_trace
8248-
def list_sub_tasks(
8248+
def list_subtasks(
82498249
self,
82508250
job_id: str,
82518251
task_id: str,
@@ -8293,7 +8293,7 @@ def list_sub_tasks(
82938293
def prepare_request(next_link=None):
82948294
if not next_link:
82958295

8296-
_request = build_batch_list_sub_tasks_request(
8296+
_request = build_batch_list_subtasks_request(
82978297
job_id=job_id,
82988298
task_id=task_id,
82998299
service_timeout=service_timeout,
@@ -8684,7 +8684,7 @@ def delete_task_file( # pylint: disable=inconsistent-return-statements
86848684
return cls(pipeline_response, None, response_headers) # type: ignore
86858685

86868686
@distributed_trace
8687-
def get_task_file(
8687+
def download_task_file(
86888688
self,
86898689
job_id: str,
86908690
task_id: str,
@@ -8744,7 +8744,7 @@ def get_task_file(
87448744

87458745
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
87468746

8747-
_request = build_batch_get_task_file_request(
8747+
_request = build_batch_download_task_file_request(
87488748
job_id=job_id,
87498749
task_id=task_id,
87508750
file_path=file_path,
@@ -10631,7 +10631,7 @@ def delete_node_file( # pylint: disable=inconsistent-return-statements
1063110631
return cls(pipeline_response, None, response_headers) # type: ignore
1063210632

1063310633
@distributed_trace
10634-
def get_node_file(
10634+
def download_node_file(
1063510635
self,
1063610636
pool_id: str,
1063710637
node_id: str,
@@ -10691,7 +10691,7 @@ def get_node_file(
1069110691

1069210692
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
1069310693

10694-
_request = build_batch_get_node_file_request(
10694+
_request = build_batch_download_node_file_request(
1069510695
pool_id=pool_id,
1069610696
node_id=node_id,
1069710697
file_path=file_path,

sdk/batch/azure-batch/azure/batch/_operations/_patch.py

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
135135
),
136136
)
137137

138-
polling_method = DeleteJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
138+
polling_method = DeleteJobPollingMethod(
139+
client=self,
140+
initial_response=pipeline_response,
141+
deserialization_callback=None,
142+
job_id=job_id,
143+
polling_interval=polling_interval,
144+
)
139145
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
140146

141147
@distributed_trace
@@ -217,7 +223,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
217223
),
218224
)
219225

220-
polling_method = DisableJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
226+
polling_method = DisableJobPollingMethod(
227+
self, pipeline_response, None, job_id, polling_interval=polling_interval
228+
)
221229
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
222230

223231
@distributed_trace
@@ -292,7 +300,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
292300
),
293301
)
294302

295-
polling_method = EnableJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
303+
polling_method = EnableJobPollingMethod(
304+
self, pipeline_response, None, job_id, polling_interval=polling_interval
305+
)
296306
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
297307

298308
@distributed_trace
@@ -367,7 +377,7 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
367377
)
368378

369379
polling_method = DeleteJobSchedulePollingMethod(
370-
self, pipeline_response, None, job_schedule_id, polling_interval
380+
self, pipeline_response, None, job_schedule_id, polling_interval=polling_interval
371381
)
372382
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
373383

@@ -450,7 +460,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
450460
),
451461
)
452462

453-
polling_method = DeletePoolPollingMethod(self, pipeline_response, None, pool_id, polling_interval)
463+
polling_method = DeletePoolPollingMethod(
464+
self, pipeline_response, None, pool_id, polling_interval=polling_interval
465+
)
454466
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
455467

456468
@distributed_trace
@@ -506,7 +518,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
506518
),
507519
)
508520

509-
polling_method = DeallocateNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
521+
polling_method = DeallocateNodePollingMethod(
522+
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
523+
)
510524
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
511525

512526
@distributed_trace
@@ -562,7 +576,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
562576
),
563577
)
564578

565-
polling_method = RebootNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
579+
polling_method = RebootNodePollingMethod(
580+
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
581+
)
566582
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
567583

568584
@distributed_trace
@@ -622,7 +638,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
622638
),
623639
)
624640

625-
polling_method = ReimageNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
641+
polling_method = ReimageNodePollingMethod(
642+
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
643+
)
626644
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
627645

628646
@distributed_trace
@@ -699,7 +717,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
699717
),
700718
)
701719

702-
polling_method = RemoveNodePollingMethod(self, pipeline_response, None, pool_id, polling_interval)
720+
polling_method = RemoveNodePollingMethod(
721+
self, pipeline_response, None, pool_id, polling_interval=polling_interval
722+
)
703723
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
704724

705725
@distributed_trace
@@ -780,7 +800,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
780800
),
781801
)
782802

783-
polling_method = ResizePoolPollingMethod(self, pipeline_response, None, pool_id, polling_interval)
803+
polling_method = ResizePoolPollingMethod(
804+
self, pipeline_response, None, pool_id, polling_interval=polling_interval
805+
)
784806
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
785807

786808
@distributed_trace
@@ -832,7 +854,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
832854
),
833855
)
834856

835-
polling_method = StartNodePollingMethod(self, pipeline_response, None, pool_id, node_id, polling_interval)
857+
polling_method = StartNodePollingMethod(
858+
self, pipeline_response, None, pool_id, node_id=node_id, polling_interval=polling_interval
859+
)
836860
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
837861

838862
@distributed_trace
@@ -909,7 +933,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
909933
),
910934
)
911935

912-
polling_method = StopPoolResizePollingMethod(self, pipeline_response, None, pool_id, polling_interval)
936+
polling_method = StopPoolResizePollingMethod(
937+
self, pipeline_response, None, pool_id, polling_interval=polling_interval
938+
)
913939
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
914940

915941
@distributed_trace
@@ -994,7 +1020,9 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
9941020
),
9951021
)
9961022

997-
polling_method = TerminateJobPollingMethod(self, pipeline_response, None, job_id, polling_interval)
1023+
polling_method = TerminateJobPollingMethod(
1024+
self, pipeline_response, None, job_id, polling_interval=polling_interval
1025+
)
9981026
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
9991027

10001028
@distributed_trace
@@ -1070,7 +1098,7 @@ def capture_pipeline_response(pipeline_response, _deserialized, _response_header
10701098
)
10711099

10721100
polling_method = TerminateJobSchedulePollingMethod(
1073-
self, pipeline_response, None, job_schedule_id, polling_interval
1101+
self, pipeline_response, None, job_schedule_id, polling_interval=polling_interval
10741102
)
10751103
return LROPoller(self, pipeline_response, lambda _: None, polling_method, **kwargs)
10761104

@@ -1081,7 +1109,7 @@ def create_tasks(
10811109
job_id: str,
10821110
task_collection: List[_models.BatchTaskCreateOptions],
10831111
*,
1084-
max_concurrency: int = 0,
1112+
max_concurrency: Optional[int] = None,
10851113
service_timeout: Optional[int] = None,
10861114
ocp_date: Optional[datetime.datetime] = None,
10871115
**kwargs: Any
@@ -1161,7 +1189,7 @@ def create_tasks(
11611189
return _models.BatchCreateTaskCollectionResult(result_values=submitted_tasks)
11621190

11631191
@distributed_trace
1164-
def get_node_file(
1192+
def download_node_file(
11651193
self,
11661194
pool_id: str,
11671195
node_id: str,
@@ -1218,7 +1246,7 @@ def get_node_file(
12181246
}
12191247
)
12201248
kwargs["stream"] = True
1221-
return super().get_node_file(*args, **kwargs)
1249+
return super().download_node_file(*args, **kwargs)
12221250

12231251
@distributed_trace
12241252
def get_node_file_properties(
@@ -1357,7 +1385,7 @@ def cls(_pipeline_response, _json_response, headers):
13571385
return get_response
13581386

13591387
@distributed_trace
1360-
def get_task_file(
1388+
def download_task_file(
13611389
self,
13621390
job_id: str,
13631391
task_id: str,
@@ -1415,7 +1443,7 @@ def get_task_file(
14151443
}
14161444
)
14171445
kwargs["stream"] = True
1418-
return super().get_task_file(*args, **kwargs)
1446+
return super().download_task_file(*args, **kwargs)
14191447

14201448

14211449
def patch_sdk():

0 commit comments

Comments
 (0)