Skip to content

v1.3.0

Latest

Choose a tag to compare

@codefromthecrypt codefromthecrypt released this 13 Oct 18:16
· 2 commits to master since this release
f17d531

What's Changed

func-e v1.3.0 uses config_home, data_home, state_home and runtime_dir conventions defined in XDG.

Instead of the now deprecated api.HomeDir()/$FUNC_E_HOME, we have four tiers:

  • api.ConfigHome()/$FUNC_E_CONFIG_HOME: Configuration files like version preferences (default: ~/.config/func-e)
  • api.DataHome()/$FUNC_E_DATA_HOME: Envoy binaries and downloaded data (default: ~/.local/share/func-e)
  • api.StateHome()/$FUNC_E_STATE_HOME: Run logs and persistent state (default: ~/.local/state/func-e)
  • api.RuntimeDir()/$FUNC_E_RUNTIME_DIR: Ephemeral temporary files (default: /tmp/func-e-${UID})

This separation aligns with XDG Base Directory Specification principles:

  • Configuration (envoy-version) is distinct from data (binaries)
  • State (logs) is separate from ephemeral temporary files (admin addresses)
  • Each directory can be independently configured for different storage tiers
  • Docker deployments can easily map volumes to appropriate directories

Run ID

This also adds api.RunID()/$FUNC_E_RUN_ID to override the formerly epoch timestamp with something else for predictable paths in Docker which only support one run typically. For example, we can set it to zero and always know where the logs are.

Here are details on the implementation:

  • --run-id: Sets custom run identifier for current execution (or $FUNC_E_RUN_ID)
  • Default: YYYYMMDD_HHMMSS_UUU (human-readable timestamp)
  • Previous: epoch nanoseconds (less readable)
  • Enables predictable paths for docker (e.g. setting to zero)

Migration

func-e begins immediately to use these conventions except in cases where the deprecated $FUNC_E_HOME was overridden, such as envoyproxy/gateway. This allows tools to migrate on their own schedule.

Unless you set the now deprecated api.HomeDir()/$FUNC_E_HOME, files end up in the new layout described above:

  • Version preference: $FUNC_E_CONFIG_HOME/envoy-version (was: $FUNC_E_HOME/version)
  • Binaries: $FUNC_E_DATA_HOME/envoy-versions/{version}/bin/envoy (was: $FUNC_E_HOME/versions/{version}/bin/envoy)
  • Run logs: $FUNC_E_STATE_HOME/envoy-runs/{runID}/stdout.log (was: $FUNC_E_HOME/runs/{epoch}/stdout.log)
  • Admin address: $FUNC_E_RUNTIME_DIR/{runID}/admin-address.txt (was: $FUNC_E_HOME/runs/{epoch}/admin-address.txt)

Experimental

This release also includes experimental features RunMiddleware AdminClient and StartupHook. Do not use these unless your project is a binary, as doing so in middleware can create version lockups.

Full Changelog: v1.2.0...v1.3.0