Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm: performance / excessive external calls in LevaDocumentHistory:getReferencedDocumentsVersion #654

Closed
clemensutschig opened this issue May 21, 2021 · 2 comments · Fixed by #1083
Labels
bug Something isn't working

Comments

@clemensutschig
Copy link
Member

clemensutschig commented May 21, 2021

Describe the bug
with jenkins transforming all calls into CPS - we need to be extra carefull on large open (functional) loops - that do extensive external work .. leading to NonSerializableExceptions ..

The method in
https://github.com/opendevstack/ods-jenkins-shared-library/blob/3.x/src/org/ods/orchestration/usecase/LeVADocumentUseCase.groovy#L1729-L1750

is a great (=bad) example ... we go out for each docType, in each document generation, to find the histories against jira (in the most excessive case) - also w/o using any caching

To Reproduce
follow up from opendevstack/ods-jenkins-shared-library/#645

Expected behavior
performant code :D

Affected version (please complete the following information):

  • OpenShift: [3.11/4]
  • OpenDevStack [3.x/master]

Log Output (ensure to remove any confidential information like tokens, project names, etc.

see below

Additional context
...

@clemensutschig clemensutschig added the bug Something isn't working label May 21, 2021
@clemensutschig clemensutschig added this to To Do in OpenDevStack 3.1.1 via automation May 21, 2021
@clemensutschig clemensutschig added this to To Do in OpenDevStack 4.0.0 via automation May 21, 2021
@clemensutschig
Copy link
Member Author

@metmajer fyi

@clemensutschig
Copy link
Member Author

@s2oBCN - added the log here ..

As you can see in the log we are executing the same request one time and another for the same issues, this is the log:

Retrieved max doc version... - is always a call to jira ...

[Pipeline] echo
2021-05-21 10:07:57Z Document DIL uploaded @...
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-149]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-141]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-164]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-153]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-157]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-144, OFI1805-151, OFI1805-162]
[Pipeline] echo
DEBUG: [docgen-ofi1805-DIL]  (took 9394 ms)

and for the RA ...

[Pipeline] echo
[docgen-ofi1805-RA] Creating document of type 'RA' for project 'ofi1805' in phase 'Test' and stage 'PRE_END'
expected to call org.ods.orchestration.usecase.LeVADocumentUseCase.invokeMethod but wound up catching org.ods.orchestration.usecase.LeVADocumentUseCase.createRA; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-149]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-141]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-164]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-153]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-157]
[Pipeline] echo
DEBUG: Retrieved max doc version 0 from doc tracking issues [OFI1805-144, OFI1805-151, OFI1805-162]
[Pipeline] echo
DEBUG: Retrieved max doc version 2 from doc tracking issues [OFI1805-141, OFI1805-6]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant