scala-steward
scala-steward copied to clipboard
Strict mode that fails if any version bump fails for any update
I would like for a scala-steward run to fail if any of the updates fails (i.e., if any of the updates prints "Unable to bump version for update ...").
I have noticed that there are two cases where "Unable to bump version for update" occurs:
- True positive: the version should have been updated, the log occurs, and in reality the version was not updated.
- False positive: the version should have been updated, the log occurs, but actually the version was updated.
In the worst case, scala-steward always succeeds (exit code = 0), but never makes an update. So, I would rather be extra cautious and just fail the whole run if either of these occur.
For now, I have worked around this as follows:
teethe scala-steward logs to a file- grep the file for "Unable to bump version for update"
- fail the Github Actions job if the grep returns non-empty
This workaround is good enough for me, for now. But I'm wondering if it would make sense to add this kind of strict, all-or-nothing mode as a command line argument?
I think strict mode is not necessary if we reduced the misleading "Unable to bump version for update" logs as described in https://github.com/scala-steward-org/scala-steward/issues/2906
Agreed it would be good to clean up that logging.
Are there any other cases where scala-steward can fail and still complete w/ a successful response? I feel like I remember seeing some others at times.
Maybe another way to solve this is to emit some sort of JSON digest, summarizing everything that scala-steward did during its run. Then the caller can parse this digest and apply their own definition of success or failure. Obviously not a small task, but just mentioning it as an idea.