core icon indicating copy to clipboard operation
core copied to clipboard

[QA] app dependencies are not checked during `occ upgrade`

Open jnweiger opened this issue 1 year ago • 4 comments

Seen with files_classifier-1.5.0-rc.1

  • install ownCloud 10.13.4 with files_classifier-1.4.0
  • occ app:enable files_classifier
  • visit admin page 'Workflow & Tasks -> the 'Document Classification section is there.
  • occ app:list files_classifier
Enabled:
  - files_classifier:
    - Version: 1.4.0
    - Path: /var/www/owncloud/apps/files_classifier
  • occ market:install -l /tmp/files_classifier-1.5.0-rc.1.tar.gz
files_classifier: Installing new version from /tmp/files_classifier-1.5.0-rc.1.tar.gz
files_classifier: App updated.
  • occ upgrade
...
Updating <files_classifier> ...
Updated <files_classifier> to 1.5.0
...
  • occ app:list files_classifier
Enabled:
  - files_classifier:
    - Version: 1.5.0
    - Path: /var/www/owncloud/apps-external/files_classifier
  • The app is upgraded, and seems up and running fin. grafik
  • nothing tells the admin, that he should have installed exiftool. BAD.
  • when a user uploads a picture. an error happens. OK grafik

  • But the upload just happens, without applying any policies like triggering a workflows, or possibly getting blocked. BAD

jnweiger avatar Feb 01 '24 16:02 jnweiger

app dependency validation was implemented years ago and was also unchanged all these years.

Hard to believe this is not working now.

DeepDiver1975 avatar Feb 01 '24 17:02 DeepDiver1975

app:enable does:

sudo -u www-data php occ app:enable files_classifier

In app.php line 1128:
                                                                                                                                                             
  App "Document Classification" cannot be installed because the following dependencies are not fulfilled: The command line tool exiftool could not be found  
                                                                                                                                                             

app:enable [-g|--groups GROUPS] [--] <app-id>

pako81 avatar Feb 01 '24 17:02 pako81

same as WebUI:

Clipboard - 1  Februar 2024 16_51

pako81 avatar Feb 01 '24 17:02 pako81

Reproducing the above steps again on a fresh system.

I can confirm, the webUI admin/apps says grafik

But the webUI market page seems to be happy: grafik

and so is occ app:list files_classifier:

Enabled:
  - files_classifier:
    - Version: 1.5.0
    - Path: /var/www/owncloud/apps-external/files_classifier

But yes, if the admin ignores that it is already enabled, and stubbornly tries occ app:enable files_classifier then he sees the proper "dependencies are not fulfilled" message. But why should an admin try to enable the app that is already enabled?

I believe my scenario is not at all that unlikely. Expected behavior: occ market:install -l should have failed with the "dependencies are not fulfilled" error message.

Adding dependencies during update did not happen often in the past. Maybe it is even the first time?

jnweiger avatar Feb 01 '24 21:02 jnweiger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 31 '24 01:07 github-actions[bot]

This issue has been automatically closed.

github-actions[bot] avatar Aug 10 '24 01:08 github-actions[bot]