InvenioRDM Alpha 2 (November Release)

Bugs

Setup issue with files location creation

When running invenio-cli setup --prod, the following error occurs:

$ invenio-cli setup --prod
Setting up environment for RDM application...
Setting up server...
Starting containers...
Creating database...
Creating indexes...
Creating files location...
Could not update config. Env dir does not extis.

I had a brief look for the cause and created an issue for this in invenio-cli: #inveniosoftware/invenio-cli/issues/61 (I can’t post more than two links apparently, because I’m a new member in the forum… :confused:)

There’s a also a minor typo, s/extis/exist.

I guess for others wanting to continue (until this is fixed), getting around requires doing something like:

$ docker-compose -f docker-compose.full.yml exec web-api bash
[root@a45018e1503f src]# invenio files location --default 'default-location' /opt/invenio/var/instance/

# Also run the rest of the commands
[root@a45018e1503f src]# invenio roles create admin
[root@a45018e1503f src]# invenio access allow superuser-access role admin

invenio.cfg “automagic” variables

At some point in the “Configuration” section, the following is mentioned:

# automatically set configuration variables
ACCOUNTS_SESSION_REDIS_URL=...
# ...

Besides being actually valid Python code (because of the Ellipsis literal) but obviously an invalid configuration value, it might cause some other confusion:

When I read the comment a silly thought came through my mind that setting something to ... would somehow “magically” make it get replaced by the default value (e.g. from the specific extension). I’m pretty besides being a “Difficult problem ™” overall, it’s also probably not that useful/intuitive.

Maybe removing the specific lines (and just keeping the Permission Policy class only) or including an actual commented-out config key-value pair as an example, would clarify things.

What worked well

  • The quick and compact instructions and feature exploration is fantastic!

What didn’t work well

  • Some scripts (e.g. build) take some time to execute and the user ends up with a static terminal without knowing if there’s any progress. Not sure how easy it would be to add a progress bar/spinner though…
  • When updating the invenio.cfg file (e.g. for changing permissions), having to run invenio-cli build ... feels a bit heavy. Doing a container.put_archive call would help a lot (not sure what the drawbacks/issues are though). Another thing to explore is using flask run --extra-files ...

Wishes for documentation

  • For the “Install the CLI” section, recommending pipenv to install the package seems a bit counter-intuitive. The way I perceive it, invenio-cli is a general utility (similar to vue-cli and create-react-app), so basically something one would pip install --user --upgrade invenio-cli (or manage with pipx).
  • Some info regarding version control of the generated files (e.g. running git init at some point)
  • Adding a .gitignore for e.g. logs and other common files might be necessary then
  • For the authenticated REST API calls, using the CLI for creating the admin user account and tokens via invenio tokens create ... could also be a nice alternative option
  • A mini-changelog for each release would help with knowing what to look further into regarding new features