github cloudposse/geodesic 4.1.0
v4.1.0 Better terminal and shell process management

one day ago

Reminder

Geodesic is both a Docker image and a launch wrapper script. Often you can just update the image without updating the script. In this release, the script has changed greatly, and you must install the new script to work with the new image. (This does not affect CI/CD systems that always use the script without the wrapper.)

Changes of Greatest Note:

  • Automatic detection of changes in the terminal's light/dark theme has been disabled by default and should be considered experimental. Manually update the theme by using set-terminal-theme [light | dark] if desired. Geodesic still tries to detect the theme when the shell is first launched, and this appears to be reasonably reliable.
  • Significant internal changes have been made regarding configuring the shells launched into the container. Whereas previously the first shell set defaults and subsequent shells could change very little, now each shell can configure its own environment to the extent the configuration is not considered part of the launch configuration (such as attaching volumes).
  • Internal changes have been made with regard to tracking shells so that the container exits promptly when the last shell exits and not before. This should make the process of quitting the shells and stopping the container faster and more reliable.
  • Previously, you had to use a configuration override if you wanted to keep TF_PLUGIN_CACHE_DIR from being set. Geodesic respects your setting, but if unset, Geodesic sets it to "${HOME}/.terraform.d/plugin-cache". To preserve backward compatibility, it is still set if left unset, but now if you set it to "false" or "disabled" Geodesic will unset it for you.

🚀 Enhancements and 🐛 Bug fixes

what

  • Better detection of terminal color settings at startup
  • Added --light and --dark command line options to manually set terminal theme
  • By default, disable attempt to detect terminal theme changes while running
  • Make a better separation between settings that only affect the container when it launches and settings that can vary from exec'd shell to shell
  • Correlate shells exec'd into the container with their wrapper processes
  • Make detection of tracked shells much more efficient
  • Provide an opt-out mechanism for setting TF_PLUGIN_CACHE_DIR
why

why

  • Because of a lack of consistent implementation of features in terminal emulators, automatically determining the terminal's appearance (e.g. light/dark theme) requires a case-by-case approach. Our implementation of the OSC protocol was basically correct, but did not account for the wide variations seen in practice. We now outsource this to the terminal-colorsaurus library, which is much further along in handling all the quirks.
  • Mechanisms to detect changes in the appearance of a terminal while the shell is running are not even close to be standardized. Our attempts frequently failed. This feature has now been marked experimental and disabled by default because it does not work acceptably well and is not something we want to invest in.
  • Geodesic now has a large number of settings. Many of them only affect the launch of the container (such as what volumes to mount and where). However, many of them can and should be allowed to vary from shell to shell in the same container (e.g. TERM). Previously, Geodesic mainly limited configuration to the launch of the container, and forced later shells to inherit that launch configuration. Now, to the extent practical, each shell can have different settings.
  • Now that the Geodesic container can remain running after the initial shell exits, it becomes important to track the shells so that the container exits when and only when all shells have exited. The v4.0.0 implementation suffered from not being able to distinguish the shell the wrapper launched from the shells other wrappers launched, nor could it tell the shells launched by docker exec and the shells launch by other shells, and therefore it could not reliably report on the status of the container. Now each shell is matched with its wrapper process, and the shell monitor tracks shells according to whether or not they were launched by docker exec, making the whole process much more reliable and efficient.
  • Cloud Posse highly recommends that Terraform users take advantage of the Terraform Provider Plugin Cache, and so Geodesic has been configuring it by setting the TF_PLUGIN_CACHE_DIR environment variable to a location on the host filesystem since the feature first became available. However, the cache does not have any protection against parallel modifications, so it is not always appropriate. Previously, Geodesic did not provide a good way to opt out of having the cache configured. Now you can set TF_PLUGIN_CACHE_DIR to "false" or "disabled" and Geodesic will honor that by unsetting the variable (leaving Terraform with its default non-caching behavior) rather than forcing you into using a cache.

references

Footnote

In every release, we update all unpinned packages to their latest packaged versions. These changes are not detailed here.

Don't miss a new geodesic release

NewReleases is sending notifications on new releases.