irepo-artifact 0.2.4.dev0__tar.gz → 0.2.4.dev1__tar.gz

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.
Files changed (20) hide show
  1. {irepo_artifact-0.2.4.dev0/src/irepo_artifact.egg-info → irepo_artifact-0.2.4.dev1}/PKG-INFO +5 -4
  2. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/README.md +4 -3
  3. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/pyproject.toml +1 -1
  4. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/client.py +7 -4
  5. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1/src/irepo_artifact.egg-info}/PKG-INFO +5 -4
  6. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/MANIFEST.in +0 -0
  7. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/setup.cfg +0 -0
  8. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/setup.py +0 -0
  9. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/__init__.py +0 -0
  10. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/api.py +0 -0
  11. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/diagnostics.py +0 -0
  12. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/download.py +0 -0
  13. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/errors.py +0 -0
  14. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/layout.py +0 -0
  15. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/manifest_wait.py +0 -0
  16. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/models.py +0 -0
  17. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact/probe.py +0 -0
  18. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact.egg-info/SOURCES.txt +0 -0
  19. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact.egg-info/dependency_links.txt +0 -0
  20. {irepo_artifact-0.2.4.dev0 → irepo_artifact-0.2.4.dev1}/src/irepo_artifact.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: irepo-artifact
3
- Version: 0.2.4.dev0
3
+ Version: 0.2.4.dev1
4
4
  Summary: Standalone HTTP artifact downloads
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -14,7 +14,7 @@ Python 3.10+ 的独立产物下载包。通过 AP 获取链接后 HTTP 下载,
14
14
  发布后安装:
15
15
 
16
16
  ```bash
17
- python -m pip install 'irepo-artifact==0.2.4.dev0'
17
+ python -m pip install 'irepo-artifact==0.2.4.dev1'
18
18
  ```
19
19
 
20
20
  源码开发安装:
@@ -65,8 +65,9 @@ group = client.download_group("group-a", output_dir="group-out")
65
65
 
66
66
  ## 传输与输出
67
67
 
68
- 完整包先请求 `download_mode=oss`。OSS 链接签发返回 502/503 时按需请求
69
- `download_mode=proxy`;取得 OSS 链接后探测内网端点,不可达时也请求 proxy,
68
+ 完整包先请求 `download_mode=oss`。单个 Job 的 OSS 链接签发返回 502/503 时仅为该
69
+ Job 请求 `download_mode=proxy`;批量签发返回 502/503 时逐 Job 重试 OSS 签发并分别
70
+ 回退。取得可用 OSS 链接后探测一次内网端点,不可达时也请求 proxy,
70
71
  可达时使用 OSS。OSS 实际下载发生远端故障时,为该 Job
71
72
  另行请求 proxy 链接并从头下载。单 Job 与批量下载使用相同策略。
72
73
  未返回 `downloads`(或为 null/空对象)时使用旧版单 `url`,也支持 dataplane 地址。
@@ -7,7 +7,7 @@ Python 3.10+ 的独立产物下载包。通过 AP 获取链接后 HTTP 下载,
7
7
  发布后安装:
8
8
 
9
9
  ```bash
10
- python -m pip install 'irepo-artifact==0.2.4.dev0'
10
+ python -m pip install 'irepo-artifact==0.2.4.dev1'
11
11
  ```
12
12
 
13
13
  源码开发安装:
@@ -58,8 +58,9 @@ group = client.download_group("group-a", output_dir="group-out")
58
58
 
59
59
  ## 传输与输出
60
60
 
61
- 完整包先请求 `download_mode=oss`。OSS 链接签发返回 502/503 时按需请求
62
- `download_mode=proxy`;取得 OSS 链接后探测内网端点,不可达时也请求 proxy,
61
+ 完整包先请求 `download_mode=oss`。单个 Job 的 OSS 链接签发返回 502/503 时仅为该
62
+ Job 请求 `download_mode=proxy`;批量签发返回 502/503 时逐 Job 重试 OSS 签发并分别
63
+ 回退。取得可用 OSS 链接后探测一次内网端点,不可达时也请求 proxy,
63
64
  可达时使用 OSS。OSS 实际下载发生远端故障时,为该 Job
