chalkcompute 2.6.2__tar.gz → 2.7.0__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 (168) hide show
  1. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/PKG-INFO +1 -1
  2. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/__init__.py +2 -0
  3. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/__init__.pyi +4 -0
  4. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_cls.py +8 -7
  5. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_container.py +6 -5
  6. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_function.py +8 -7
  7. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_image.py +3 -10
  8. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_native.pyi +15 -1
  9. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_sandbox.py +39 -47
  10. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_scaling_group.py +5 -4
  11. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_volume.py +191 -27
  12. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/pyproject.toml +1 -1
  13. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/README.md +0 -0
  14. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_arrow_schema.py +0 -0
  15. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_artifact.py +0 -0
  16. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_auth_config.py +0 -0
  17. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_concurrency.py +0 -0
  18. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_connect.py +0 -0
  19. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/__init__.py +0 -0
  20. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/buf/__init__.py +0 -0
  21. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/buf/validate/__init__.py +0 -0
  22. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/buf/validate/validate_pb2.py +0 -0
  23. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/buf/validate/validate_pb2.pyi +0 -0
  24. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/buf/validate/validate_pb2_grpc.py +0 -0
  25. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/buf/validate/validate_pb2_grpc.pyi +0 -0
  26. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/__init__.py +0 -0
  27. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/argo/__init__.py +0 -0
  28. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/argo/v1/__init__.py +0 -0
  29. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/argo/v1/workflow_pb2.py +0 -0
  30. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/argo/v1/workflow_pb2.pyi +0 -0
  31. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/argo/v1/workflow_pb2_grpc.py +0 -0
  32. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/argo/v1/workflow_pb2_grpc.pyi +0 -0
  33. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/arrow/__init__.py +0 -0
  34. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/arrow/v1/__init__.py +0 -0
  35. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/arrow/v1/arrow_pb2.py +0 -0
  36. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/arrow/v1/arrow_pb2.pyi +0 -0
  37. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/arrow/v1/arrow_pb2_grpc.py +0 -0
  38. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/arrow/v1/arrow_pb2_grpc.pyi +0 -0
  39. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/artifactstore/__init__.py +0 -0
  40. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/artifactstore/v1/__init__.py +0 -0
  41. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/artifactstore/v1/service_pb2.py +0 -0
  42. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/artifactstore/v1/service_pb2.pyi +0 -0
  43. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/artifactstore/v1/service_pb2_grpc.py +0 -0
  44. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/artifactstore/v1/service_pb2_grpc.pyi +0 -0
  45. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/__init__.py +0 -0
  46. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/__init__.py +0 -0
  47. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/agent_pb2.py +0 -0
  48. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/agent_pb2.pyi +0 -0
  49. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/agent_pb2_grpc.py +0 -0
  50. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/agent_pb2_grpc.pyi +0 -0
  51. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/audit_pb2.py +0 -0
  52. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/audit_pb2.pyi +0 -0
  53. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/audit_pb2_grpc.py +0 -0
  54. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/audit_pb2_grpc.pyi +0 -0
  55. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/displayagent_pb2.py +0 -0
  56. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/displayagent_pb2.pyi +0 -0
  57. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/displayagent_pb2_grpc.py +0 -0
  58. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/displayagent_pb2_grpc.pyi +0 -0
  59. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/featurepermission_pb2.py +0 -0
  60. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/featurepermission_pb2.pyi +0 -0
  61. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/featurepermission_pb2_grpc.py +0 -0
  62. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/featurepermission_pb2_grpc.pyi +0 -0
  63. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/permissions_pb2.py +0 -0
  64. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/permissions_pb2.pyi +0 -0
  65. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/permissions_pb2_grpc.py +0 -0
  66. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/auth/v1/permissions_pb2_grpc.pyi +0 -0
  67. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/__init__.py +0 -0
  68. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/__init__.py +0 -0
  69. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/chalk_error_pb2.py +0 -0
  70. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/chalk_error_pb2.pyi +0 -0
  71. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/chalk_error_pb2_grpc.py +0 -0
  72. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/chalk_error_pb2_grpc.pyi +0 -0
  73. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/log_pb2.py +0 -0
  74. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/log_pb2.pyi +0 -0
  75. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/log_pb2_grpc.py +0 -0
  76. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/common/v1/log_pb2_grpc.pyi +0 -0
  77. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/container/__init__.py +0 -0
  78. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/container/v1/__init__.py +0 -0
  79. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/container/v1/service_pb2.py +0 -0
  80. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/container/v1/service_pb2.pyi +0 -0
  81. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/container/v1/service_pb2_grpc.py +0 -0
  82. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/container/v1/service_pb2_grpc.pyi +0 -0
  83. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/externalfunctioncatalog/__init__.py +0 -0
  84. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/externalfunctioncatalog/v1/__init__.py +0 -0
  85. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/externalfunctioncatalog/v1/service_pb2.py +0 -0
  86. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/externalfunctioncatalog/v1/service_pb2.pyi +0 -0
  87. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/externalfunctioncatalog/v1/service_pb2_grpc.py +0 -0
  88. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/externalfunctioncatalog/v1/service_pb2_grpc.pyi +0 -0
  89. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/flags/__init__.py +0 -0
  90. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/flags/v1/__init__.py +0 -0
  91. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/flags/v1/flags_pb2.py +0 -0
  92. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/flags/v1/flags_pb2.pyi +0 -0
  93. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/flags/v1/flags_pb2_grpc.py +0 -0
  94. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/flags/v1/flags_pb2_grpc.pyi +0 -0
  95. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/runtime/__init__.py +0 -0
  96. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/runtime/v1/__init__.py +0 -0
  97. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/runtime/v1/remote_python_call_pb2.py +0 -0
  98. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/runtime/v1/remote_python_call_pb2.pyi +0 -0
  99. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/runtime/v1/remote_python_call_pb2_grpc.py +0 -0
  100. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/runtime/v1/remote_python_call_pb2_grpc.pyi +0 -0
  101. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/__init__.py +0 -0
  102. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/__init__.py +0 -0
  103. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/runtime_service_pb2.py +0 -0
  104. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/runtime_service_pb2.pyi +0 -0
  105. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/runtime_service_pb2_grpc.py +0 -0
  106. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/runtime_service_pb2_grpc.pyi +0 -0
  107. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/service_pb2.py +0 -0
  108. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/service_pb2.pyi +0 -0
  109. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/service_pb2_grpc.py +0 -0
  110. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v1/service_pb2_grpc.pyi +0 -0
  111. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/__init__.py +0 -0
  112. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/process_service_pb2.py +0 -0
  113. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/process_service_pb2.pyi +0 -0
  114. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/process_service_pb2_grpc.py +0 -0
  115. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/process_service_pb2_grpc.pyi +0 -0
  116. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/service_pb2.py +0 -0
  117. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/service_pb2.pyi +0 -0
  118. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/service_pb2_grpc.py +0 -0
  119. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/service_pb2_grpc.pyi +0 -0
  120. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/snapshot_service_pb2.py +0 -0
  121. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/snapshot_service_pb2.pyi +0 -0
  122. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/snapshot_service_pb2_grpc.py +0 -0
  123. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/sandbox/v2/snapshot_service_pb2_grpc.pyi +0 -0
  124. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/scalinggroup/__init__.py +0 -0
  125. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/scalinggroup/v1/__init__.py +0 -0
  126. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/scalinggroup/v1/service_pb2.py +0 -0
  127. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/scalinggroup/v1/service_pb2.pyi +0 -0
  128. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/scalinggroup/v1/service_pb2_grpc.py +0 -0
  129. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/scalinggroup/v1/service_pb2_grpc.pyi +0 -0
  130. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/__init__.py +0 -0
  131. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/__init__.py +0 -0
  132. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/encoding_pb2.py +0 -0
  133. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/encoding_pb2.pyi +0 -0
  134. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/encoding_pb2_grpc.py +0 -0
  135. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/encoding_pb2_grpc.pyi +0 -0
  136. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/field_change_pb2.py +0 -0
  137. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/field_change_pb2.pyi +0 -0
  138. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/field_change_pb2_grpc.py +0 -0
  139. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/field_change_pb2_grpc.pyi +0 -0
  140. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/sensitive_pb2.py +0 -0
  141. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/sensitive_pb2.pyi +0 -0
  142. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/sensitive_pb2_grpc.py +0 -0
  143. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/utils/v1/sensitive_pb2_grpc.pyi +0 -0
  144. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/volume/__init__.py +0 -0
  145. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/volume/v2/__init__.py +0 -0
  146. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/volume/v2/volume_pb2.py +0 -0
  147. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/volume/v2/volume_pb2.pyi +0 -0
  148. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/volume/v2/volume_pb2_grpc.py +0 -0
  149. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_gen/chalk/volume/v2/volume_pb2_grpc.pyi +0 -0
  150. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_ignore.py +0 -0
  151. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_local_dev.py +0 -0
  152. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_logging.py +0 -0
  153. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_model.py +0 -0
  154. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_naming.py +0 -0
  155. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_progress.py +0 -0
  156. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_proto_pool.py +0 -0
  157. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_quota.py +0 -0
  158. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_rate_limit.py +0 -0
  159. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_remote_call_client.py +0 -0
  160. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_remote_function_tracing.py +0 -0
  161. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_retry.py +0 -0
  162. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_secret.py +0 -0
  163. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_tracing.py +0 -0
  164. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/_web_identity.py +0 -0
  165. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/chalkcompute/py.typed +0 -0
  166. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/rust/chalkcompute_native/Cargo.lock +0 -0
  167. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/rust/chalkcompute_native/Cargo.toml +0 -0
  168. {chalkcompute-2.6.2 → chalkcompute-2.7.0}/rust/chalkcompute_native/src/lib.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chalkcompute
3
- Version: 2.6.2
3
+ Version: 2.7.0
4
4
  Requires-Dist: grpcio>=1.60.0
5
5
  Requires-Dist: protobuf>=4.25.0
6
6
  Requires-Dist: httpx>=0.25.0
@@ -102,6 +102,7 @@ _LAZY_MAP: dict[str, tuple[str, str]] = {
102
102
  "ReadinessProbe": ("chalkcompute._scaling_group", "ReadinessProbe"),
103
103
  # _volume.py
104
104
  "FileInfo": ("chalkcompute._volume", "FileInfo"),
105
+ "ForkInfo": ("chalkcompute._volume", "ForkInfo"),
105
106
  "VersionInfo": ("chalkcompute._volume", "VersionInfo"),
106
107
  "Volume": ("chalkcompute._volume", "Volume"),
107
108
  "VolumeClient": ("chalkcompute._volume", "VolumeClient"),
@@ -109,6 +110,7 @@ _LAZY_MAP: dict[str, tuple[str, str]] = {
109
110
  "VolumeError": ("chalkcompute._volume", "VolumeError"),
110
111
  "VolumeFileNotFoundError": ("chalkcompute._volume", "VolumeFileNotFoundError"),
111
112
  "VolumeInfo": ("chalkcompute._volume", "VolumeInfo"),
113
+ "VolumeMount": ("chalkcompute._volume", "VolumeMount"),
112
114
  "VolumeNotFoundError": ("chalkcompute._volume", "VolumeNotFoundError"),
113
115
  # Imported by chalkpy's model-deploy path; every volume mounts as
114
116
  # MOUNT_TYPE, so this only validates existence now.
@@ -73,6 +73,7 @@ from chalkcompute._secret import resolve_lazy_secrets as resolve_lazy_secrets
73
73
  from chalkcompute._tracing import span as span
74
74
  from chalkcompute._tracing import traced as traced
75
75
  from chalkcompute._volume import FileInfo as FileInfo
76
+ from chalkcompute._volume import ForkInfo as ForkInfo
76
77
  from chalkcompute._volume import VersionInfo as VersionInfo
77
78
  from chalkcompute._volume import Volume as Volume
78
79
  from chalkcompute._volume import VolumeClient as VolumeClient
@@ -80,6 +81,7 @@ from chalkcompute._volume import VolumeClosedError as VolumeClosedError
80
81
  from chalkcompute._volume import VolumeError as VolumeError
81
82
  from chalkcompute._volume import VolumeFileNotFoundError as VolumeFileNotFoundError
82
83
  from chalkcompute._volume import VolumeInfo as VolumeInfo
84
+ from chalkcompute._volume import VolumeMount as VolumeMount
83
85
  from chalkcompute._volume import VolumeNotFoundError as VolumeNotFoundError
84
86
  from chalkcompute._volume import (
85
87
  resolve_referenced_volume_type as resolve_referenced_volume_type,
@@ -162,12 +164,14 @@ __all__ = [
162
164
  "ScalingGroupInfo",
163
165
  "ReadinessProbe",
164
166
  "FileInfo",
167
+ "ForkInfo",
165
168
  "Volume",
166
169
  "VolumeClient",
167
170
  "VolumeClosedError",
168
171
  "VolumeError",
169
172
  "VolumeFileNotFoundError",
170
173
  "VolumeInfo",
174
+ "VolumeMount",
171
175
  "VolumeNotFoundError",
172
176
  "VersionInfo",
173
177
  "resolve_referenced_volume_type",
@@ -85,6 +85,7 @@ from chalkcompute._rate_limit import RateLimitPolicy
85
85
  from chalkcompute._retry import RetryPolicy
86
86
  from chalkcompute._tracing import _instrumented
87
87
  from chalkcompute._volume import (
88
+ Volume,
88
89
  VolumeClient,
89
90
  VolumeMount,
90
91
  cleanup_owned_volumes,
@@ -652,7 +653,7 @@ class RemoteClass:
652
653
  gpu: str | None = None,
653
654
  env: dict[str, str] | None = None,
654
655
  secrets: list[_Secret] | None = None,
655
- volumes: list[tuple[str, str]] | None = None,
656
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
656
657
  min_replicas: int = 1,
657
658
  max_replicas: int = 1,
658
659
  shutdown_delay_seconds: int | None = None,
@@ -684,7 +685,7 @@ class RemoteClass:
684
685
  self._env = env or {}
685
686
  self._secrets: list[_Secret] = list(secrets or [])
686
687
  # Existence is checked once at deploy time, not here.
687
- self._referenced_volumes: list[tuple[str, str]] = normalize_volume_refs(volumes)
688
+ self._referenced_volumes: list[VolumeMount] = normalize_volume_refs(volumes)
688
689
  # Populated at deploy time: referenced volumes plus any freshly
689
690
  # uploaded volumes.
690
691
  self._volumes: list[VolumeMount] = []
@@ -1067,8 +1068,8 @@ class RemoteClass:
1067
1068
  # A missing user-referenced volume fails the deploy. Checked once
1068
1069
  # here, then reused across every per-method spec.
1069
1070
  referenced_volumes = [
1070
- referenced_volume_mount(self._client, name, mount_path)
1071
- for name, mount_path in self._referenced_volumes
1071
+ referenced_volume_mount(self._client, mount)
1072
+ for mount in self._referenced_volumes
1072
1073
  ]
1073
1074
  self._volumes = [*referenced_volumes, *new_vols]
1074
1075
  self._volume_driver = driver
@@ -1499,7 +1500,7 @@ def cls(
1499
1500
  name: str | None = None,
1500
1501
  env: dict[str, str] | None = None,
1501
1502
  secrets: list[_Secret] | None = None,
1502
- volumes: list[tuple[str, str]] | None = None,
1503
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
1503
1504
  min_replicas: int = 1,
1504
1505
  max_replicas: int = 1,
1505
1506
  shutdown_delay_seconds: int | None = None,
@@ -1529,7 +1530,7 @@ def cls(
1529
1530
  name: str | None = None,
1530
1531
  env: dict[str, str] | None = None,
1531
1532
  secrets: list[_Secret] | None = None,
1532
- volumes: list[tuple[str, str]] | None = None,
1533
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
1533
1534
  min_replicas: int = 1,
1534
1535
  max_replicas: int = 1,
1535
1536
  shutdown_delay_seconds: int | None = None,
@@ -1560,7 +1561,7 @@ def cls(
1560
1561
  name: str | None = None,
1561
1562
  env: dict[str, str] | None = None,
1562
1563
  secrets: list[_Secret] | None = None,
1563
- volumes: list[tuple[str, str]] | None = None,
1564
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
1564
1565
  min_replicas: int = 1,
1565
1566
  max_replicas: int = 1,
1566
1567
  shutdown_delay_seconds: int | None = None,
@@ -47,6 +47,7 @@ from chalkcompute._naming import (
47
47
  )
48
48
  from chalkcompute._tracing import _instrumented
49
49
  from chalkcompute._volume import (
50
+ Volume,
50
51
  VolumeClient,
51
52
  VolumeMount,
52
53
  cleanup_owned_volumes,
@@ -972,7 +973,7 @@ class Container:
972
973
  gpu: str | None = None,
973
974
  env: dict[str, str] | None = None,
974
975
  secrets: list[Secret] | None = None,
975
- volumes: list[tuple[str, str]] | None = None,
976
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
976
977
  port: int | None = None,
977
978
  entrypoint: list[str] | None = None,
978
979
  lifetime: str | None = None,
@@ -1009,7 +1010,7 @@ class Container:
1009
1010
  self._env = dict(env) if env else {}
1010
1011
  self._secrets = list(secrets or [])
1011
1012
  # Existence is checked at run() time, not here.
1012
- self._referenced_volumes: list[tuple[str, str]] = normalize_volume_refs(volumes)
1013
+ self._referenced_volumes: list[VolumeMount] = normalize_volume_refs(volumes)
1013
1014
  # Populated at run() time: referenced volumes plus any freshly
1014
1015
  # uploaded volumes.
1015
1016
  self._volumes: list[VolumeMount] = []
@@ -1232,7 +1233,7 @@ class Container:
1232
1233
  """
1233
1234
  # Referenced volume: its mount type is resolved from the backend at
1234
1235
  # run() time, not defaulted here.
1235
- self._referenced_volumes.append((name, mount_path))
1236
+ self._referenced_volumes.append(VolumeMount(name=name, mount_path=mount_path))
1236
1237
  return self
1237
1238
 
1238
1239
  # -- Lifecycle -------------------------------------------------------------
@@ -1340,8 +1341,8 @@ class Container:
1340
1341
 
1341
1342
  # 2a. A missing user-referenced volume fails run().
1342
1343
  self._volumes = [
1343
- referenced_volume_mount(self._client, name, mount_path)
1344
- for name, mount_path in self._referenced_volumes
1344
+ referenced_volume_mount(self._client, mount)
1345
+ for mount in self._referenced_volumes
1345
1346
  ]
1346
1347
 
1347
1348
  # 2b. Upload lazy local files to a volume (if any)
@@ -81,6 +81,7 @@ from chalkcompute._tracing import (
81
81
  remote_function_call_span,
82
82
  )
83
83
  from chalkcompute._volume import (
84
+ Volume,
84
85
  VolumeClient,
85
86
  VolumeMount,
86
87
  normalize_volume_refs,
@@ -1501,7 +1502,7 @@ class RemoteFunction:
1501
1502
  gpu: str | None = None,
1502
1503
  env: dict[str, str] | None = None,
1503
1504
  secrets: list[_Secret] | None = None,
1504
- volumes: list[tuple[str, str]] | None = None,
1505
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
1505
1506
  min_replicas: int = 1,
1506
1507
  max_replicas: int = 1,
1507
1508
  shutdown_delay_seconds: int | None = None,
@@ -1548,7 +1549,7 @@ class RemoteFunction:
1548
1549
  self._env[MODELS_ENV_VAR] = encode_models_env(models)
1549
1550
  self._secrets: list[_Secret] = list(secrets or [])
1550
1551
  # Existence is checked at deploy time, not here.
1551
- self._referenced_volumes: list[tuple[str, str]] = normalize_volume_refs(volumes)
1552
+ self._referenced_volumes: list[VolumeMount] = normalize_volume_refs(volumes)
1552
1553
  # Populated at deploy time: referenced volumes plus any freshly
1553
1554
  # uploaded volumes.
1554
1555
  self._volumes: list[VolumeMount] = []
@@ -1895,8 +1896,8 @@ class RemoteFunction:
1895
1896
  )
1896
1897
  # A missing user-referenced volume fails the deploy.
1897
1898
  referenced_volumes = [
1898
- referenced_volume_mount(self._client, name, mount_path)
1899
- for name, mount_path in getattr(self, "_referenced_volumes", [])
1899
+ referenced_volume_mount(self._client, mount)
1900
+ for mount in getattr(self, "_referenced_volumes", [])
1900
1901
  ]
1901
1902
  deploy_volumes = [
1902
1903
  *referenced_volumes,
@@ -2833,7 +2834,7 @@ def function(
2833
2834
  name: str | None = None,
2834
2835
  env: dict[str, str] | None = None,
2835
2836
  secrets: list[_Secret] | None = None,
2836
- volumes: list[tuple[str, str]] | None = None,
2837
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
2837
2838
  min_replicas: int = 1,
2838
2839
  max_replicas: int = 1,
2839
2840
  shutdown_delay_seconds: int | None = None,
@@ -2865,7 +2866,7 @@ def function(
2865
2866
  name: str | None = None,
2866
2867
  env: dict[str, str] | None = None,
2867
2868
  secrets: list[_Secret] | None = None,
2868
- volumes: list[tuple[str, str]] | None = None,
2869
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
2869
2870
  min_replicas: int = 1,
2870
2871
  max_replicas: int = 1,
2871
2872
  shutdown_delay_seconds: int | None = None,
@@ -2898,7 +2899,7 @@ def function(
2898
2899
  name: str | None = None,
2899
2900
  env: dict[str, str] | None = None,
2900
2901
  secrets: list[_Secret] | None = None,
2901
- volumes: list[tuple[str, str]] | None = None,
2902
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
2902
2903
  min_replicas: int = 1,
2903
2904
  max_replicas: int = 1,
2904
2905
  shutdown_delay_seconds: int | None = None,
@@ -27,7 +27,6 @@ import logging
27
27
  import os
28
28
  import tarfile
29
29
  import tempfile
30
- import warnings
31
30
  from collections.abc import Sequence
32
31
  from dataclasses import dataclass
33
32
  from pathlib import Path
@@ -380,8 +379,9 @@ class Image:
380
379
  Absolute destination path in the image.
381
380
  mode
382
381
  Optional POSIX file permission mode. Written in octal with a
383
- ``0o`` prefix; if omitted, the file is created with the image's
384
- default permissions. Common values:
382
+ ``0o`` prefix; if omitted, ``strategy="volume"`` preserves the
383
+ source file's on-disk permissions and ``strategy="copy"`` uses
384
+ the image's default permissions. Common values:
385
385
 
386
386
  - ``0o755`` (``rwxr-xr-x``) — executable scripts and binaries;
387
387
  owner can read/write/execute, everyone else read/execute.
@@ -434,13 +434,6 @@ class Image:
434
434
  )
435
435
  new = self._copy()
436
436
  if strategy == "volume":
437
- if mode is not None:
438
- warnings.warn(
439
- "add_local_file: `mode` is ignored for strategy='volume' files "
440
- "(served as 0644); it is honored only for strategy='copy', which "
441
- "is limited to files <=32 KiB.",
442
- stacklevel=2,
443
- )
444
437
  _validate_lazy_local_file_destination(dest)
445
438
  src_path = Path(src).resolve()
446
439
  if not src_path.exists():
@@ -63,6 +63,7 @@ class VersionedVolumeNativeClient:
63
63
  volume: str,
64
64
  source: Any,
65
65
  config: dict[str, Any] | None = None,
66
+ ref_name: str | None = None,
66
67
  ) -> list[dict[str, Any]]: ...
67
68
  def stage(
68
69
  self,
@@ -70,13 +71,19 @@ class VersionedVolumeNativeClient:
70
71
  source: Any,
71
72
  config: dict[str, Any] | None = None,
72
73
  ) -> StagedFiles: ...
73
- def staged_intent(self, volume: str, staged: StagedFiles) -> bytes: ...
74
+ def staged_intent(
75
+ self,
76
+ volume: str,
77
+ staged: StagedFiles,
78
+ ref_name: str | None = None,
79
+ ) -> bytes: ...
74
80
  def commit_staged(
75
81
  self,
76
82
  volume: str,
77
83
  staged: StagedFiles,
78
84
  commit_id: str | None = None,
79
85
  max_commit_retries: int = 3,
86
+ ref_name: str | None = None,
80
87
  ) -> dict[str, Any]: ...
81
88
  def download_bytes(
82
89
  self,
@@ -105,6 +112,7 @@ class VersionedVolumeNativeClient:
105
112
  volume: str,
106
113
  paths: Sequence[tuple[str, bool]],
107
114
  max_commit_retries: int = 3,
115
+ ref_name: str | None = None,
108
116
  ) -> dict[str, Any]: ...
109
117
  def create_volume(
110
118
  self, name: str, volume_type: str | None = None
@@ -126,6 +134,7 @@ class VersionedVolumeNativeClient:
126
134
  name: str,
127
135
  limit: int | None = None,
128
136
  cursor: str | None = None,
137
+ ref_name: str | None = None,
129
138
  ) -> dict[str, Any]: ...
130
139
  def list_files(
131
140
  self,
@@ -137,6 +146,11 @@ class VersionedVolumeNativeClient:
137
146
  cursor: str | None = None,
138
147
  ) -> dict[str, Any]: ...
139
148
  def get_commit_status(self, volume: str, commit_id: str) -> dict[str, Any]: ...
149
+ def create_ref(
150
+ self, volume: str, name: str, from_version_id: int
151
+ ) -> dict[str, Any]: ...
152
+ def list_refs(self, volume: str) -> list[dict[str, Any]]: ...
153
+ def delete_ref(self, volume: str, name: str) -> None: ...
140
154
 
141
155
  def configure_volume_client_logging(
142
156
  level: str = "info",
@@ -59,6 +59,7 @@ from chalkcompute._naming import validate_dns_label, validate_env
59
59
  from chalkcompute._tracing import _instrumented
60
60
  from chalkcompute._volume import (
61
61
  MOUNT_TYPE,
62
+ Volume,
62
63
  VolumeClient,
63
64
  VolumeMount,
64
65
  cleanup_owned_volumes,
@@ -69,7 +70,7 @@ from chalkcompute._volume import (
69
70
  # Aliases defined before SandboxClient, which has a ``.list()`` method that
70
71
  # would otherwise shadow the builtin ``list`` in class-scope name resolution.
71
72
  _GrpcMetadata = list[tuple[str, str]]
72
- _VolumeList = list[tuple[str, str]]
73
+ _VolumeList = list[tuple[str, str] | Volume | VolumeMount]
73
74
 
74
75
 
75
76
  # ---------------------------------------------------------------------------
@@ -89,14 +90,8 @@ class SandboxNotFoundError(SandboxError):
89
90
  pass
90
91
 
91
92
 
92
- class SandboxTerminatedError(SandboxError):
93
- """Raised when a sandbox has terminated."""
94
-
95
- pass
96
-
97
-
98
- class SandboxBuildError(SandboxError):
99
- """Raised when a custom sandbox image build fails."""
93
+ class SandboxStatusError(SandboxError):
94
+ """Sandbox error carrying the backend's lifecycle status details."""
100
95
 
101
96
  def __init__(
102
97
  self,
@@ -114,23 +109,16 @@ class SandboxBuildError(SandboxError):
114
109
  super().__init__(message)
115
110
 
116
111
 
117
- class SandboxCreationError(SandboxError):
118
- """Raised when sandbox creation or startup fails."""
112
+ class SandboxTerminatedError(SandboxStatusError):
113
+ """Raised when a sandbox has terminated."""
119
114
 
120
- def __init__(
121
- self,
122
- message: str,
123
- *,
124
- sandbox_id: str | None = None,
125
- status: str | None = None,
126
- status_message: str | None = None,
127
- build_id: str | None = None,
128
- ) -> None:
129
- self.sandbox_id = sandbox_id
130
- self.status = status
131
- self.status_message = status_message
132
- self.build_id = build_id
133
- super().__init__(message)
115
+
116
+ class SandboxBuildError(SandboxStatusError):
117
+ """Raised when a custom sandbox image build fails."""
118
+
119
+
120
+ class SandboxCreationError(SandboxStatusError):
121
+ """Raised when sandbox creation or startup fails."""
134
122
 
135
123
 
136
124
  class ExecError(SandboxError):
@@ -454,7 +442,7 @@ class Sandbox:
454
442
  cpu: str | None = None,
455
443
  memory: str | None = None,
456
444
  env: dict[str, str] | None = None,
457
- volumes: list[tuple[str, str]] | None = None,
445
+ volumes: _VolumeList | None = None,
458
446
  entrypoint: list[str] | None = None,
459
447
  network_policy: NetworkPolicy | None = None,
460
448
  restart_policy: RestartPolicy | None = None,
@@ -519,7 +507,7 @@ class Sandbox:
519
507
  self._memory: str | None = None
520
508
  self._env: dict[str, str] = {}
521
509
  # Existence is checked at run() time, not here.
522
- self._referenced_volumes: list[tuple[str, str]] = []
510
+ self._referenced_volumes: list[VolumeMount] = []
523
511
  # Populated at run() time: referenced volumes plus any freshly
524
512
  # uploaded volumes.
525
513
  self._volumes: list[VolumeMount] = []
@@ -642,7 +630,7 @@ class Sandbox:
642
630
  ... .run()
643
631
  ... )
644
632
  """
645
- self._referenced_volumes.append((name, mount_path))
633
+ self._referenced_volumes.append(VolumeMount(name=name, mount_path=mount_path))
646
634
  return self
647
635
 
648
636
  @_instrumented("chalkcompute.sandbox.run")
@@ -691,8 +679,8 @@ class Sandbox:
691
679
  # A missing user-referenced volume fails run().
692
680
  connect = self._connect_client(client)
693
681
  self._volumes = [
694
- referenced_volume_mount(connect, name, mount_path)
695
- for name, mount_path in self._referenced_volumes
682
+ referenced_volume_mount(connect, mount)
683
+ for mount in self._referenced_volumes
696
684
  ]
697
685
  # Upload the image's lazy local files (add_local_file / add_local_dir
698
686
  # with the default strategy="volume") and mount them alongside.
@@ -1272,12 +1260,8 @@ class SandboxClient:
1272
1260
  poll_interval=poll_interval,
1273
1261
  timeout=timeout,
1274
1262
  )
1275
- elif wait and info.status in ("failed", "error", "unknown"):
1263
+ elif wait and info.status in ("failed", "error", "unknown", "terminated"):
1276
1264
  raise _sandbox_creation_error(info)
1277
- elif wait and info.status == "terminated":
1278
- raise SandboxTerminatedError(
1279
- f"Sandbox {info.id} was terminated during creation"
1280
- )
1281
1265
 
1282
1266
  sandbox._id = info.id
1283
1267
  sandbox._info = info
@@ -1303,12 +1287,8 @@ class SandboxClient:
1303
1287
  info = _pb_to_sandbox_info(resp.sandbox)
1304
1288
  if info.status == "running":
1305
1289
  return info
1306
- if info.status in ("failed", "error", "unknown"):
1290
+ if info.status in ("failed", "error", "unknown", "terminated"):
1307
1291
  raise _sandbox_creation_error(info)
1308
- if info.status == "terminated":
1309
- raise SandboxTerminatedError(
1310
- f"Sandbox {sandbox_id} was terminated during creation"
1311
- )
1312
1292
  time.sleep(poll_interval)
1313
1293
  raise SandboxError(
1314
1294
  f"Timed out after {timeout}s waiting for sandbox {sandbox_id} to become ready"
@@ -1363,12 +1343,17 @@ def _pb_to_sandbox_info(info: pb.SandboxInfo) -> SandboxInfo:
1363
1343
  )
1364
1344
 
1365
1345
 
1366
- def _sandbox_creation_error(info: SandboxInfo) -> SandboxCreationError:
1346
+ def _sandbox_creation_error(info: SandboxInfo) -> SandboxStatusError:
1367
1347
  """Build a detailed error from the backend's sandbox status."""
1368
- message = f"Sandbox {info.id} entered {info.status} state during creation"
1348
+ if info.status == "terminated":
1349
+ exc_cls: type[SandboxStatusError] = SandboxTerminatedError
1350
+ message = f"Sandbox {info.id} was terminated during creation"
1351
+ else:
1352
+ exc_cls = SandboxCreationError
1353
+ message = f"Sandbox {info.id} entered {info.status} state during creation"
1369
1354
  if info.status_message:
1370
1355
  message = f"{message}: {info.status_message}"
1371
- return SandboxCreationError(
1356
+ return exc_cls(
1372
1357
  message,
1373
1358
  sandbox_id=info.id,
1374
1359
  status=info.status,
@@ -1435,10 +1420,17 @@ def _handle_rpc_error(e: grpc.RpcError, sandbox_id: str) -> None:
1435
1420
  def _volume_mounts_to_proto(
1436
1421
  volumes: list[VolumeMount],
1437
1422
  ) -> list[container_pb.VolumeMount]:
1438
- return [
1439
- container_pb.VolumeMount(name=v.name, mount_path=v.mount_path, type=MOUNT_TYPE)
1440
- for v in volumes
1441
- ]
1423
+ mounts: list[container_pb.VolumeMount] = []
1424
+ for volume in volumes:
1425
+ mount = container_pb.VolumeMount(
1426
+ name=volume.name,
1427
+ mount_path=volume.mount_path,
1428
+ type=MOUNT_TYPE,
1429
+ )
1430
+ if volume.version_id is not None:
1431
+ mount.version_id = volume.version_id
1432
+ mounts.append(mount)
1433
+ return mounts
1442
1434
 
1443
1435
 
1444
1436
  def connect(target: str = "localhost:50051", **kwargs) -> SandboxClient:
@@ -39,6 +39,7 @@ from chalkcompute._connect import ConnectClient, build_image, rpc_with_retries
39
39
  from chalkcompute._naming import sanitize_dns_label, validate_dns_label, validate_env
40
40
  from chalkcompute._tracing import _instrumented
41
41
  from chalkcompute._volume import (
42
+ Volume,
42
43
  VolumeClient,
43
44
  VolumeMount,
44
45
  cleanup_owned_volumes,
@@ -195,7 +196,7 @@ class ScalingGroup:
195
196
  gpu: str | None = None,
196
197
  env: dict[str, str] | None = None,
197
198
  secrets: list[_Secret] | None = None,
198
- volumes: list[tuple[str, str]] | None = None,
199
+ volumes: list[tuple[str, str] | Volume | VolumeMount] | None = None,
199
200
  entrypoint: list[str] | None = None,
200
201
  port: int = 8080,
201
202
  protocol: str = "http",
@@ -219,7 +220,7 @@ class ScalingGroup:
219
220
  self._env = env or {}
220
221
  self._secrets: list[_Secret] = list(secrets or [])
221
222
  # Existence is checked at deploy time, not here.
222
- self._referenced_volumes: list[tuple[str, str]] = normalize_volume_refs(volumes)
223
+ self._referenced_volumes: list[VolumeMount] = normalize_volume_refs(volumes)
223
224
  # Populated at deploy time: referenced volumes plus any freshly
224
225
  # uploaded volumes.
225
226
  self._volumes: list[VolumeMount] = []
@@ -402,8 +403,8 @@ class ScalingGroup:
402
403
 
403
404
  # 2a. A missing user-referenced volume fails the deploy.
404
405
  self._volumes = [
405
- referenced_volume_mount(self._client, name, mount_path)
406
- for name, mount_path in self._referenced_volumes
406
+ referenced_volume_mount(self._client, mount)
407
+ for mount in self._referenced_volumes
407
408
  ]
408
409
 
409
410
  # 2b. Upload lazy local files to volumes (if any)