OpenConext-Attic / OpenConext-serviceregistry

:warning: Obsolete respository, archive only :zzz:
Other
4 stars 4 forks source link

Can't change entityid #32

Open baszoetekouw opened 9 years ago

baszoetekouw commented 9 years ago

When trying to change the entityid of current eid 1047 in SURFconext SR, I get the following error:

SimpleSAML_Error_Error: UNHANDLEDEXCEPTION Backtrace: 0 /opt/www/serviceregistry-4.0.6/vendor/simplesamlphp/simplesamlphp/www/module.php:180 (N/A) Caused by: Janus\ServiceRegistry\Entity\Connection\ConnectionExistsException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1047-8' for key 'janusentityeid_revisionid' Backtrace: 4 /opt/www/serviceregistry-4.0.6/vendor/janus-ssp/janus/src/Janus/ServiceRegistry/Service/ConnectionService.php:301 (Janus\ServiceRegistry\Service\ConnectionService::createFromDto) 3 /opt/www/serviceregistry-4.0.6/vendor/janus-ssp/janus/lib/Entity.php:194 (sspmod_janus_Entity::save) 2 /opt/www/serviceregistry-4.0.6/vendor/janus-ssp/janus/lib/EntityController.php:378 (sspmod_janus_EntityController::saveEntity) 1 /opt/www/serviceregistry-4.0.6/vendor/janus-ssp/janus/www/editentity.php:491 (require) 0 /opt/www/serviceregistry-4.0.6/vendor/simplesamlphp/simplesamlphp/www/module.php:135 (N/A)

This entity currently has revision 8, so form the error it seems that the revision is not increased when the entityid is edited.

However, for other entities, changing the id works fine. Any idea what could be the matter here?

lucasvanlierop commented 9 years ago

@baszoetekouw @relaxnow, I guess it's an issue I fixed recently. Getting the latest revision to calculate the next revision sometimes failed since the revisions where not queried with an order, see:

https://github.com/janus-ssp/janus/commit/a2ad5e08c04a389bdafadfc8bf14a23c6e05f56e#diff-878948e098e0a58d1f251c9f04f253c5

baszoetekouw commented 9 years ago

Ah, that seems the issue here indeed; other changes are also failing with the same error message.

Any chance this could be fixed quickly on prod?

On 13-10-2014 15:13 , Lucas van Lierop wrote:

@baszoetekouw https://github.com/baszoetekouw @relaxnow https://github.com/relaxnow, I guess it's an issue I fixed recently. Getting the latest revision to calculate the next revision sometimes failed since the revisions where not queried with an order, see:

janus-ssp/janus@a2ad5e0#diff-878948e098e0a58d1f251c9f04f253c5 https://github.com/janus-ssp/janus/commit/a2ad5e08c04a389bdafadfc8bf14a23c6e05f56e#diff-878948e098e0a58d1f251c9f04f253c5

— Reply to this email directly or view it on GitHub https://github.com/OpenConext/OpenConext-serviceregistry/issues/32#issuecomment-58889863.

Bas Zoetekouw SURFnet Advanced Services Tel: +31 30 2305362 Fax: +31 30 2305329 SURFnet - POBox 19035 - NL-3501 DA Utrecht - The Netherlands

lucasvanlierop commented 9 years ago

@baszoetekouw, this is 'blocked' by the finalization of deploying janus with ansible: https://github.com/SURFconext/SURFconext-deploy/pull/7

relaxnow commented 9 years ago

@baszoetekouw if you feel this deserves a out-of-band release, please contact @thijskh who is in charge of our planning.

thijskh commented 9 years ago

Let's await our experiences with deploying with Ansible to acc. Will follow up.