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

[MINOR] Fix in Python API GatewayServerListener #2243

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

e-strauss
Copy link
Contributor

@e-strauss e-strauss commented Mar 14, 2025

two things:

  • the current inner class DMLGateWayListener implements function from the GatewayServerListener interface, which are never invoked by the GatewayServer (since the GatewayServer, which also implements GatewayServerListener, does not implement these methods
  • DMLGateWayListener previously called, Sys.exit(), which I think is not correct, since it breaks the proper shutdown of the GatewayServer

I added a new unit case, which checks the functionality of the DMLGateWayListener.

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.59%. Comparing base (cfbe190) to head (c177509).
Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2243      +/-   ##
============================================
+ Coverage     72.47%   72.59%   +0.12%     
- Complexity    45466    45573     +107     
============================================
  Files          1469     1469              
  Lines        170893   171132     +239     
  Branches      33325    33377      +52     
============================================
+ Hits         123851   124236     +385     
+ Misses        37632    37490     -142     
+ Partials       9410     9406       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@e-strauss e-strauss requested a review from Baunsgaard March 14, 2025 14:51
@Baunsgaard
Copy link
Contributor

Hi @e-strauss ,

We added the shutdown calls to enforce that the Java process would terminate in case the Python API terminated. It does violate the default shutdown process since any live connections would be forcefully terminated. Because only one Python process is guaranteed to be using this listener, the design was valid.

But I do see your points, and I like the PR. I just want to verify the Python API startup and shutdown time of the change before merging.

@e-strauss
Copy link
Contributor Author

@Baunsgaard ok gotcha. But from what I saw during my tests, is that the 4 methods that I removed, were unreachable, since the server didn't forwarded the events to the listener. the only signal that was forwarded was the shutdown signal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants