Skip to content

Conversation

@Mathieu-Deharbe
Copy link
Contributor

@Mathieu-Deharbe Mathieu-Deharbe commented Mar 8, 2024

Refactorization in order to simplify code sharing between computation microservices, especially in the 'service' package.

The code in the new 'computation' package should be copyable to all the other computation microservices and extended there.

It was created in a first PR in the load flow service, this PR is only an adaptation of the common classes to security analysis, but it will include some modifications.

Changes (that were in the loadflow version of the code, and therefore are now in the common code used bu security analysis) :

  1. PostCompletion annotation in the NoificationService. This evolution was expected cf this TODO message in the security analysis notification service :
    // Today we don't send notification inside @transactional block. If this behavior change, we should use @PostCompletion to
    // make sure that the notification is sent only when all the work inside @transactional block is done.

=> it seems that now notification are indeed sent inside @transactional blocs so it should be fine (===> should be verified and tested) => checks with Anis Touri

  1. there is now a logger for each message type (CANCEL_MESSAGE_LOGGER, STOP_MESSAGE_LOGGER...) => should be tested, does it imply something for the front ?
  2. In the ReportService : the new common computation class adds a 'MediaType.APPLICATION_JSON'. Is it really new or was it implicitly done before ? => to check.

…text

Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
thangqp and others added 4 commits March 25, 2024 09:09
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@Mathieu-Deharbe
Copy link
Contributor Author

Mathieu-Deharbe commented Mar 27, 2024

@SlimaneAmar @thangqp Your requests had a lot in common so I combined them into one commit.

I tested a few run and cancels and it all runs like before.

Copy link

@thangqp thangqp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note : In common classes, there are several files which have some formats different to ones in loadflow but it is not important since we move only common files in loadflow server into a common repo

Code OK, Test OK (including 'stop a running')

Signed-off-by: Slimane AMAR <amarsli@gm0winl104.bureau.si.interne>
@sonarqubecloud
Copy link

@Mathieu-Deharbe Mathieu-Deharbe merged commit feaf8bd into main Mar 28, 2024
@Mathieu-Deharbe Mathieu-Deharbe deleted the generalize-services-classes branch March 28, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants