-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: Support having recipe files stored in ./recipes
#138
Comments
I agree with this. Maybe logging like this is useful to implement: "Recipe uses legacy location & it should be moved to Oh, 2nd paragraph. |
I'm not sure what this means to be honest. We already have the In my view the inclusion of other types of files (non-recipe) in It would also be interesting if we could disable the inclusion of certain files from the build stage based on whether they are the current recipe or included in it, so that no breaking changes would be required. But that's probably just a counterproductive dream. |
Way too difficult to determine as a user could have a script try to access any file they have in
I totally understand where this comes from. The reason I'm suggesting to move the recipes is mostly cause it would be less files for end users to migrate and that the
They aren't copied directly into the final image stage, correct. The problem stems from any change in the |
I'm not sure I agree. The recipe & module files may be scattered in any number of directories at the users discretion, but files used by modules are most likely in the module-specific folders: |
Let me try putting it this way. If we want to have backwards compatibility with copying those files and make them accessible in the build using your strategy, we would need to copy both the new place and the old place to make sure we got all the users files. Only when we decide at some point that it's been long enough we switch over to just copying from the new place, breaking legacy altogether. And until that point we wouldn't be getting any cache benefits because we would be copying the config directory. Now with my proposal, you would continue to support reading recipes from config as well as the new recipes directory. However, because we're only encouraging moving the recipe files, we don't have to bother copying another directory for all the build files. Those files continue to exist in the one place they've been copied from, the config directory. I understand wanting to stay with original plans, but strict adherence to what was done in the past will prevent us from moving forward and improving the tool in the long run. My solution would both improve functionality and maintain backwards compatibility |
Hmm, ok. What about two new directories then? (names WIP, I dislike both of these)
The I don't want to have the file directory be called |
I can get behind this, though not a fan of |
|
Wouldn't this break current functionality with the modules? My intent was to not introduce any breaking changes with moving the recipe files. We're no longer using the |
Let me reiterate further. Your idea was to create a new directory called To make this cleaner, though, I'd suggest mounting |
@xynydev part of your proposal requires refactoring the modules. How do you propose this be done? The current modules expect all files to be in sub-directories of One concern I have is that currently the default modules are unconditionally pulled from the |
To add a concrete use case, I have a pipeline which builds off of a weekly rawhide snapshot here: https://github.com/prydom/my-ostree-build/blob/cc03e7ff10cea5fa778666bca1eff76022a779db/config/fedora-kinoite-laptop.yml. My goal is to only ever rebuild the last 3 layers. Currently changes to modules upstream and changes to recipes will cause a rebuild of all layers and require that I download about 2GiB/day of layers. If I only need to download the last "upgrade" layer and any actually changed layers in my recipes, then it's only about 300MiB/day for the week. |
If the user is using the would-be old way of structuring their repo, the folder
I've thought of this too. Having the modules versioned some way, where the upgrades are automatic unless there's breaking changes (SemVer) would be the best IMO. If you've got ideas for that, you can post them in the https://github.com/blue-build/modules repo. Adding SHA tags would be a good first step and should be totally doable (if our workflow doesn't do it already). |
./recipes
./recipes
As I've been working on trying to take advantage of caching during builds as much as possible, I've started to realize that when a user updates any of their recipe files it would cause a cache invalidation for all
RUN
steps as the config stage would have completely new data. Separating out the recipes to exist in a directory that is not copied into the build would allow only theContainerfile
to get changed from changes to the recipe. The config files would end up staying the same, preserving the cache state of the config's stage.I would plan to continue to support storing recipe's in
./config
, but I would print a warning saying that this method is deprecated in favor of storing your recipe's in./recipes
as the old method can interfere with caching.The text was updated successfully, but these errors were encountered: