OpenCatalogi / .github

Eén centrale plek voor hergebruik van informatietechnologie binnen de overheid
2 stars 1 forks source link

[Bug]: open-catalogi-bundle upgrade not working? #322

Closed sgort closed 1 year ago

sgort commented 1 year ago

Operating system

Ubuntu 22.04.2 LTS

Project Location

Backend

Instalation Location

Local

Bug description

Upgrade to 0.0.94 shows Updating plugin (1st screenshot) and ends with Plugin succesfully updated (2nd screenshot) but still keeps the version with 0.0.92.

image

image

Steps to reproduce

  1. start commonground-gateway docker setup
  2. login backend at http://localhost:8000/
  3. select Plugins
  4. select open-catalogi/open-catalogi-bundle (it 'll show an Update icon)
  5. press Upgrade button

Relevant log output

No response

rjzondervan commented 1 year ago

Hi @sgort,

Thanks for raising this issue! If you click in the 'versions' sidebar and locate 0.0.96, what version of commongateway/corebundle is shown as requirement?

You can check in Settings which version you have installed. If the installed version is lower than the version required by the newest version of the opencatalogi-bundle, the highest version is installed that complies with the installed version of the corebundle.

rjzondervan commented 1 year ago

Also, sometimes the underlying updater is slow to update the response on which version is installed due to caching. Could you check the actual installed version by running the following command in the PHP container: composer show open-catalogi/open-catalogi-bundle?

sgort commented 1 year ago
/srv/api $ composer show open-catalogi/open-catalogi-bundle
name     : open-catalogi/open-catalogi-bundle
descrip. : An example package for creating symfony flex bundles as plugins
keywords : common, common-gateway-plugin, commongateway, conduction, gateway, open catalogi, symfony
versions : * 0.0.92
type     : symfony-bundle
license  : European Union Public License 1.2 (EUPL-1.2) (OSI approved) https://spdx.org/licenses/EUPL-1.2.html#licenseText
homepage : https://commongatway.nl
source   : [git] https://github.com/OpenCatalogi/OpenCatalogiBundle.git 1b58e2157baa89838df403cd7437be6f4707f7fd
dist     : [zip] https://api.github.com/repos/OpenCatalogi/OpenCatalogiBundle/zipball/1b58e2157baa89838df403cd7437be6f4707f7fd 1b58e2157baa89838df403cd7437be6f4707f7fd
path     : /srv/api/vendor/open-catalogi/open-catalogi-bundle
names    : open-catalogi/open-catalogi-bundle

support
issues : https://github.com/OpenCatalogi/OpenCatalogiBundle/issues
source : https://github.com/OpenCatalogi/OpenCatalogiBundle/tree/0.0.92

autoload
psr-4
OpenCatalogi\OpenCatalogiBundle\ => src/

requires
commongateway/corebundle >=1.0.82
php >=7.4

requires (dev)
symfony/dependency-injection ~3.4|~4.1|~5.0
/srv/api $
rjzondervan commented 1 year ago

Okay, and could you also run the following command? composer show commongateway/corebundle

sgort commented 1 year ago
/srv/api $ composer show commongateway/corebundle
name     : commongateway/corebundle
descrip. : Symfony Bundle for dutch common ground functionality
keywords : common, commongateway, conduction, gateway, symfony
versions : * 1.0.107
type     : symfony-bundle
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://commongatway.nl
source   : [git] https://github.com/CommonGateway/CoreBundle.git 90cf1eed699114daefd4c5817c309dd9f7bd8117
dist     : [zip] https://api.github.com/repos/CommonGateway/CoreBundle/zipball/90cf1eed699114daefd4c5817c309dd9f7bd8117 90cf1eed699114daefd4c5817c309dd9f7bd8117
path     : /srv/api/vendor/commongateway/corebundle
names    : commongateway/corebundle

support
email : info@conduction.nl
issues : https://github.com/CommonGateway/CoreBundle/issues
source : https://github.com/CommonGateway/CoreBundle

autoload
psr-4
CommonGateway\CoreBundle\ => .
exclude-from-classmap

requires
league/flysystem-bundle ^2.4
league/flysystem-ftp ^2.4
php ^7.4.0
symfony/monolog-bundle ^3.8

requires (dev)
cache/integration-tests dev-master
doctrine/cache ~1.6
doctrine/dbal ~2.5
predis/predis ~1.1
symfony/config ^5.1
symfony/dependency-injection ~3.4|~4.1|~5.0
symfony/var-dumper ^4.1.1|^5.1

conflicts
doctrine/dbal <2.5
symfony/dependency-injection <3.4
symfony/var-dumper <3.4
/srv/api $
rjzondervan commented 1 year ago

Okay, thanks. Now for a hard test: what happens if you run the following command? composer require open-catalogi/open-catalogi-bundle

sgort commented 1 year ago

Ok. De 0.0.94 die ik wil installeren requires 1.0.82.

image

Ik heb nu 1.0.107... Dat zou dan toch moeten werken?

image

sgort commented 1 year ago
/srv/api $ composer require open-catalogi/open-catalogi-bundle
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update open-catalogi/open-catalogi-bundle
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading open-catalogi/open-catalogi-bundle (0.0.92 => 0.0.96)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downloading open-catalogi/open-catalogi-bundle (0.0.96)
  - Upgrading open-catalogi/open-catalogi-bundle (0.0.92 => 0.0.96): Extracting archive
Generating optimized autoload files
135 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Endroid Installer detected project type "symfony"

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [OK]
Executing script assets:install public [OK]

Found 6 security vulnerability advisories affecting 6 packages.
Run composer audit for a full list of advisories.
Using version ^0.0.96 for open-catalogi/open-catalogi-bundle
/srv/api $
sgort commented 1 year ago

Mijn http://localhost:8000/ reageert niet meer. Deze vertoont kuren. Er komt na verloop van tijd een 504 (meen ik) rechtsonder. Daarna rest slechts containers restarten...

sgort commented 1 year ago

Dat was overigens al zo voordat dit issue werd aangemaakt.

rjzondervan commented 1 year ago

Check, dankjewel!

Het lijkt er op dat het commando dat onder water afgevuurd wordt wel succesvol kan draaien (de ervaring is dat in Ubuntu omgevingen de files die bijgewerkt zouden moeten worden geblokkeerd worden en met chmod weer moeten worden gedeblokkeerd). Dat zou er op wijzen dat de respons onterecht succesvol is terwijl de containers nog bezig zijn met een installatie, of anderszins de installatie afbreken.

Zou je vwb het vastlopen kunnen proberen of alles wel blijft lopen als je de cron-container uitschakelt?

sgort commented 1 year ago

Wel cool dit. Ben nu up to date ;-)

image

sgort commented 1 year ago

En ik heb de cron container uitgezet

image

sgort commented 1 year ago

Die chown was idd nodig voor deploy, zie ook https://github.com/ConductionNL/commonground-gateway/pull/1509/commits/f172f546eaebd5953f2956fdcd495a0749e4279e

Maar dat levert dan bij live update (weer) issues op?

sgort commented 1 year ago

Guess dat deze nu gesloten kan worden. Your call.

rjzondervan commented 1 year ago

Het lijkt er inderdaad op dat docker zo nu en dan een deel van de files opnieuw lockt.

rjzondervan commented 1 year ago

Ik zou hem nog even open willen houden voor het geval dit issue vaker optreed.

sgort commented 1 year ago

Ik krijg de indruk dat navigatie sneller/vlotter is. Ik werd na verloop van tijd automatisch uitgelogd. Zal eens afwachten of dat nu weer zo is.

sgort commented 1 year ago

Het blijft nu werken zo te zien. En uitloggen met opnieuw inloggen doet het nu ook!