Fix cog-runtime version for procedures & handle container logs #2524
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does 3 things.
First, #2522 pins any model with
cog_runtime: true
to a coglet version that predates incompatible procedure-related changes to cog-runtime. However... the default template for procedures sets cog_runtime to true. Boo. This ensures that procedures use the latest coglet, normal models with cog_runtime:true use the pinned version, and everything else uses the default.Second, the init template for procedures no longer sets the offending
cog_runtime: true
.Third, when we do end up with the correct cog-runtime & coglet version in the model, cog's stdout is spammed with logs from the container:
To fix that, stderr from the container is now redirected to cog's console logger. If the log line is structured json (like above) it'll be parsed and tagged with the correct log level. If it is an unstructured log line it'll land in the console's
info
level. By default only warning+ is shown, if the--debug
flag is set all logs are shown.