-
-
Notifications
You must be signed in to change notification settings - Fork 319
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 needs improvements #64
Comments
Another point which I apparently forgot: What do we do for the situation where we want to have a file, but from a single source. Do we use some sort of file() function (similar to the template function) but which returns the file contents, or do we make the file resource path aware for single files (which is what we do for directories). |
Don't add special meaning to things like |
@ffrank Good point, and nice reference. I think I agree with you, but I should probably mull it over in my brain for a little while. Does anyone have any suggestions on an improved interface here? |
Recent comments from: #411 TBH file resource (being literally the first thing I wrote in mgmt) needs some cleanups! Eg: Line 181 in b2d7260
I'm waiting on the upcoming filesystem changes in my big module patch to add new functions that can read content on disk and return strings, eg:
|
Trying to address as many points as I can right now:
Yes and I believe it's working.
I don't see a need for this. When
I've mulled this over.
These resources are in conflict and at runtime (i.e., CheckApply time) the file should enter a failed state. It will have an AutoEdge on the directory, so this will work consistently. My previous concern was coming from a Puppet point of view, where a
Oof I dont recall...was this about crossing file system boundaries? The fact that we cannot unlink active mount points? I sort of feel that if the resulting behavior is "deletes everything except the mount points and their parent directories", that is quite fine. (I can confirm this before we close.) The vertex should enter a failed state after the partial Apply. Not sure how I feel about Either way, that should be a separate ticket.
This works.
You have the code in the drawer already?
"files" though? Or should it be
If |
So essentially, I feel that we could do the following:
Then close. |
These are the remaining non-obvious issues with the File resource after closing #13 and after 598c746
1) Should this API still be used?
My original notes in #13 mentioned this, but I forgot about it when I wrote the code. If it's still logical, we should change it, and remove the use of
Source
which I used for dirs.2) Are nested file resources an issue?
Is this still the right approach? It needs to be investigated. The autoedges API now exists, so it might be worth considering that it could be helpful.
3) The
recurse
variable isn't respected for some deletions. This is a simple enhancement that should be added./cc @ffrank @witlessbird
The text was updated successfully, but these errors were encountered: