-
Notifications
You must be signed in to change notification settings - Fork 27
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
THREESCALE-10697: Add debug mode for the worker and add RubyMine configurations for both worker and listener #363
THREESCALE-10697: Add debug mode for the worker and add RubyMine configurations for both worker and listener #363
Conversation
To be honest, I don't see much value in explicit scripts for listeners. Alternatively, we could add This is how for example the configuration looks like for falcon listener:
|
For worker, indeed debugging doesn't work without an extra script, because But IMO, rather than creating another script, just for the debugging purposes, I'd introduce a new argument in
And then in the run configuration we'd just have |
So, in conclusion, rather than creating extra scripts, I would just document properly how to start the listener and worker processes locally, also in a way that is suitable for debugging (for example, making sure that only one worker/thread is listening in the listener). I think it's good to not only be able to run the app as quickly as possible, but also understand to some extent what happens behind the scenes. |
@mayorova booo spoilsport!! 👎👎 I agree on reuse as much as possible and not create new scripts if existing ones can be reused. However:
I also see that error with @lvillen scripts. That's because both scripts end up calling |
Thanks for your comments @jlledom
Yes, this is true, I forgot about it, because at some point I created that folder manually 😅
But is it only to simulate failovers? I mean, if the dev is not working on the Redis failover feature specifically, would they need it? I remembered now your point also that it is nice to catch all exceptions and print errors in the logs and keep the worker running instead of shutting down on exceptions... But - is it a common scenario? And also - wouldn't it "mask" some incorrect behavior? (I mean if the dev just misses something, because the worker keeps running, so "looks OK")
Shouldn't it rather be fixed by this PR? https://github.com/3scale/apisonator/pull/361/files#diff-2f501e81093c9eaa568d634cc294ab565cada69ebbc59570588c314b0f159cfe Here (as of today) we opted for not adding a global reactor. As I understand it, currently the production runs just the So, if we add it just in the development script, then what would happen in production?
Hm... interesting, not sure why this would happen, I can't reproduce. |
Yeah, maybe you're right.
That PR should ensure there's always a reactor for the worker tasks. OK, let's remove the
Sure, the more closer to production behavior, the better. |
With the changes from #364 I can launch successfully the listener and the worker in both sync ans async mode. Only two issues:
Don't you see this errors? This is my sync listener launcher: |
3e943b1
to
d9fe7fe
Compare
I don't see this deprecation warning. After the
I've put a breakpoint in Also, I've integrated your suggestions @jlledom in this last commit. I'm going to share here my configs hoping it helps: |
It all works for me now 👍 |
@jlledom The important piece here is
and with it:
In the second case (with |
The changes in But the PR title and description need some changes too. Also, I would like to see the RubyMine configurations somewhere, maybe in |
Yes, it's working now, thanks!
|
I meant |
fd035bb
to
c8ec79c
Compare
c8ec79c
to
53e0f82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a suggestion.
53e0f82
to
e8b30af
Compare
What this PR does / why we need it
This PR adds a debug mode for the worker and suggest RubyMine configs for both worker and listeners so developers can easily configure them in their RubyMine scripts. It comes from the request in #352, which suggested to create some scripts, but simplifies the process (thanks @mayorova).
Verification steps
Following the proposed configurations at
DEVELOPMENT.md
create the three RubyMine configurations.Then launch both worker a listener in debug mode with a breaking point and confirm it's working.