object-storage-client 0.2.0__tar.gz → 0.2.1__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 (192) hide show
  1. object_storage_client-0.2.1/.cargo/config.toml +2 -0
  2. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/.gitattributes +1 -0
  3. object_storage_client-0.2.1/.github/dependabot.yml +18 -0
  4. object_storage_client-0.2.1/.github/workflows/ci.yaml +353 -0
  5. object_storage_client-0.2.1/.github/workflows/perf.yaml +71 -0
  6. object_storage_client-0.2.1/.github/workflows/tests.yaml +247 -0
  7. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/.gitignore +3 -0
  8. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/Cargo.lock +518 -3
  9. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/Cargo.toml +13 -2
  10. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/PKG-INFO +38 -8
  11. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/README.md +35 -7
  12. object_storage_client-0.2.1/THIRD_PARTY_LICENSES.html +6374 -0
  13. object_storage_client-0.2.1/about.hbs +41 -0
  14. object_storage_client-0.2.1/about.toml +26 -0
  15. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/benches/throughput.rs +10 -3
  16. object_storage_client-0.2.1/deny.toml +19 -0
  17. object_storage_client-0.2.1/docs/BEHAVIOR.md +297 -0
  18. object_storage_client-0.2.1/docs/CONFIGURATION.md +215 -0
  19. object_storage_client-0.2.1/docs/DEVELOPMENT.md +161 -0
  20. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/docs/ENCRYPTION.md +156 -30
  21. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/docs/TESTING.md +35 -12
  22. object_storage_client-0.2.1/docs/UPGRADING.md +359 -0
  23. object_storage_client-0.2.1/proptest-regressions/encryption/context.txt +7 -0
  24. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/pyproject.toml +2 -1
  25. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/python/object_storage_client/__init__.py +17 -4
  26. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/python/object_storage_client/__init__.pyi +137 -18
  27. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/python/object_storage_client/_stream.py +81 -30
  28. object_storage_client-0.2.1/scripts/hostile-env.sh +58 -0
  29. object_storage_client-0.2.1/src/backend/aws_profile.rs +1347 -0
  30. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/backend/azure.rs +135 -19
  31. object_storage_client-0.2.1/src/backend/connector.rs +298 -0
  32. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/backend/gcs.rs +144 -30
  33. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/backend/http.rs +53 -5
  34. object_storage_client-0.2.1/src/backend/local.rs +150 -0
  35. object_storage_client-0.2.1/src/backend/mod.rs +594 -0
  36. object_storage_client-0.2.1/src/backend/s3.rs +1188 -0
  37. object_storage_client-0.2.1/src/backend/stub.rs +152 -0
  38. object_storage_client-0.2.1/src/cli/args.rs +224 -0
  39. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/cli/enc.rs +131 -68
  40. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/cli/keyring.rs +171 -33
  41. object_storage_client-0.2.1/src/cli/output/tests.rs +16 -0
  42. object_storage_client-0.2.1/src/cli/output.rs +100 -0
  43. object_storage_client-0.2.1/src/cli/tests.rs +133 -0
  44. object_storage_client-0.2.1/src/cli/transfer/tests.rs +185 -0
  45. object_storage_client-0.2.1/src/cli/transfer.rs +411 -0
  46. object_storage_client-0.2.1/src/cli/tree/tests.rs +236 -0
  47. object_storage_client-0.2.1/src/cli/tree.rs +435 -0
  48. object_storage_client-0.2.1/src/cli.rs +432 -0
  49. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/client/local_delete.rs +3 -28
  50. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/client.rs +715 -120
  51. object_storage_client-0.2.1/src/codec.rs +1014 -0
  52. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/context.rs +48 -3
  53. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/envelope.rs +726 -209
  54. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/frame.rs +192 -54
  55. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/fuzzing.rs +83 -3
  56. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/header.rs +70 -3
  57. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/keys/keyring/tests.rs +155 -10
  58. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/keys/keyring.rs +83 -26
  59. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/keys/mod.rs +5 -3
  60. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/keys/raw_aes.rs +21 -0
  61. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/mod.rs +4 -1
  62. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/suite.rs +106 -2
  63. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/tamper_tests.rs +85 -18
  64. object_storage_client-0.2.1/src/fsmode.rs +248 -0
  65. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/lib.rs +7 -0
  66. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/main.rs +76 -10
  67. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/python/client.rs +134 -68
  68. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/python/encryption.rs +106 -29
  69. object_storage_client-0.2.1/src/python/mod.rs +213 -0
  70. object_storage_client-0.2.1/src/python/stream.rs +628 -0
  71. object_storage_client-0.2.1/src/registry.rs +604 -0
  72. object_storage_client-0.2.1/src/sign.rs +207 -0
  73. object_storage_client-0.2.1/src/text.rs +63 -0
  74. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/upload.rs +589 -57
  75. object_storage_client-0.2.1/tests/functional/aws_profile.rs +376 -0
  76. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/functional/cli.rs +1230 -170
  77. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/functional/client.rs +397 -148
  78. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/functional/encryption.rs +168 -6
  79. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/functional/golden.rs +68 -65
  80. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/functional/suite.rs +79 -9
  81. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/functional.rs +3 -0
  82. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/common/mod.rs +61 -7
  83. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/encryption.rs +2 -3
  84. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/perf_guards.rs +20 -2
  85. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/conftest.py +55 -0
  86. object_storage_client-0.2.1/tests/python/test_abort_at_exit.py +149 -0
  87. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_encrypted_client.py +72 -1
  88. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_encryption_runtime.py +50 -30
  89. object_storage_client-0.2.1/tests/python/test_free_threading.py +16 -0
  90. object_storage_client-0.2.1/tests/python/test_gil_contention.py +144 -0
  91. object_storage_client-0.2.1/tests/python/test_list_stream.py +159 -0
  92. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_plain_client.py +220 -38
  93. object_storage_client-0.2.1/tests/python/test_profile.py +114 -0
  94. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_stream_leak.py +51 -1
  95. object_storage_client-0.2.1/tests/python/test_stub_conformance.py +150 -0
  96. object_storage_client-0.2.1/tests/python/test_worker_threads.py +113 -0
  97. object_storage_client-0.2.1/tests/support/mock.rs +207 -0
  98. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/support/mod.rs +53 -0
  99. object_storage_client-0.2.1/tests/unit/sign.rs +209 -0
  100. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/README.md +4 -2
  101. object_storage_client-0.2.0/.cargo/config.toml +0 -10
  102. object_storage_client-0.2.0/.github/dependabot.yml +0 -8
  103. object_storage_client-0.2.0/.github/workflows/ci.yaml +0 -173
  104. object_storage_client-0.2.0/.github/workflows/dependabot-automerge.yml +0 -82
  105. object_storage_client-0.2.0/.github/workflows/perf.yaml +0 -50
  106. object_storage_client-0.2.0/.github/workflows/tests.yaml +0 -99
  107. object_storage_client-0.2.0/docs/BEHAVIOR.md +0 -125
  108. object_storage_client-0.2.0/docs/CONFIGURATION.md +0 -77
  109. object_storage_client-0.2.0/docs/DEVELOPMENT.md +0 -71
  110. object_storage_client-0.2.0/docs/UPGRADING.md +0 -68
  111. object_storage_client-0.2.0/docs/superpowers/plans/2026-10-26-client-side-encryption.md +0 -661
  112. object_storage_client-0.2.0/docs/superpowers/plans/2026-10-27-performance.md +0 -176
  113. object_storage_client-0.2.0/docs/superpowers/plans/2026-10-27-refactoring.md +0 -166
  114. object_storage_client-0.2.0/docs/superpowers/specs/2026-10-26-client-side-encryption-design.md +0 -585
  115. object_storage_client-0.2.0/docs/superpowers/specs/2026-10-27-key-rotation-design.md +0 -426
  116. object_storage_client-0.2.0/src/backend/local.rs +0 -74
  117. object_storage_client-0.2.0/src/backend/mod.rs +0 -328
  118. object_storage_client-0.2.0/src/backend/s3.rs +0 -455
  119. object_storage_client-0.2.0/src/cli/tests.rs +0 -385
  120. object_storage_client-0.2.0/src/cli.rs +0 -1338
  121. object_storage_client-0.2.0/src/codec.rs +0 -527
  122. object_storage_client-0.2.0/src/fsmode.rs +0 -107
  123. object_storage_client-0.2.0/src/python/mod.rs +0 -127
  124. object_storage_client-0.2.0/src/python/stream.rs +0 -340
  125. object_storage_client-0.2.0/src/registry.rs +0 -335
  126. object_storage_client-0.2.0/src/sign.rs +0 -259
  127. object_storage_client-0.2.0/tests/python/test_worker_threads.py +0 -71
  128. object_storage_client-0.2.0/tests/unit/sign.rs +0 -130
  129. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/.docker/garage.toml +0 -0
  130. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/.python-version +0 -0
  131. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/LICENSE +0 -0
  132. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/benches/alloc-counter/Cargo.toml +0 -0
  133. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/benches/alloc-counter/src/lib.rs +0 -0
  134. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/benches/common/mod.rs +0 -0
  135. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/compose.yml +0 -0
  136. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/python/object_storage_client/py.typed +0 -0
  137. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/scripts/esdk_oracle.py +0 -0
  138. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/scripts/perf_smoke.py +0 -0
  139. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/backend/body.rs +0 -0
  140. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/encryption/fixtures.rs +0 -0
  141. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/src/hex.rs +0 -0
  142. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/azure_storage_ops.rs +0 -0
  143. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/common/azurite.rs +0 -0
  144. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/common/gcs.rs +0 -0
  145. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/common/provider.rs +0 -0
  146. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/file_roundtrip.rs +0 -0
  147. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/gcs_storage_ops.rs +0 -0
  148. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/reencrypt.rs +0 -0
  149. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/s3_storage_ops.rs +0 -0
  150. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration/storage_ops.rs +0 -0
  151. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/integration.rs +0 -0
  152. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_roundtrip.py +0 -0
  153. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_shared_client.py +0 -0
  154. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_stream_sticky.py +0 -0
  155. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/python/test_subinterpreter.py +0 -0
  156. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/unit.rs +0 -0
  157. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/README.md +0 -0
  158. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/ctx_long.bin +0 -0
  159. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/ctx_min.bin +0 -0
  160. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/ctx_utf8.bin +0 -0
  161. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/manifest.json +0 -0
  162. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p0_f4096.bin +0 -0
  163. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p0_f65536.bin +0 -0
  164. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p1_f4096.bin +0 -0
  165. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p1_f65536.bin +0 -0
  166. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p200000_f4096.bin +0 -0
  167. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p200000_f65536.bin +0 -0
  168. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p4095_f4096.bin +0 -0
  169. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p4095_f65536.bin +0 -0
  170. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p4096_f4096.bin +0 -0
  171. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p4096_f65536.bin +0 -0
  172. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p4097_f4096.bin +0 -0
  173. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p4097_f65536.bin +0 -0
  174. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p65535_f4096.bin +0 -0
  175. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p65535_f65536.bin +0 -0
  176. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p65536_f4096.bin +0 -0
  177. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p65536_f65536.bin +0 -0
  178. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p65537_f4096.bin +0 -0
  179. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/esdk/p65537_f65536.bin +0 -0
  180. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/context.bin +0 -0
  181. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/keyring +0 -0
  182. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/manifest.json +0 -0
  183. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/old_key.bin +0 -0
  184. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/size_0.bin +0 -0
  185. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/size_1.bin +0 -0
  186. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/size_200000.bin +0 -0
  187. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/golden/v1/size_65536.bin +0 -0
  188. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/keyrings/README.md +0 -0
  189. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/keyrings/one.keyring +0 -0
  190. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/keyrings/other.keyring +0 -0
  191. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/tests/vectors/keyrings/two.keyring +0 -0
  192. {object_storage_client-0.2.0 → object_storage_client-0.2.1}/uv.lock +0 -0
