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

Every exec stores several KB of JSON in state (due to environment) #411

Closed
benhoyt opened this issue Apr 19, 2024 · 0 comments · Fixed by #478
Closed

Every exec stores several KB of JSON in state (due to environment) #411

benhoyt opened this issue Apr 19, 2024 · 0 comments · Fixed by #478
Labels
Needs Design Needs a design or spec

Comments

@benhoyt
Copy link
Contributor

benhoyt commented Apr 19, 2024

I just ran a pebble exec of a simple command (echo foo) locally, and because it stores all the command arguments in the task data, it expanded to over 4KB of JSON data in state -- mostly due to the environment which we now (since #234) copy os.Environ as a base. It would be good to find a way to avoid storing this much in state, for example, can we expand os.Environ lazily, later in the game?

@benhoyt benhoyt added 24.10 Needs Design Needs a design or spec labels May 17, 2024
benhoyt added a commit to benhoyt/pebble that referenced this issue Aug 9, 2024
Per canonical#411, the environment (and other task data) can get quite large for
exec objects. Given that exec commands are one-shot and only relevant
for the current run of Pebble, there's no need to persist them.

Note that none of this data is in "api-data" so it's not accessible via
the API at all right now, and so this is a non-breaking change.

Later if we want to make exec tasks a bit more introspectable we can
add the command line or other fields to "api-data" (but we shouldn't
add the entire environment).

Fixes canonical#411.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Needs a design or spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant