Closed mariostieriansys closed 2 months ago
Attention: Patch coverage is 82.75862%
with 5 lines
in your changes missing coverage. Please review.
Project coverage is 96.32%. Comparing base (
7071ba6
) to head (75cd7f7
). Report is 5 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/ansys/pyensight/core/launcher.py | 82.75% | 3 Missing and 2 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
In my attempt to run PyEnSight tests in parallel during the ADO builds, I am having several issues on linux where port clashes happen between the different PyEnSight sessions.
There are two clashes happening. I am not sure which of the two, but surely one of these:
1) EnSight is launched without the "-ports" argument with a newly found random port. I believe EnSight internally should try to do the Client/Server connection with ports between 1104 to 1119, but potentially that's an issue 2) This is the most likely. The find_unused_port code in multiple simultaneous runs may find the same free ports before these are being used for an actual connection, like the gRPC connection or the VNC connection
To avoid these issues, I have introduced an internal function which inspects the current processes and their command lines, so to build a list of ports to avoid to be fed into find_unused_ports. Also, I am looking for an additional free port so to be used in the EnSight launch with "-ports" for the client/server connection. Finally, instead of using the pid of the process as starting point, I am using the random module. This workflow is being used only by the locallauncher
I have built the wheel and used it on one of the linux agents, the tests run correctly in parallel