inveniosoftware / invenio-cli

CLI module for Invenio
https://invenio-cli.readthedocs.io
MIT License
10 stars 43 forks source link

Checking the return value in invenio-cli install #351

Closed psaiz closed 1 year ago

psaiz commented 1 year ago

:heart: Thank you for your contribution!

Description

The command invenio-cli install returns success all the time, even if parts of the process fails. There is a #FIXME in the code that this pull request addresses

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Third-party code

If you've added third-party code (copy/pasted or new dependencies), please reach out to an architect.

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.
psaiz commented 1 year ago

Please, note: there are other steps that could go wrong during the installation. For instance, there are calls to _copy_statics_and_assets() and _symlink_assets_templates( where things could also fail. These two functions don't seem to return success status, and I didn't dare to touch them. Let me know if you prefer that I look into that and combine it into this PR

psaiz commented 1 year ago

Hi Pablo, thanks for the suggestion. Let me look into it. I'll mark this as draft until it is ready for the next round of review

psaiz commented 1 year ago

Hola Pablo, I'm ready for the second round of the review. I hope this is what you had in mind. It is a bit ugly because one of the steps is different than the others. It is an internal call, instead of a run invenio. If you have suggestions of how to improve it, they will be appreciated

psaiz commented 1 year ago

Thanks for the review, tocayo.

I left one of the discussions unresolved, Please, let me know if I should open an issue as suggested

zzacharo commented 1 year ago

@psaiz can you please squash all these commits to a single one?

psaiz commented 1 year ago

Thanks @zzacharo, commits squashed

kpsherva commented 1 year ago

all good, only CI unhappy

psaiz commented 1 year ago

Thanks @kpsherva. Sorry about the tests. Fixed and rebased now.