Skip to content

Restructure activations registry for debugging and GC #2707

@dcarley

Description

@dcarley

Acceptance criteria

Make it possible to:

  1. Programatically and manually identify an activation from the .flox environment path
  2. Manually delete all activation state without deleting the remote environment cache
  3. Garbage collect activation state when a watchdog has died and the environment is no longer used

Why

Debugging bad activation state is hard because (corresponding to numbers above):

  1. You can't inspect the relevant activations.json unless you can get $_FLOX_ACTIVATION_STATE_DIR from a working activation.
  2. The crude option of deleting ~/.cache/flox/run to reset activation state also delete state for remote environments.

And:

  1. We can't currently garbage collect the activations registry because we don't have an index of all activations or any mapping from the environment registry (create a follow-up ticket if not solved in this ticket)

Metadata

Metadata

Assignees

No one assigned

    Labels

    greenkeepingCall it tech debt, greenkeeping, technical improvements.team-cliTickets relevant to the flox CLI team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions