Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration of task execution environment variables #8

Open
jesteria opened this issue Jan 17, 2023 · 0 comments
Open

configuration of task execution environment variables #8

jesteria opened this issue Jan 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jesteria
Copy link
Member

jesteria commented Jan 17, 2023

As a configurer of Fate, I should be able to specify the environment variables of a scheduled task's execution process.

In detail:

  • Environment variables should be configurable at the level of the individual task and globally in the defaults file.

  • Environment should be inheritable and this inheritance should be itself configurable. Currently, tasks inherit the environment variables of the scheduler process; and, this should be maintained as the default. Configuration should permit tasks to be isolated from environment inheritance as well.

Further:

  • Environment variables might be specified as mappings, under a task key named one of (or perhaps any of): env, environ and/or environment.
  • Environment keys and values may include interpolations.
  • Inheritance might be specified by task key isolation with string enumeration values:
    • none: (the default) specifies that the task environment merges the scheduler's environment variables, any defaults and any in the task configuration.
    • system: specifies that the task environment merges any defaults with any task configuration – system environment variables are not included.
    • all: specifies that the task environment includes only variables configured for that task.

Note:

  • The plumbum env is a frozen copy of the scheduler's env and could be suitable for use. plumbum offers command methods setenv and with_env [doc] (which are thread-safe). Nonetheless, might go thru run_bg() keyword env=… (see configuration of task execution user #7), at least in so far as this is more straightforward/compact. (Regardless, getting a cleared/non-inheriting env might require that the scheduler constructs its own, or its module's own, LocalMachine (subclass!) to avoid clearing the plumbum.local default/global machine env. …Or, it might be even worse than that.)
@jesteria jesteria added the enhancement New feature or request label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant