reTHINK-project / dev-service-framework

DEPRECATED! Service framework libs have been moved to dev-runtime-core repo
Apache License 2.0
1 stars 2 forks source link

RuntimeCatalog.js choosing wrong runtime #50

Closed KCorre closed 8 years ago

KCorre commented 8 years ago

During Hyperty runtime instantiation, RuntimeCatalog.js use the saved runtime, while it should not.

What is happening: Hyperty Catalog did not have a "default" runtime. So instead it was serving the first runtime as "default". This runtime had cguid 49... and version 1. Update on catalog added a new runtime, set as default with cguid 30002 and version 1.

Request.js:53 looks for default version

get https://catalogue.powercommunication.rethink.orange-labs.fr/.well-known/runtime/default

RuntimeCatalog.js:29 load unexpected runtime

returning saved version: Object {cguid: 49816518489165, runtimeType: "browser", version: 1, objectName: "FirstRuntime", description: "This is a hyperty runtime descriptor"…} [...]

What shoud have happened RuntimeCatalog.js should see that runtime/default changed cguid instead of only comparing version number.

Note Other instance had core.js:5:13989 returning the saved runtime, instead of RuntimeCatalog.js:29. This is probably due to compilation of RuntimeCatalog.js into core.js. But I'm mentionning it anyway.

Endebert commented 8 years ago

Hi @KCorre,

As you have already figured out, the RuntimeCatalogue only checks the version when comparing the remote instance with the one in local storage. I will add a check to take the cguid in consideration.

pchainho commented 8 years ago

I assume this one can be closed. We'll reopen if needed

Endebert commented 8 years ago

Reopening until fix is actually in master branch. Needs issue https://github.com/reTHINK-project/dev-runtime-core/issues/101 to be solved first.

pchainho commented 8 years ago

done