thoth-station / thamos

A CLI tool and library for communicating with Thoth
http://thoth-station.ninja
GNU General Public License v3.0
15 stars 17 forks source link

`sensible-editor: Editing failed` in CI - that's expected #1131

Closed TomasTomecek closed 2 years ago

TomasTomecek commented 2 years ago

Bug description

We are running thamos in CI via yours pre-commit hook and getting this output:

/usr/bin/sensible-editor: 25: editor: not found
/usr/bin/sensible-editor: 28: nano: not found
/usr/bin/sensible-editor: 31: nano-tiny: not found
/usr/bin/sensible-editor: 34: vi: not found
Couldn't find an editor!
Set the $EDITOR environment variable to your desired editor.
2022-06-30 13:28:37,371 [123] ERROR    thamos: sensible-editor: Editing failed
              Runtime environment and configuration check results

Since this is running in CI, it's expected that $EDITOR is not available. Even pty may not be available. I'd suggest doing $editor magic only when it's needed.

Probably having an option for CI runs would be perfect.

Expected behavior

no such logs as described above

Environment information

pre-commit CI (probably ubuntu)

Additional context

https://github.com/packit/ogr/pull/722 https://results.pre-commit.ci/run/github/161636700/1656595682.f1bfqPiYRaafQs0E09kC4g

fridex commented 2 years ago

If this issue is caused during thamos config, passing --no-interactive could be useful in these cases.

👋🏻

mayaCostantini commented 2 years ago

Yes, this will be fixed by https://github.com/thoth-station/thoth-pre-commit-hook/pull/27 :)

codificat commented 2 years ago

Yes, this will be fixed by thoth-station/thoth-pre-commit-hook#27 :)

which is now merged, so /close

thanks for the report and the fix!

sesheta commented 2 years ago

@codificat: Closing this issue.

In response to [this](https://github.com/thoth-station/thamos/issues/1131#issuecomment-1171337525): >> Yes, this will be fixed by [thoth-station/thoth-pre-commit-hook#27](https://github.com/thoth-station/thoth-pre-commit-hook/pull/27) :) > >which is now merged, so >/close > >thanks for the report and the fix! Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.