-
Notifications
You must be signed in to change notification settings - Fork 40
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
Sharing defaults across other yml files #38
Comments
Apologies, missed this note in your README:
It would be great to support that, lots of repetition if I try to organize my schedules in different files, but I will work around it for now. |
Yeah. The problem is that the order that yacron includes files in a directory is undefined. And it would be confusing to have the default options change magically depending on what other files exist in the same directory. If you can work around, great, otherwise we could maybe think of some way to have includes: defaults:
...
includes:
- file1.yaml
- file2.haml Then you could point yacron a the main yaml file. I think that, in this case, it would be OK that included files inherit the defaults set by the parent file. Or something, I'd have to think more about it... |
That could work. Another option, which may cause issues with existing implementations if the name conflicts, would be to look for a special file name to use as a baseline default that is first loaded. So always check for defaults.yml (or something more specific). |
I would prefer to make it explicit, something like: include:
- defaults.yaml
jobs:
... But then the tricky part is to make sure that the I guess it's worth re-opening. It doesn't sound like a complicated feature to implement. |
add support for 'include' config option #38
0.13 |
Description
Hi, and thanks for putting this tool together.
I have multiple yacron yml files that I keep separated for organizational purposes. I also have a single defaults.yml that has my
web
anddefaults
sections. I had hoped that the defaults would get picked up and used for all other schedules that get picked up in that directory, but it doesn't seem to be working in all cases.All of the various schedule files get ingested (can see that with /status) and the web section is definitely being read as the web endpoint is up. But it seems like some of the defaults section are being ignored or overridden. These settings worked when I had everything in a single file. But one of my jobs got a "failure" because it saw stderr, with the following message that conflicts with my settings:
has stderr: true; fail_reason: 'failsWhen=producesStderr and stderr is not empty'
So I know it's picking up my defaults.yml because the web interface comes up, but it seems to be not picking up, or overriding some of the other sections. Is this expected?
Note: none of my other files have a defaults section or touch any of these settings.
Example defaults.yml
The text was updated successfully, but these errors were encountered: