Skip to content

Commit 3cef719

Browse files
author
liyan.90210
committed
feat auto update sdk
1 parent e99907b commit 3cef719

8 files changed

Lines changed: 541 additions & 30 deletions

File tree

Changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### Change log
22

3+
2026-07-16 Bumped to version v1.0.226
4+
- Updated apis for imagex/tls
5+
36
2026-07-09 Bumped to version v1.0.225
47
- Updated apis for vod
58

volcengine/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# coding:utf-8
2-
VERSION='v1.0.225'
2+
VERSION='v1.0.226'

volcengine/imagex/ImageXService.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from volcengine.util.Util import *
1212
from volcengine.Policy import *
1313
from volcengine.imagex.ImageXConfig import *
14-
from retry import retry
14+
from tenacity import retry, stop_after_attempt, wait_exponential
1515

1616

1717
class Uploader:
@@ -75,7 +75,7 @@ def async_upload(self):
7575
'Error': e,
7676
})
7777

78-
@retry(tries=3, delay=1, backoff=2)
78+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
7979
def upload_by_host(self, store_info, img_data):
8080
url = 'https://{}/{}'.format(self.host, store_info['StoreUri'])
8181
check_sum = crc32(img_data) & 0xFFFFFFFF
@@ -104,7 +104,7 @@ def chunk_upload(self, store_info, f, size, is_large_file):
104104
parts.append(part)
105105
return self.upload_merge_part(store_info, upload_id, parts, is_large_file)
106106

107-
@retry(tries=3, delay=1, backoff=2)
107+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
108108
def init_upload_part(self, store_info, is_large_file):
109109
url = 'https://{}/{}?uploads'.format(self.host, store_info['StoreUri'])
110110
headers = {'Authorization': store_info['Auth']}
@@ -118,7 +118,7 @@ def init_upload_part(self, store_info, is_large_file):
118118
raise Exception("init upload error")
119119
return resp['payload']['uploadID']
120120

121-
@retry(tries=3, delay=1, backoff=2)
121+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
122122
def upload_part(self, store_info, upload_id, part_number, data, is_large_file):
123123
url = 'https://{}/{}?partNumber={}&uploadID={}'.format(self.host, store_info['StoreUri'], part_number,
124124
upload_id)
@@ -146,7 +146,7 @@ def generate_merge_body(check_sum_list):
146146
comma = ','
147147
return comma.join(s)
148148

149-
@retry(tries=3, delay=1, backoff=2)
149+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
150150
def upload_merge_part(self, store_info, upload_id, check_sum_list, is_large_file):
151151
url = 'https://{}/{}?uploadID={}'.format(self.host, store_info['StoreUri'], upload_id)
152152
data = self.generate_merge_body(check_sum_list)

volcengine/imagex/v2/upload.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from volcengine.Policy import *
88
from volcengine.imagex.v2.const import *
99

10-
from retry import retry
10+
from tenacity import retry, stop_after_attempt, wait_exponential
1111
from urllib.parse import quote
1212

1313
try:
@@ -95,7 +95,7 @@ def async_upload(self):
9595
}
9696
)
9797

98-
@retry(tries=3, delay=1, backoff=2)
98+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
9999
def upload_by_host(self, store_info, img_data, param=None):
100100
if param is None:
101101
param = {}
@@ -136,7 +136,7 @@ def chunk_upload(self, store_info, f, size, is_large_file, param=None):
136136
parts.append(part)
137137
return self.upload_merge_part(store_info, upload_id, parts, is_large_file, param)
138138

139-
@retry(tries=3, delay=1, backoff=2)
139+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
140140
def init_upload_part(self, store_info, is_large_file, param=None):
141141
if param is None:
142142
param = {}
@@ -156,7 +156,7 @@ def init_upload_part(self, store_info, is_large_file, param=None):
156156
raise Exception("init upload error")
157157
return resp["payload"]["uploadID"]
158158

