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

Updating environment of an existing worker #842

Open
vigoo opened this issue Sep 1, 2024 · 2 comments
Open

Updating environment of an existing worker #842

vigoo opened this issue Sep 1, 2024 · 2 comments

Comments

@vigoo
Copy link
Contributor

vigoo commented Sep 1, 2024

A worker's environment (environment variables and command-line arguments) can only be set once when the worker is created. This is intentional as modifying them can lead to divergence as the worker's code can depend on them.

However, as we support updating workers, it is possible that an update introduces the need for a new environment variable and it is not possible to add it currently.

The following proposal would solve this:

  • Add optional parameters to the worker update command (on all layers) to accept an updated list of environment variables / args.
  • This should be made convenient on the user interface level, for example being able to list "additional env vars" without touching the existing ones, etc.
  • The worker update command must allow updating to the same version if the user only wants to update the configuration
  • Even if the version does not change but the environment does, worker executor must go through the usual process of attempting an update with the updated environment, which potentially can lead to divergence and fail.
@noise64
Copy link
Contributor

noise64 commented Sep 2, 2024

Just to make sure i understand: does this only allow adding env vars and not modifying existing ones, or both possible but with different flags?

@vigoo
Copy link
Contributor Author

vigoo commented Dec 6, 2024

Note also that some auto-generated environment variables may already change during the lifetime of a worker (at least the component version). And during replay, this needs to be handled properly.

@vigoo vigoo added this to the Golem 1.2 milestone Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants