@truefoundry/trueforge 0.182.0-rc.2 → 0.182.0-rc.3

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.
package/dist/main.js CHANGED
@@ -730,17 +730,17 @@ var init_config = __esm({
730
730
  SANDBOX_ENVIRONMENT_CPU_MAX: parsePositiveInt({
731
731
  envKey: "SANDBOX_ENVIRONMENT_CPU_MAX",
732
732
  raw: getEnv("SANDBOX_ENVIRONMENT_CPU_MAX"),
733
- defaultValue: 32
733
+ defaultValue: 4
734
734
  }),
735
735
  SANDBOX_ENVIRONMENT_MEMORY_GIB_MAX: parsePositiveInt({
736
736
  envKey: "SANDBOX_ENVIRONMENT_MEMORY_GIB_MAX",
737
737
  raw: getEnv("SANDBOX_ENVIRONMENT_MEMORY_GIB_MAX"),
738
- defaultValue: 64
738
+ defaultValue: 8
739
739
  }),
740
740
  SANDBOX_ENVIRONMENT_DISK_GIB_MAX: parsePositiveInt({
741
741
  envKey: "SANDBOX_ENVIRONMENT_DISK_GIB_MAX",
742
742
  raw: getEnv("SANDBOX_ENVIRONMENT_DISK_GIB_MAX"),
743
- defaultValue: 256
743
+ defaultValue: 10
744
744
  }),
745
745
  MAX_REQUEST_BODY_BYTES: parsePositiveInt({
746
746
  envKey: "MAX_REQUEST_BODY_BYTES",
@@ -10886,6 +10886,23 @@ function getDaytonaAuthorizationErrorMessage(error) {
10886
10886
  }
10887
10887
  return void 0;
10888
10888
  }
10889
+ function getDaytonaBuildFailureMessage(error) {
10890
+ const authorizationMessage = getDaytonaAuthorizationErrorMessage(error);
10891
+ if (authorizationMessage !== void 0) {
10892
+ return authorizationMessage;
10893
+ }
10894
+ if (!(error instanceof DaytonaError) || error.statusCode === void 0) {
10895
+ return void 0;
10896
+ }
10897
+ const { statusCode } = error;
10898
+ if (statusCode === 429) {
10899
+ return void 0;
10900
+ }
10901
+ if (statusCode >= 400 && statusCode < 500) {
10902
+ return error.message;
10903
+ }
10904
+ return void 0;
10905
+ }
10889
10906
  function toSandboxEnvironment({
10890
10907
  external_ref,
10891
10908
  manifest,
@@ -14547,10 +14564,10 @@ async function progressSandboxEnvironmentVersion({
14547
14564
  });
14548
14565
  }
14549
14566
  } catch (error) {
14550
- const status_reason = getDaytonaAuthorizationErrorMessage(error);
14567
+ const status_reason = getDaytonaBuildFailureMessage(error);
14551
14568
  if (status_reason !== void 0) {
14552
14569
  await sandboxEnvironmentStore.markVersionFailed({ environment_version_id, status_reason });
14553
- logger2.warn("Sandbox environment build failed authz", {
14570
+ logger2.warn("Sandbox environment build failed", {
14554
14571
  environment_version_id,
14555
14572
  status_reason
14556
14573
  });