disarm-dev / douma-api

DiSARM api (2018 and beyond)
MIT License
2 stars 1 forks source link

[config/registry] Douma-api returns multiple configurations for same instance #12

Closed Nicolaidavies closed 6 years ago

Nicolaidavies commented 6 years ago

In the dropdown on the application-registry-client the user can select multiple versions of the same instance. I'm not sure how this affects douma, but I'm sure it does in some way.

The mongo ids (_id) also seem to have been replaced with a combination of instance@version, I think this is dangerous. Would prefer not to touch anything with mongo.

onlyjsmith commented 6 years ago

Confirm if is a bug

Nicolaidavies commented 6 years ago

This is definitely an issue.

zwe-matn instance has multiple versions:

undefined is because of locational/application-registry-validation#11

Instead of returning the latest version (1.0.1) it returns undefined when getting /v7/config/zwe-matn

The same is true for the foci config. It has two versions:

It returns 0.1.2 instead of 0.1.4.

Nicolaidavies commented 6 years ago

@onlyjsmith this means we cannot update the config in case we make mistakes. Bad!

onlyjsmith commented 6 years ago

Agree is serious. Let's get through the smaller/quicker cards and come back to this.

Part of Zube #278 I think.

onlyjsmith commented 6 years ago

@mosaic141688 we've fixed this and redeployed registry client for both staging and production

@Nicolaidavies we've had another think about the ids, and think that the instance@version approach has benefits - specifically in updating configurations.

Note that in the current application registry, you can change any fields including _id. It will ignore an _id which doesn't match the calculated ${instance}@${version}, and either a missing or unmatching _id will trigger a POST instead of a PUT

onlyjsmith commented 6 years ago

Links directly to Zube #312