64
65
  另行请求 proxy 链接并从头下载。单 Job 与批量下载使用相同策略。
65
66
  未返回 `downloads`(或为 null/空对象)时使用旧版单 `url`,也支持 dataplane 地址。
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "irepo-artifact"
7
- version = "0.2.4.dev0"
7
+ version = "0.2.4.dev1"
8
8
  description = "Standalone HTTP artifact downloads"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -43,7 +43,7 @@ def _archive_targets(api, job_ids, mode, metadata, *, tolerate_errors=False):
43
43
  job_ids, mode=mode, metadata=metadata, tolerate_errors=tolerate_errors)
44
44
  return targets, mode
45
45
  except _APStatus as exc:
46
- if mode != 'oss' or exc.status not in (502, 503):
46
+ if mode != 'oss' or exc.status not in (502, 503) or len(job_ids) > 1:
47
47
  raise
48
48
  targets = api.get_archive_targets(
49
49
  job_ids, mode='proxy', metadata=metadata, tolerate_errors=tolerate_errors)
@@ -209,7 +209,7 @@ class ArtifactClient:
209
209
  jid = ids[0]
210
210
  raw = {}
211
211
  try:
212
- signed_targets, link_mode = _archive_targets(
212
+ signed_targets, _ = _archive_targets(
213
213
  self._api, [jid], 'oss', raw, tolerate_errors=True)
214
214
  signed = signed_targets[jid]
215
215
  except ArtifactError as exc:
@@ -231,11 +231,14 @@ class ArtifactClient:
231
231
  if not (includes or excludes):
232
232
  to_sign = [jid for jid in ready if jid not in prefetched]
233
233
  try:
234
- signed_targets, link_mode = _archive_targets(
234
+ signed_targets, _ = _archive_targets(
235
235
  self._api, to_sign, link_mode, raw, tolerate_errors=True)
236
236
  targets.update(signed_targets)
237
237
  except ArtifactError as exc:
238
- if len(to_sign) > 1 and getattr(exc, '_request_status', None) in (403, 404):
238
+ if len(to_sign) > 1 and (
239
+ getattr(exc, '_request_status', None) in (403, 404) or
240
+ isinstance(exc, _APStatus) and link_mode == 'oss' and
241
+ exc.status in (502, 503)):
239
242
  # No links were issued. Let the existing workers
240
243
  # sign each Job independently before downloading.
241
244
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: irepo-artifact
3
- Version: 0.2.4.dev0
3
+ Version: 0.2.4.dev1
4
4
  Summary: Standalone HTTP artifact downloads
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -14,7 +14,7 @@ Python 3.10+ 的独立产物下载包。通过 AP 获取链接后 HTTP 下载,
14
14
  发布后安装:
15
15
 
16
16
  ```bash
17
- python -m pip install 'irepo-artifact==0.2.4.dev0'
17
+ python -m pip install 'irepo-artifact==0.2.4.dev1'
18
18
  ```
19
19
 
20
20
  源码开发安装:
@@ -65,8 +65,9 @@ group = client.download_group("group-a", output_dir="group-out")
65
65
 
66
66
  ## 传输与输出
67
67
 
68
- 完整包先请求 `download_mode=oss`。OSS 链接签发返回 502/503 时按需请求
69
- `download_mode=proxy`;取得 OSS 链接后探测内网端点,不可达时也请求 proxy,
68
+ 完整包先请求 `download_mode=oss`。单个 Job 的 OSS 链接签发返回 502/503 时仅为该
69
+ Job 请求 `download_mode=proxy`;批量签发返回 502/503 时逐 Job 重试 OSS 签发并分别
70
+ 回退。取得可用 OSS 链接后探测一次内网端点,不可达时也请求 proxy,
70
71
  可达时使用 OSS。OSS 实际下载发生远端故障时,为该 Job
71
72
  另行请求 proxy 链接并从头下载。单 Job 与批量下载使用相同策略。
72
73
  未返回 `downloads`(或为 null/空对象)时使用旧版单 `url`,也支持 dataplane 地址。