159-
@retry(tries=3, delay=1, backoff=2)
159+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
160160
def upload_part(self, store_info, upload_id, part_number, data, is_large_file):
161161
url = "https://{}/{}?partNumber={}&uploadID={}".format(
162162
self.host, quote(store_info["StoreUri"]), part_number, upload_id
@@ -185,7 +185,7 @@ def generate_merge_body(check_sum_list):
185185
comma = ","
186186
return comma.join(s)
187187

188-
@retry(tries=3, delay=1, backoff=2)
188+
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=1), reraise=True)
189189
def upload_merge_part(self, store_info, upload_id, check_sum_list, is_large_file, param=None):
190190
if param is None:
191191
param = {}

volcengine/tls/const.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,12 @@
560560
QUERY_PARAMS = "QueryParams"
561561
SCHEDULE_SQL_TASK_INFO = "ScheduleSqlTaskInfo"
562562
SHIPPER_TO_TOS_INFO = "ShipperToTosInfo"
563+
SHIPPER_TO_AGENT_LOOP_INFO = "ShipperToAgentLoopInfo"
564+
ETL_TASK_INFO = "ETLTaskInfo"
563565
LOG_BACK_FLOW_TASKS = "LogBackFlowTasks"
564566
RELA_TASKS_INFO = "RelaTasksInfo"
567+
LOG_BACK_FLOW_ETL_TASK_ID = "ETLTaskId"
568+
ETL_TASK_NAME = "ETLTaskName"
565569
SCHEDULE_SQL_TASK_ID = "ScheduleSQLTaskId"
566570
SCHEDULE_SQL_TASK_NAME = "ScheduleSQLTaskName"
567571
SOURCE_TYPE = "SourceType"
@@ -583,6 +587,28 @@
583587
PROCESS_START_TIME = "ProcessStartTime"
584588
PROCESS_END_TIME = "ProcessEndTime"
585589
PROCESS_SQL_DELAY = "ProcessSqlDelay"
590+
EVALUATION_SET_SHIPPER_INFO = "EvaluationSetShipperInfo"
591+
WORKSPACE_ID = "WorkspaceId"
592+
EVALUATION_SET_ID = "EvaluationSetId"
593+
EVALUATION_SET_NAME = "EvaluationSetName"
594+
EVALUATION_SET_DESCRIPTION = "EvaluationSetDescription"
595+
BIZ_CATEGORY = "BizCategory"
596+
EVALUATION_SET_SCHEMA = "EvaluationSetSchema"
597+
FIELD_SCHEMAS = "FieldSchemas"
598+
FIELD_MAPPINGS = "FieldMappings"
599+
ITEM_KEY_FIELD = "ItemKeyField"
600+
BATCH_SIZE = "BatchSize"
601+
SKIP_INVALID_ITEMS = "SkipInvalidItems"
602+
ALLOW_PARTIAL_ADD = "AllowPartialAdd"
603+
604+
LOG_BACK_FLOW_TASK_STATUS_DONE = "DONE"
605+
LOG_BACK_FLOW_TASK_STATUS_CREATING = "CREATING"
606+
LOG_BACK_FLOW_TASK_STATUS_FINISHED = "FINISHED"
607+
LOG_BACK_FLOW_TASK_STATUS_DELETING = "DELETING"
608+
LOG_BACK_FLOW_TASK_STATUS_CREATE_FAILED = "CREATEFAILED"
609+
LOG_BACK_FLOW_TASK_STATUS_RUN_FAILED = "RUNFAILED"
610+
PARQUET_INFO = "ParquetInfo"
611+
TRANS_TYPE = "TransType"
586612
PROCESS_TIME_WINDOW = "ProcessTimeWindow"
587613
CREATE_TIME_STAMP = "CreateTimeStamp"
588614
MODIFY_TIME_STAMP = "ModifyTimeStamp"

0 commit comments

Comments
 (0)