@@ -0,0 +1,2 @@
1
+ [registries.bixority-codeberg]
2
+ index = "sparse+https://codeberg.org/api/packages/bixority/cargo/"
@@ -1 +1,2 @@
1
1
  tests/vectors/**/*.bin binary
2
+ fuzz/seeds/** binary
@@ -0,0 +1,18 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: cargo
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "08:00"
8
+ open-pull-requests-limit: 10
9
+ # Security updates are not delayed by the cooldown.
10
+ cooldown:
11
+ default-days: 7
12
+ # Action bumps are never auto-merged (see dependabot-merge in tests.yaml).
13
+ - package-ecosystem: github-actions
14
+ directory: "/"
15
+ schedule:
16
+ interval: weekly
17
+ cooldown:
18
+ default-days: 7
@@ -0,0 +1,353 @@
1
+ name: Build and publish release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ # Dry run from a branch: builds and tests, but never publishes.
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+
18
+ test:
19
+ # Stable only: a beta or nightly compiler problem must not block a release.
20
+ name: Test
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25
+ with:
26
+ persist-credentials: false
27
+
28
+ - name: Install Rust
29
+ uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
30
+ with:
31
+ toolchain: stable
32
+
33
+ - name: Cache cargo
34
+ uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
35
+
36
+ - name: Run tests
37
+ run: cargo test --locked --all-features
38
+
39
+ rustfmt:
40
+ name: Rustfmt + Clippy
41
+ runs-on: ubuntu-latest
42
+
43
+ steps:
44
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
45
+ with:
46
+ persist-credentials: false
47
+
48
+ - name: Install Rust
49
+ uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
50
+ with:
51
+ toolchain: stable
52
+ components: rustfmt, clippy
53
+
54
+ - name: Cache cargo
55
+ uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
56
+
57
+ - name: Check formatting
58
+ run: cargo fmt --all -- --check
59
+
60
+ - name: Run clippy
61
+ run: cargo clippy --locked --all-targets --all-features -- -D warnings -W clippy::pedantic
62
+
63
+
64
+ # The wheels ship the committed THIRD_PARTY_LICENSES.html: build them only if
65
+ # it is what the locked dependencies need, and no license is unaccepted.
66
+ licenses:
67
+ name: Third-party licenses
68
+ runs-on: ubuntu-latest
69
+
70
+ steps:
71
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
72
+ with:
73
+ persist-credentials: false
74
+
75
+ - name: Install Rust
76
+ uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
77
+ with:
78
+ toolchain: stable
79
+
80
+ - uses: taiki-e/install-action@86f7a0ffb25f40114606501a311ebcfaf882ea32 # v2.88.0
81
+ with:
82
+ tool: cargo-about@0.9.3
83
+
84
+ - name: Regenerate the notices
85
+ run: >
86
+ cargo about generate --locked --fail --no-default-features
87
+ --features python,encryption about.hbs
88
+ --output-file THIRD_PARTY_LICENSES.html
89
+
90
+ - name: The committed notices are current
91
+ run: git diff --exit-code -- THIRD_PARTY_LICENSES.html
92
+
93
+ build-wheels:
94
+ name: Build wheels (${{ matrix.os }}${{ matrix.target && format(' / {0}', matrix.target) || '' }} / py${{ matrix.python }})
95
+ needs: [ test, rustfmt, licenses ]
96
+ runs-on: ${{ matrix.runner || matrix.os }}
97
+
98
+ strategy:
99
+ fail-fast: false
100
+ matrix:
101
+ os: [ubuntu-latest, macos-latest, windows-latest]
102
+ python: ["3.13", "3.14", "3.15"]
103
+ include:
104
+ - os: linux-aarch64
105
+ python: "3.13"
106
+ arch: aarch64
107
+ target: aarch64-unknown-linux-gnu
108
+ runner: ubuntu-latest
109
+ manylinux: 2_28
110
+ - os: linux-aarch64
111
+ python: "3.14"
112
+ arch: aarch64
113
+ target: aarch64-unknown-linux-gnu
114
+ runner: ubuntu-latest
115
+ manylinux: 2_28
116
+ - os: linux-aarch64
117
+ python: "3.15"
118
+ arch: aarch64
119
+ target: aarch64-unknown-linux-gnu
120
+ runner: ubuntu-latest
121
+ manylinux: 2_28
122
+
123
+ steps:
124
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
125
+ with:
126
+ persist-credentials: false
127
+
128
+ - name: Set up QEMU
129
+ if: matrix.arch
130
+ uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
131
+
132
+ - name: Build wheels
133
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
134
+ with:
135
+ command: build
136
+ target: ${{ matrix.target }}
137
+ manylinux: ${{ matrix.manylinux || 'auto' }}
138
+ sccache: true
139
+ args: >
140
+ --release
141
+ --strip
142
+ --locked
143
+ --compatibility pypi
144
+ --interpreter python${{ matrix.python }}
145
+ --out dist
146
+
147
+ # PEP 639: the license files are under *.dist-info/licenses/.
148
+ - name: The wheel carries the license and the third-party notices
149
+ shell: bash
150
+ run: |
151
+ py=$(command -v python3 || command -v python)
152
+ "$py" - dist/*.whl <<'PY'
153
+ import sys, zipfile
154
+ for path in sys.argv[1:]:
155
+ with zipfile.ZipFile(path) as wheel:
156
+ names = wheel.namelist()
157
+ for name in ("LICENSE", "THIRD_PARTY_LICENSES.html"):
158
+ if not any(n.endswith(f".dist-info/licenses/{name}") for n in names):
159
+ sys.exit(f"{path}: no {name} in dist-info/licenses")
160
+ notices = next(n for n in names if n.endswith("/licenses/THIRD_PARTY_LICENSES.html"))
161
+ if b"Apache Arrow Object Store" not in wheel.read(notices):
162
+ sys.exit(f"{path}: the notices lack object_store's NOTICE")
163
+ PY
164
+
165
+ - name: Upload wheel artifacts
166
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
167
+ with:
168
+ name: wheels-${{ matrix.os }}${{ matrix.target && format('-{0}', matrix.target) || '' }}-py${{ matrix.python }}
169
+ path: dist/*.whl
170
+
171
+ # Installs each built wheel into a fresh environment on its own platform and
172
+ # runs the Python tests that need no containers. Publishing waits for this.
173
+ test-wheels:
174
+ name: Test wheel (${{ matrix.os }}${{ matrix.target && format(' / {0}', matrix.target) || '' }} / py${{ matrix.python }})
175
+ needs: [ build-wheels ]
176
+ # The same legs as build-wheels. The aarch64 wheels are built and tested
177
+ # under QEMU on ubuntu-latest: no arm runner is needed.
178
+ runs-on: ${{ matrix.runner || matrix.os }}
179
+ timeout-minutes: 90
180
+
181
+ strategy:
182
+ fail-fast: false
183
+ matrix:
184
+ os: [ubuntu-latest, macos-latest, windows-latest]
185
+ python: ["3.13", "3.14", "3.15"]
186
+ include:
187
+ - os: linux-aarch64
188
+ python: "3.13"
189
+ arch: aarch64
190
+ target: aarch64-unknown-linux-gnu
191
+ runner: ubuntu-latest
192
+ - os: linux-aarch64
193
+ python: "3.14"
194
+ arch: aarch64
195
+ target: aarch64-unknown-linux-gnu
196
+ runner: ubuntu-latest
197
+ - os: linux-aarch64
198
+ python: "3.15"
199
+ arch: aarch64
200
+ target: aarch64-unknown-linux-gnu
201
+ runner: ubuntu-latest
202
+
203
+ steps:
204
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
205
+ with:
206
+ persist-credentials: false
207
+
208
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
209
+ if: '!matrix.arch'
210
+ with:
211
+ python-version: ${{ matrix.python }}
212
+
213
+ # The artifact name is the one build-wheels uploads this wheel under.
214
+ - name: Download the wheel
215
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
216
+ with:
217
+ name: wheels-${{ matrix.os }}${{ matrix.target && format('-{0}', matrix.target) || '' }}-py${{ matrix.python }}
218
+ path: dist
219
+
220
+ - name: Set up QEMU
221
+ if: matrix.arch
222
+ uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
223
+
224
+ - name: Install the test dependencies
225
+ if: '!matrix.arch'
226
+ run: uv sync --group dev --group oracle --locked --no-install-project
227
+
228
+ # The project itself is not built here: only the wheel under test is
229
+ # installed, so a missing or broken wheel fails the job.
230
+ - name: Install the wheel
231
+ if: '!matrix.arch'
232
+ run: uv pip install --no-index --find-links dist object-storage-client
233
+
234
+ # pyproject's addopts exclude the container tests.
235
+ - name: Run the Python tests
236
+ if: '!matrix.arch'
237
+ run: uv run --no-sync pytest
238
+
239
+ # The aarch64 wheel is tested inside the same manylinux image that built
240
+ # it, under QEMU. The container installs the test dependencies from the
241
+ # locked export and the wheel from dist, then runs pytest in /work.
242
+ - name: Run the Python tests (aarch64, emulated manylinux)
243
+ if: matrix.arch
244
+ env:
245
+ PY_VERSION: ${{ matrix.python }}
246
+ run: |
247
+ docker run --rm --platform linux/arm64 \
248
+ -e PY_VERSION \
249
+ -v "$PWD:/work" -w /work \
250
+ quay.io/pypa/manylinux_2_28_aarch64 \
251
+ bash -euo pipefail -c '
252
+ tag=$(echo "$PY_VERSION" | tr -d .)
253
+ /opt/python/cp${tag}-cp${tag}/bin/python -m venv /tmp/venv
254
+ /tmp/venv/bin/python -m pip install --quiet uv
255
+ /tmp/venv/bin/uv export --locked --no-hashes --no-emit-project \
256
+ --group dev --group oracle > /tmp/requirements.txt
257
+ /tmp/venv/bin/uv pip install --python /tmp/venv/bin/python \
258
+ -r /tmp/requirements.txt
259
+ /tmp/venv/bin/uv pip install --python /tmp/venv/bin/python \
260
+ --no-index --no-deps --find-links dist object-storage-client
261
+ /tmp/venv/bin/python -m pytest
262
+ '
263
+
264
+ build-sdist:
265
+ name: Build source distribution
266
+ needs: [ test, rustfmt ]
267
+ runs-on: ubuntu-latest
268
+
269
+ steps:
270
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
271
+ with:
272
+ persist-credentials: false
273
+
274
+ - name: Build sdist
275
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
276
+ with:
277
+ command: sdist
278
+ args: --out dist
279
+
280
+ - name: Upload sdist
281
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
282
+ with:
283
+ name: sdist
284
+ path: dist/*.tar.gz
285
+
286
+ # Verification build for the crate. No secrets are available here, so no
287
+ # dependency build script or proc macro runs next to a publishing credential.
288
+ package-crate:
289
+ name: Package crate
290
+ needs: [ test, rustfmt ]
291
+ runs-on: ubuntu-latest
292
+
293
+ steps:
294
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
295
+ with:
296
+ persist-credentials: false
297
+
298
+ - name: Install Rust
299
+ run: rustup toolchain install stable --profile minimal && rustup default stable
300
+
301
+ - name: Check the tag against the crate version
302
+ if: startsWith(github.ref, 'refs/tags/v')
303
+ run: |
304
+ version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
305
+ if [ "v$version" != "$GITHUB_REF_NAME" ]; then
306
+ echo "::error::Tag $GITHUB_REF_NAME does not match Cargo.toml version $version"
307
+ exit 1
308
+ fi
309
+
310
+ - name: Package crate
311
+ run: cargo package --locked
312
+
313
+ publish-crate:
314
+ name: Publish crate to Codeberg
315
+ needs: [ package-crate, build-wheels, test-wheels, build-sdist ]
316
+ runs-on: ubuntu-latest
317
+ environment: release
318
+ if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
319
+
320
+ steps:
321
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
322
+ with:
323
+ persist-credentials: false
324
+
325
+ - name: Install Rust
326
+ run: rustup toolchain install stable --profile minimal && rustup default stable
327
+
328
+ # --no-verify: package-crate already built the package, and nothing
329
+ # compiles here, so no dependency code runs next to the token.
330
+ - name: Publish crate
331
+ run: cargo publish --registry bixority-codeberg --locked --no-verify
332
+ env:
333
+ CARGO_REGISTRIES_BIXORITY_CODEBERG_TOKEN: Bearer ${{ secrets.CODEBERG_TOKEN }}
334
+
335
+ publish-to-pypi:
336
+ name: Publish to PyPI
337
+ needs: [ package-crate, build-wheels, test-wheels, build-sdist ]
338
+ runs-on: ubuntu-latest
339
+ environment: release
340
+ if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
341
+ permissions:
342
+ id-token: write
343
+
344
+ steps:
345
+ - name: Download artifacts
346
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
347
+ with:
348
+ path: dist
349
+ merge-multiple: true
350
+
351
+ # Trusted Publishing (OIDC): no stored token. Also uploads PEP 740 attestations.
352
+ - name: Publish to PyPI
353
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
@@ -0,0 +1,71 @@
1
+ name: Performance
2
+
3
+ # Not part of the PR checks: the deterministic guards in `tests/perf_guards.rs`
4
+ # run with `cargo test` in tests.yaml. This workflow measures the release
5
+ # binary. Peak RSS over budget fails it; throughput is compared with the
6
+ # previous successful run (restored from the cache) and only warns, because
7
+ # shared runners are noisy.
8
+ on:
9
+ workflow_dispatch:
10
+ schedule:
11
+ - cron: "17 3 * * *"
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ concurrency:
17
+ group: ${{ github.workflow }}-${{ github.ref }}
18
+ cancel-in-progress: true
19
+
20
+ jobs:
21
+ bench:
22
+ name: bench + 512 MiB smoke
23
+ runs-on: ubuntu-latest
24
+ timeout-minutes: 45
25
+ steps:
26
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27
+ with:
28
+ persist-credentials: false
29
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
30
+ with:
31
+ toolchain: stable
32
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
33
+ - name: Build release osc
34
+ run: cargo build --locked --release --bin osc
35
+ - name: Bench (256 MiB, median of 3)
36
+ shell: bash
37
+ run: cargo bench --locked --bench throughput --no-default-features --features encryption | tee bench.txt
38
+ env:
39
+ BENCH_DIR: ${{ github.workspace }}/target/bench-data
40
+ # The newest earlier perf-baseline.json; a first run finds none, and
41
+ # perf_smoke.py ignores a missing file.
42
+ - name: Restore the previous smoke result
43
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
44
+ with:
45
+ path: perf-baseline.json
46
+ key: perf-smoke-${{ github.run_id }}
47
+ restore-keys: perf-smoke-
48
+ - name: Smoke (512 MiB file://, plain and encrypted)
49
+ run: |
50
+ mkdir -p target/perf-smoke
51
+ python3 scripts/perf_smoke.py \
52
+ --osc target/release/osc \
53
+ --runs 5 \
54
+ --dir target/perf-smoke \
55
+ --baseline perf-baseline.json \
56
+ --out perf-smoke.json
57
+ - name: Keep this result as the next baseline
58
+ run: cp perf-smoke.json perf-baseline.json
59
+ - name: Save the baseline
60
+ uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
61
+ with:
62
+ path: perf-baseline.json
63
+ key: perf-smoke-${{ github.run_id }}
64
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
65
+ if: always()
66
+ with:
67
+ name: perf-${{ github.sha }}
68
+ path: |
69
+ bench.txt
70
+ perf-smoke.json
71
+ if-no-files-found: warn
@@ -0,0 +1,247 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ # Never cancel a run on main: quick successive merges would stay untested.
14
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15
+
16
+ jobs:
17
+ # Operators run osc on laptops, so the Rust suite runs on macOS. Windows runs
18
+ # the library tests (the cfg(windows) path tests) and compiles every target.
19
+ tests:
20
+ name: tests (${{ matrix.os }})
21
+ runs-on: ${{ matrix.os }}
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ include:
26
+ - os: ubuntu-latest
27
+ commands: cargo test --locked --all-features
28
+ - os: macos-latest
29
+ commands: cargo test --locked --all-features
30
+ - os: windows-latest
31
+ commands: cargo test --locked --lib && cargo check --locked --all-features --all-targets
32
+ steps:
33
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34
+ with:
35
+ persist-credentials: false
36
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
37
+ with:
38
+ toolchain: stable
39
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
40
+ - name: Test
41
+ shell: bash
42
+ run: ${{ matrix.commands }}
43
+
44
+ # The MSRV promised in Cargo.toml (rust-version) must build all targets.
45
+ msrv:
46
+ name: MSRV (1.99)
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
50
+ with:
51
+ persist-credentials: false
52
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
53
+ with:
54
+ toolchain: "1.99"
55
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
56
+ - run: cargo check --locked --all-features --all-targets
57
+
58
+ integration:
59
+ name: integration (Garage, Azurite, fake-gcs-server)
60
+ runs-on: ubuntu-latest
61
+ timeout-minutes: 30
62
+ steps:
63
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
64
+ with:
65
+ persist-credentials: false
66
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
67
+ with:
68
+ toolchain: stable
69
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
70
+ # The 4 GiB round trips are local only (see docs/TESTING.md, "Checksum round trips").
71
+ - run: cargo test --locked --all-features --test integration -- --ignored --skip _4gib
72
+
73
+ lint:
74
+ name: fmt + clippy
75
+ runs-on: ubuntu-latest
76
+ steps:
77
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
78
+ with:
79
+ persist-credentials: false
80
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
81
+ with:
82
+ toolchain: stable
83
+ components: rustfmt, clippy
84
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
85
+ - name: No code-generation settings in the committed cargo config
86
+ run: '! grep -nE "^\[build\]|^\[target\.|rustflags" .cargo/config.toml'
87
+ - name: Every action is pinned to a full commit SHA
88
+ run: '! grep -rnP "^\s*(-\s*)?uses:\s+(?!\./)(?![^@\s]+@[0-9a-f]{40}(\s|$))" .github/workflows'
89
+ - run: cargo fmt --all -- --check
90
+ - run: cargo clippy --locked --all-targets --all-features -- -D warnings -W clippy::pedantic
91
+ - run: cargo doc --locked --no-deps --all-features
92
+ env:
93
+ RUSTDOCFLAGS: "-D warnings"
94
+
95
+ features:
96
+ name: feature builds + fuzz crate
97
+ runs-on: ubuntu-latest
98
+ steps:
99
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
100
+ with:
101
+ persist-credentials: false
102
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
103
+ with:
104
+ toolchain: stable
105
+ components: clippy
106
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
107
+ - run: cargo clippy --locked --all-targets --no-default-features -- -D warnings -W clippy::pedantic
108
+ - run: cargo check --locked --no-default-features --features python
109
+ - run: cargo check --locked --features fuzzing
110
+ # Keeps `encryption::fuzzing` and the fuzz targets compiling.
111
+ - run: cargo check --manifest-path fuzz/Cargo.toml
112
+
113
+ python:
114
+ name: python tests (${{ matrix.python }})
115
+ runs-on: ubuntu-latest
116
+ strategy:
117
+ fail-fast: false
118
+ matrix:
119
+ python: ["3.13", "3.14", "3.15"]
120
+ steps:
121
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
122
+ with:
123
+ persist-credentials: false
124
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
125
+ with:
126
+ toolchain: stable
127
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
128
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
129
+ with:
130
+ python-version: ${{ matrix.python }}
131
+ - run: uv sync --group dev --group oracle --locked --no-install-project
132
+ - run: uv run --no-sync maturin develop --locked
133
+ - run: uv run --no-sync pytest
134
+ # Container tests (Garage, Azurite) without the local-only 4 GiB tier.
135
+ - run: uv run --no-sync pytest -m "integration and not large"
136
+
137
+ esdk-interop:
138
+ name: ESDK interop
139
+ runs-on: ubuntu-latest
140
+ steps:
141
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
142
+ with:
143
+ persist-credentials: false
144
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
145
+ with:
146
+ toolchain: stable
147
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
148
+ - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
149
+ with:
150
+ python-version: "3.14"
151
+ - run: uv sync --group oracle --locked --no-install-project
152
+ # `shell: bash` runs with pipefail. The step fails unless exactly one
153
+ # oracle test passed, so renaming the test cannot silently drop the check.
154
+ - name: ESDK interop (exactly one oracle test)
155
+ shell: bash
156
+ run: |
157
+ cargo test --locked --all-features --lib -- --ignored oracle 2>&1 | tee oracle.log
158
+ grep -q 'test result: ok. 1 passed' oracle.log
159
+ env:
160
+ UV_NO_SYNC: "1"
161
+
162
+ deny:
163
+ name: cargo deny (advisories, bans, sources)
164
+ runs-on: ubuntu-latest
165
+ steps:
166
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
167
+ with:
168
+ persist-credentials: false
169
+ - uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
170
+ with:
171
+ command: check advisories bans sources
172
+ arguments: --all-features
173
+
174
+ # Fails on a dependency license that about.toml does not accept, and when
175
+ # the committed notices (shipped in the wheels) differ from the locked
176
+ # dependencies. Regenerate as docs/DEVELOPMENT.md explains.
177
+ licenses:
178
+ name: third-party licenses
179
+ runs-on: ubuntu-latest
180
+ steps:
181
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
182
+ with:
183
+ persist-credentials: false
184
+ - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
185
+ with:
186
+ toolchain: stable
187
+ - uses: taiki-e/install-action@86f7a0ffb25f40114606501a311ebcfaf882ea32 # v2.88.0
188
+ with:
189
+ tool: cargo-about@0.9.3
190
+ - name: Generate the notices
191
+ run: >
192
+ cargo about generate --locked --fail --no-default-features
193
+ --features python,encryption about.hbs
194
+ --output-file "$RUNNER_TEMP/THIRD_PARTY_LICENSES.html"
195
+ - name: The committed notices are current
196
+ run: diff -u THIRD_PARTY_LICENSES.html "$RUNNER_TEMP/THIRD_PARTY_LICENSES.html"
197
+
198
+ # Merges a Dependabot PR only after every other job above has succeeded.
199
+ #
200
+ # `pull_request` (not `pull_request_target`): the PR's code runs with a
201
+ # read-only token and no repository secrets, and its build cache is scoped to
202
+ # the PR, so it cannot poison the cache used by the release workflow. A fork PR
203
+ # never gets a write token here, so this job cannot act on one.
204
+ dependabot-merge:
205
+ name: Approve and merge (Dependabot)
206
+ needs: [tests, msrv, integration, lint, features, python, esdk-interop, deny, licenses]
207
+ # The PR author, not only `github.actor` (whoever triggered the latest event).
208
+ if: >-
209
+ github.event_name == 'pull_request'
210
+ && github.event.pull_request.user.login == 'dependabot[bot]'
211
+ && github.actor == 'dependabot[bot]'
212
+ && github.event.pull_request.head.repo.full_name == github.repository
213
+ runs-on: ubuntu-latest
214
+ permissions:
215
+ contents: write
216
+ pull-requests: write
217
+ steps:
218
+ - id: metadata
219
+ uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
220
+ with:
221
+ github-token: ${{ github.token }}
222
+ # Only cargo patch updates of crates outside the reviewed list are merged.
223
+ # Everything else stays open for human review.
224
+ - name: Approve and merge
225
+ if: >-
226
+ steps.metadata.outputs.package-ecosystem == 'cargo'
227
+ && steps.metadata.outputs.update-type == 'version-update:semver-patch'
228
+ env:
229
+ GH_TOKEN: ${{ github.token }}
230
+ GH_REPO: ${{ github.repository }}
231
+ PR_NUMBER: ${{ github.event.pull_request.number }}
232
+ PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
233
+ DEPENDENCIES: ${{ steps.metadata.outputs.dependency-names }}
234
+ REVIEWED: aws-lc-rs aws-config aws-credential-types object_store reqwest pyo3 pyo3-async-runtimes zeroize rustix
235
+ run: |
236
+ IFS=', ' read -ra deps <<< "$DEPENDENCIES"
237
+ for dep in "${deps[@]}"; do
238
+ for reviewed in $REVIEWED; do
239
+ if [ "$dep" = "$reviewed" ]; then
240
+ echo "$dep is on the reviewed list; leaving the PR open."
241
+ exit 0
242
+ fi
243
+ done
244
+ done
245
+ gh pr review "$PR_NUMBER" --approve --body "Automated approval: the full test suite passed for this patch update."
246
+ # Merge exactly the commit that was tested.
247
+ gh pr merge "$PR_NUMBER" --merge --match-head-commit "$PR_HEAD_SHA"