Skip to content

user: implement user factory #106

Open
emilyalbini wants to merge 9 commits intoea-ptqwnqpswsuvfrom
ea-user-factory
Open

user: implement user factory #106
emilyalbini wants to merge 9 commits intoea-ptqwnqpswsuvfrom
ea-user-factory

Conversation

@emilyalbini
Copy link
Copy Markdown
Member

This PR implements a new factory for buildomat, spawning jobs in ephemeral users in the same host system running the factory. Documentation on how to use the factory is available in the factory README.

I was careful during the implementation of the factory to make sure it will always attempt to clean up after itself (never releasing a slot until the cleanup stage finishes) and that it alerts the operator when something goes wrong (by failing the worker, which triggers an hold on it: I plan in the future to add monitoring for held workers).

This PR also makes multiple changes to the agent installation to support this, each in its separate commit. I can move those to a single separate PR or multiple separate PRs if you'd prefer.

The implementation of the factory was based on @jclulow's 2024 work on a work-in-progress hubris factory.

@emilyalbini emilyalbini requested a review from jclulow May 6, 2026 17:12
Copy link
Copy Markdown

@lzrd lzrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently testing against this PR and noticed one minor doc vs code issue.

pub(crate) struct ConfigFile {
pub(crate) general: ConfigFileGeneral,
pub(crate) factory: ConfigFileFactory,
pub(crate) slots: HashMap<String, ConfigFileSlot>,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disagrees with factory/users/README.md which says [slot.NAME] and [slot.hubris-1]

Comment thread factory/user/README.md
buildomat target the slot supports:

```toml
[slot.NAME]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disagrees with factory/user/src/config.rs which uses slots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants