Update environment of cron service#13111
Conversation
|
This is a good solution. |
|
This will probably be fine -- I'm not sure what a sensible default for features would be. Will know if this is working in ~10 minutes. If it works, I'll move this out of draft. |
|
It did not work. Have verified that |
|
Does it still have the same error? Do you know if the conf yml is in the container? |
|
I believe that |
There was a problem hiding this comment.
Pull request overview
Updates the production cron-jobs container environment so cron-invoked scripts can read the intended Open Library config YAML (via OL_CONFIG), addressing PermissionError failures seen when scripts default to conf/openlibrary.yml (Issue #13108).
Changes:
- Add
OL_CONFIG=/olsystem/etc/openlibrary.ymlto thecron-jobsservice incompose.production.yaml. - Update
docker/ol-cron-start.shto exposeOL_CONFIGto cron by writing it into/etc/environmentbefore starting the daemon.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
docker/ol-cron-start.sh |
Forwards OL_CONFIG into cron’s environment via /etc/environment before installing the crontab and starting cron. |
compose.production.yaml |
Sets OL_CONFIG for the cron-jobs service to point at the production config YAML in /olsystem. |
|
Okay, I'm fairly certain that this will fix things now that the variable is being forwarded to cron's environment. We probably won't know for sure until after our next deployment, though. For now, our cron environment has been updated, and the store counts job is working again. |
|
Thanks for looking into this one. Sorry about the inconvenience. |
2be7245 to
3b2e377
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
d42843e to
c8c380b
Compare
Closes #13108
Attempts to read the config YAML in the cron job container were resulting in
PermissionErrors. Adding theOL_CONFIGenvironment variable to the cron service, then forwarding said variable to cron's environment appears to have solved the issue.Note that the
ol-cron-start.shchanges have not been tested, per se -- I ranecho "OL_CONFIG=/olsystem/etc/openlibrary.yml" >> /etc/environmentinside of the container in order to test these changes.Technical
Testing
Screenshot
Stakeholders