openBackhaul / RegistryOffice

Apache License 2.0
2 stars 8 forks source link

Exemption cases in processing the forwarding ApprovingApplicationCausesPreparingTheEmbedding.CreateLinkToUpdateNewReleaseClient #527

Closed PrathibaJee closed 9 months ago

PrathibaJee commented 10 months ago

Now, we have a new embedding sequence in the RegistryOffice(RO).

  1. In this sequence , we have a forwarding ApprovingApplicationCausesPreparingTheEmbedding.RequestForOldRelease.
  2. This forwarding in RO will get the application-name and release-number of the old release of the embedding application using this API /v1/inform-about-preceding-release.
  3. Then , RO will find the http-client instance of the application-name and release-number of the old release.
  4. Then , RO will perform the forwarding ApprovingApplicationCausesPreparingTheEmbedding.CreateLinkToUpdateNewReleaseClient to create link between RO => OR://v1/update-client-of-subsequent-release

If , there is any problem in creating this link , RO => OR://v1/update-client-of-subsequent-release , Then the whole embedding process will be stopped

There are 2 usecases in which we shall not stop the embedding process and proceed further even if there is a failure in the above mentioned step.

Usecase#1 : If the registered application is the very first version and don’t have a previous version , then, the application-name of the old-release is OldRelease.

So, the response of the /v1/inform-about-preceding-release will be something like this ,

{
- "application-name": "OldRelease",
  "release-number": "1.0.1"
}

In RO’s configuration , a http-client instance with application-name=”OldRelease” shall not be found , which result in the failure of the forwarding ApprovingApplicationCausesPreparingTheEmbedding.CreateLinkToUpdateNewReleaseClient.

Usecase#2 : Lets say , for some reason , if the old version of an application is completly removed from the ApplicationLayer , then the detail of that old application will not be available in the RegistryOffice.

In such case also , RO shall not able to identify the http-client of the old version which result in the failure of the forwarding ApprovingApplicationCausesPreparingTheEmbedding.CreateLinkToUpdateNewReleaseClient.

Proposal : In case , if the http-instance of the old version of an application is not found in the RegistryOffice’s configuration file , then, RegistryOffice shall skip processing this forwarding ApprovingApplicationCausesPreparingTheEmbedding.CreateLinkToUpdateNewReleaseClient.

openBackhaul commented 9 months ago

Forwardings

shall just be executed IF (oldReleaseApplicationName != "OldRelease") AND (HttpClient for oldReleaseApplicationName exists in RO)

Changes required:

Create 2.1.1_spec branch and publish changes into it.

openBackhaul commented 9 months ago

Changed as agreed during call at January 18th, 2024.