openBackhaul / RegistryOffice

Apache License 2.0
2 stars 8 forks source link

Request to restrict OldRelease and NewRelease instances while fetching for http-c of application #458

Closed vanithavalluripalli9 closed 1 year ago

vanithavalluripalli9 commented 1 year ago

Problem Description :

When a new release of existing application is Entering into the architecture, it will update the http-c , tcp-c of Old Release in config file of New Release with the preceding application information provided in request body of /v1/register-yourself.

Once the application is approved and receives “embed-yourself” , a callback will be triggered to the old application’s “/v1/bequeath-your-data-and-die” .

When /v1/bequeath-your-data-and-die is executed, as part of callback PromptForBequeathingDataCausesTransferOfListOfAlreadyRegisteredApplications it will transfer the client applications from old Release to New Release by calling regard-application in New Release .

As part of execution of register-application , it will find whether applications exists or not , if it exists it will update the instance with current details .

During this process, if we are trying to regard preceding application client instance , it will find oldRelease client as preceding application instance instead of correct instance and it will update the details which is not expected.

Proposal :

In OAS , for services like /v1/register-application, /v1/deregister-application can we add description for application-name and release-number attributes like " update shall be made considering http-c instances excluding OldRelease and NewRelease http-c instances " .

Note : In implementation, the OldRelease and NewRelease instances shall be considered from forwarding-constructs like PromptForEmbeddingCausesRequestForBequeathingData and PromptForBequeathingDataCausesTransferOfListOfAlreadyRegisteredApplications respectively.
Example:

properties:
application-name:
     type: string
     pattern: '^([A-Z][a-z0-9]+){2,}$'
     description: >
        'Name of application that wants to register
         find or create [/core-model-1-4:control-construct/logical-termination-point=ro-2-0-1-http-c-*/layer-protocol=0/http-client-interface-1-0:http-client-interface-pac/http-client-interface-configuration/application-name]
         (update shall be made considering http-c instances excluding OldRelease and NewRelease http-c instances)'
release-number:
    type: string
    pattern: '^([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{1,2})$'
    description: >
        'Release of application that wants to register 
         find or create [/core-model-1-4:control-construct/logical-termination-point=ro-2-0-1-http-c-*/layer-protocol=0/http-client-interface-1-0:http-client-interface-pac/http-client-interface-configuration/release-number]
         (update shall be made considering http-c instances excluding OldRelease and NewRelease http-c instances)'
vanithavalluripalli9 commented 1 year ago

Similar issue , we discussed and decided in https://github.com/openBackhaul/ExecutionAndTraceLog/issues/259. The same solution shall be applied for this issue aswell for the services /v1/register-application and /v1/deregister-application.

Change to be made at the OAS: In /v1/register-application and /v1/deregister-application the description has to be changed towards "find shall be made excluding OldRelease and NewRelease http-c instances" at application-name and release-number attributes .

openBackhaul commented 1 year ago

Changed from "... find ..." to "... find, but not at OldRelease or NewRelease, ..." at

of

Change committed into ro_v1.0.0_spec