@calltelemetry/fmix 2.7.14 → 2.7.15

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 (2) hide show
  1. package/bin/fmix +31 -5
  2. package/package.json +3 -3
package/bin/fmix CHANGED
@@ -25,7 +25,7 @@ set -uo pipefail
25
25
  # ---------------------------------------------------------------------------
26
26
  # Constants & config
27
27
  # ---------------------------------------------------------------------------
28
- FMIX_VERSION="2.7.14"
28
+ FMIX_VERSION="2.7.15"
29
29
  FMIX_HOME="${FMIX_HOME:-${HOME}/.ct-fmix}"
30
30
  FMIX_OS="$(uname -s)"
31
31
  FMIX_ARCH="$(uname -m)"
@@ -5670,13 +5670,15 @@ fmix_lock_keeper_start() {
5670
5670
  fi
5671
5671
  mkdir -p "$FMIX_HOME/lock-keeper-state" || {
5672
5672
  printf '{"error":"lock_keeper_bootstrap_failed","reason":"state preparation failed"}\n' >&2
5673
+ fmix_error "Check filesystem permissions and agent sandbox write access to FMIX_HOME: $FMIX_HOME"
5673
5674
  return 70
5674
5675
  }
5675
5676
  state="$FMIX_HOME/lock-keeper-state/${lock_name}.${owner_pid}.${RANDOM}.state"
5676
5677
  # Keep the program in argv, not a background heredoc pipe that Bash must
5677
5678
  # fill before exec. A quoted literal also avoids a heredoc-backed command
5678
5679
  # substitution while retaining the single-file Bash 3.2 runner contract.
5679
- keeper_source='import fcntl
5680
+ keeper_source='import errno
5681
+ import fcntl
5680
5682
  import json
5681
5683
  import os
5682
5684
  import signal
@@ -5704,12 +5706,31 @@ def request_stop(_signum, _frame):
5704
5706
  stop_requested = True
5705
5707
 
5706
5708
 
5709
+ def io_failure(operation, target, error):
5710
+ hint = "Check available disk space and filesystem health for FMIX_HOME."
5711
+ if error.errno in (errno.EACCES, errno.EPERM, errno.EROFS):
5712
+ hint = (
5713
+ "Check filesystem permissions and agent sandbox write access to the configured "
5714
+ "FMIX_HOME. Retry only after access is authorized; do not bypass locks or "
5715
+ "relocate only lock state away from the shared cache."
5716
+ )
5717
+ sys.stderr.write(json.dumps({
5718
+ "error": "lock_keeper_io_failed", "operation": operation,
5719
+ "path": str(target), "errno": error.errno, "hint": hint,
5720
+ }) + "\n")
5721
+ sys.stderr.flush()
5722
+ raise SystemExit(70)
5723
+
5724
+
5707
5725
  def publish_state(value):
5708
5726
  temporary = state_path.with_name(
5709
5727
  state_path.name + f".tmp-{os.getpid()}"
5710
5728
  )
5711
- temporary.write_text(value + "\n", encoding="utf-8")
5712
- os.replace(temporary, state_path)
5729
+ try:
5730
+ temporary.write_text(value + "\n", encoding="utf-8")
5731
+ os.replace(temporary, state_path)
5732
+ except OSError as error:
5733
+ io_failure("publish_state", state_path, error)
5713
5734
 
5714
5735
 
5715
5736
  def owner_alive():
@@ -5745,7 +5766,10 @@ def get_holder_info(lock_name, fmix_home):
5745
5766
  signal.signal(signal.SIGTERM, request_stop)
5746
5767
  signal.signal(signal.SIGINT, request_stop)
5747
5768
  publish_state("started")
5748
- fd = os.open(path, os.O_RDWR | os.O_CREAT, 0o600)
5769
+ try:
5770
+ fd = os.open(path, os.O_RDWR | os.O_CREAT, 0o600)
5771
+ except OSError as error:
5772
+ io_failure("open_kernel_lock", path, error)
5749
5773
  os.set_inheritable(fd, False)
5750
5774
  operation = fcntl.LOCK_SH if mode == "shared" else fcntl.LOCK_EX
5751
5775
  try:
@@ -5769,6 +5793,8 @@ try:
5769
5793
  sys.stderr.flush()
5770
5794
  last_heartbeat = now
5771
5795
  time.sleep(0.05)
5796
+ except OSError as error:
5797
+ io_failure("acquire_kernel_lock", path, error)
5772
5798
  else:
5773
5799
  publish_state("stopped")
5774
5800
  raise SystemExit(1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calltelemetry/fmix",
3
- "version": "2.7.14",
3
+ "version": "2.7.15",
4
4
  "description": "Verified native FMix runner for CallTelemetry workspaces",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "directory": "packages/npm"
27
27
  },
28
28
  "fmix": {
29
- "runnerSha256": "8ee775d32021237d69b3e1d04442f146af595d3c4538e78162389b5da76d9316",
30
- "sourceTag": "fmix-v2.7.14"
29
+ "runnerSha256": "35b7561e56fc748e13e4eaf3e3df25f0cb060352f6cf8fb6d0d3edce34eba733",
30
+ "sourceTag": "fmix-v2.7.15"
31
31
  }
32
32
  }