Skip to content

Audit and Update Modules for Idempotent Prereqs and Caching #427

@blink-so

Description

@blink-so

Context

We discussed making modules faster without relying on prebuilds by ensuring all prerequisite installs are idempotent and skip work when a dependency is already present. Our goal is to reduce startup time, minimize egress, and keep modules usable standalone and in air‑gapped/cached environments.

Objectives

  • Idempotent installs: Detect pre-installed tools and skip work; no repeated downloads when unchanged.
  • Opt‑in installs for heavy dependencies: Provide install_ flags with customizable defaults.
  • Offline/caching support: Support offline and cached modes; respect proxy settings; allow custom download base URL or mirror.
  • Version pinning: Optional version variables; install only when version mismatch.
  • Paths: Allow customizable install paths.
  • Extension/assets: Install only missing extensions/assets.
  • Non‑blocking installs: Prefer non‑blocking methods where safe.

Initial Audit (High‑impact areas)

  1. code-server module: Change logic to install only when necessary and respect proxy settings.
  2. vscode-web module: Add logic to avoid redundant extension installs.
  3. Templates using curl installs: Replace with module usage or document caching/mirrors.
  4. filebrowser module: Introduce version pinning and respect proxy settings.
  5. jupyter-related modules: Continue good practices, add version pinning.
  6. devcontainers-cli: Document proxy settings, allow version pinning.
  7. kasmvnc, vault, git modules: Add version pins and respect proxy/mirror options.

Proposed Standards

  • Utilize helpers.sh for common functions.
  • Specify required variables for installation logic.
  • Define default behaviors for heavy network installs.

Acceptance Criteria

  • No redundant module downloads when unchanged.
  • Modules operate fully offline and in mirror environments.
  • Templates avoid curl installs, favoring modules or pre-installs.

Open Questions

  • Decide default behavior for heavy installs.
  • Determine templates that need updates versus guidance for baking into images.

Next Steps

  • Update code-server module for idempotency.
  • Introduce extension caching logic to vscode-web.
  • Remove curl installers from templates.
  • Begin helpers.sh implementation.
  • Add relevant documentation on caching and proxies.

References

  • Examples from existing modules and templates.

Assignees/labels: Please triage and distribute tasks accordingly. This issue can be broken down into per-module tasks if necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions