Repository navigation
fix(compose): name the compose file in processFile errors - #14391
TDnorthgarden wants to merge 1 commit into
Conversation
createLayers and processExtends return processFile errors unwrapped, so a failure in any of the project's compose files — the extended ones included — reaches the user with no hint of which file to fix. Wrap the two call sites with the file name. Signed-off-by: Aucoto <tdnorthgarden@gmail.com>
|
Thanks @TDnorthgarden, the change itself is correct and consistent with the surrounding error messages (both That said, this is the follow-up suggested in the review of #14387, and since #14387 is still under review there is little point in landing it separately. Could you fold this commit into #14387 and close this PR? Two reasons for doing it there:
Two small things while you are at it: the description uses |
Agreed — especially on the weak test: os.ReadFile already carries the path, so the old assertions passed regardless of the wrap. Folded into #14387 (df3f26d): the tests now use a real flow-style file, whose rejection does not name the file, so only the wrapped error satisfies the assertions. Closing this one as suggested. |
Problem
createLayersandprocessExtendsreturnprocessFileerrors unwrapped.A failure in any of the project's compose files — the ones pulled in
through
extendsincluded — reaches the user with no hint of which fileto fix:
With several compose files in play, the user has to open each one to find
the offender.
Fix
Wrap the two
processFilecall sites (createLayers,processExtends)with the file name:
failed to process compose file ./override.yaml: service "web": env_file is in flow style, ...Suggested in the #14387 review.