Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA] app dependencies are not checked during occ upgrade #41174

Open
jnweiger opened this issue Feb 1, 2024 · 4 comments
Open

[QA] app dependencies are not checked during occ upgrade #41174

jnweiger opened this issue Feb 1, 2024 · 4 comments

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Feb 1, 2024

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
@DeepDiver1975
Copy link
Member

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

Hard to believe this is not working now.

@pako81
Copy link
Contributor

pako81 commented Feb 1, 2024

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
Copy link
Contributor

pako81 commented Feb 1, 2024

same as WebUI:

Clipboard - 1  Februar 2024 16_51

@jnweiger
Copy link
Contributor Author

jnweiger commented Feb 1, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants