-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
File Resource Checks Host for User/Group in Validation #762
Comments
This is a bug. Those checks in Validate should be removed. (I think they already exist in CheckApply.) We also need to add automatic edges if they aren't already there. (Or in the meantime you should add edges.) |
Ah ok, I wasn't sure if the intention here was to check the graph - is there another step where we check the integrity of the graph, or is it in |
I'll raise a PR with |
What do you mean? Validate() is a step just to catch anything that is definitely wrong with the graph before we run it. CheckApply() is the run-time check state and potentially change it (apply) method. It can error if we've asked it to do something impossible such as setting an owner that doesn't exist.
Awesome! |
/cc @frebib since landing your autoedges rework is related here. |
Related PR for auto edges: #764 |
Versions:
mgmt version (eg:
mgmt --version
):mgmt
built with this commitoperating system/distribution (eg:
uname -a
):Bookworm (via Docker Desktop on an ARM64 Mac)
golang version (eg:
go version
):go version go1.22.4 linux/arm64
Description:
When attempting to create a file that is owned by a user/group that are being managed within the resource graph,
mgmt
fails early with an error during theValidate
stage (before any resources have been managed) because the user/group do not exist on the host (checks are here).A sample
mcl
that demonstrates this is below:When run,
mgmt
logs an error and then is not able to manage the resources:The text was updated successfully, but these errors were encountered: