ansible-navigator icon indicating copy to clipboard operation
ansible-navigator copied to clipboard

runner artifact rotation only works with user specified artifact directory

Open cidrblock opened this issue 4 years ago • 5 comments
trafficstars

this is because a new directory is used every time based on /tmp/ansible-navigator-{uuid}

related to: https://github.com/ansible/ansible-navigator/pull/496

cidrblock avatar Jun 24 '21 16:06 cidrblock

Related to #501

cidrblock avatar Sep 27 '21 12:09 cidrblock

Move the the runner artifact to path set by XDG_CACHE as a default (similar to collection doc cache) and remove {uuid} to allow for rotation to work properly.

ganeshrn avatar Oct 18 '21 12:10 ganeshrn

or XDG_DATA_HOME since the files don't really need to be "cached" for use by navigator later:

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

cidrblock avatar Oct 18 '21 13:10 cidrblock

There is a single base directory relative to which user-specific state data should be written. This directory is defined by the environment variable $XDG_STATE_HOME.

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)

  • current state of the application that can be reused on a restart (view, layout, open files, undo history, …)

webknjaz avatar Oct 18 '21 13:10 webknjaz

We need to be sure 2 instances of navigator don't collide after the navigator provided UUI in the path is gone

cidrblock avatar Oct 18 '21 13:10 cidrblock