Skip to content

dev: harden conduit run --dev (debouncer growth, --json naming, human ConfigPath) #2621

Description

@devarismeroxa

Follow-ups from the independent review of #2616 (conduit run --dev hot-reload). All non-blocking; grouped for tracking.

  1. Unbounded debouncer/goroutine growth per distinct filename. Watcher.consume creates one debouncer goroutine + map entry per distinct matching filename, living until ctx cancel. handleDeleted frees the filePipelines entry but not the debouncer. Bounded in realistic dev use (only matching files), so not a practical leak — but a long dev session that churns many distinct pipeline filenames grows monotonically. Consider retiring a debouncer when its file is deleted (idle + no pending).

  2. --dev.json vs the repo-standard --json. The dev event stream is surfaced as --dev.json rather than --json. Defensible for a scoped streaming surface on a long-running run command, but it diverges from the "every command supports --json" convention. Decide: keep and document the rationale, or alias --json.

  3. renderHuman omits ConfigPath. events.go captures ErrorInfo.ConfigPath for --dev.json but the human renderer never prints it — an operator watching the text stream loses the failing config path. Cheap to add.

Source: pkg/conduit/dev/{watcher.go,apply.go,events.go}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    housekeepingSmall improvements or chores

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions