Skip to content

Lower-priority/rare Modal constructs: Dict/Queue, @modal.batched, NetworkFileSystem, CloudBucketMount, Cron/Period objects #91

Description

@scttfrdmn

Context

Part of a systematic Modal-compatibility pass (see
`docs/modal-compatibility-matrix.md`). Grouping the rare/low-priority
constructs found in the survey into one tracking issue rather than filing
a dozen near-empty issues — split any of these out individually once/if
real usage is observed.

Constructs (all confirmed NOT_PRESENT_AT_ALL in calque today)

  • `modal.Dict`/`modal.Queue` — distributed KV store / FIFO-per-
    partition queue. Rare in the wild (5-6/212 files in modal-examples).
  • `@modal.batched(max_batch_size=, wait_ms=)` — dynamic input batching.
    Very rare (2/212 files; not found at all in the independent-repo sample).
  • `modal.NetworkFileSystem` — deprecated upstream too (Modal steers
    users to Volume); if any real script still uses it, calque's Volume→S3-
    prefix mapping is the WRONG model (NFS is live-shared/EFS-shaped, not
    snapshot-and-sync like Volume).
  • `modal.CloudBucketMount` — direct S3/R2/GCS mount via
    `mountpoint-s3`; a different (and more restrictive) primitive than
    Volume — no append writes, no seek+write, must open in truncate mode.
  • `modal.Cron(cron_string, timezone=)` / `modal.Period(days=, hours=, ...)`
    as OBJECT forms — calque only recognizes the bare `schedule=` string
    kwarg case today; a `modal.Cron(...)`/`modal.Period(...)` call
    expression likely falls into the generic "unmodeled decorator arg"
    fallback rather than the dedicated `schedule=` leak. Worth noting: when
    present, scheduling is OFTEN the entire app (e.g. earth-mover/forecast-
    datacube-demo uses only plain functions + Cron + `.remote()`) — not as
    rare a SHAPE as the raw file-count suggests, even though the specific
    object-form recognition gap is narrow.
  • `cloud=` kwarg — picks AWS/GCP/OCI/auto; directly relevant to
    calque's own translation story (a script already saying `cloud="aws"`
    is telling you something calque should probably read) but not yet
    recognized at all (`region=` IS recognized+leaked; `cloud=` is not).
  • `App.include`/`.deploy`/`.run` lifecycle nuances (ephemeral vs.
    deployed, rolling vs. recreate deploy strategy) — calque has no
    "deployed app" concept at all; likely a legitimate long-term scope
    question rather than a near-term gap to close.

Ask

No action requested yet — tracking so these don't need to be rediscovered
from scratch by a future adopter's script. Revisit priority if real usage
surfaces (e.g. a future adopter's script uses `modal.Cron` directly, or
`cloud=` shows up and matters for routing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions