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

fix: add try catch to request.get to the load-generator of golang-push #1933

Merged
merged 3 commits into from
May 11, 2023

Conversation

richzw
Copy link
Contributor

@richzw richzw commented Apr 23, 2023

When the rideshare server starts later than load-generator, the following errors could come up

rideshare-load-generator-1  | requesting scooter from ap-south
rideshare-load-generator-1  | Traceback (most recent call last):
rideshare-load-generator-1  |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn
rideshare-load-generator-1  |     conn = connection.create_connection(
rideshare-load-generator-1  |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection
rideshare-load-generator-1  |     raise err
rideshare-load-generator-1  |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
rideshare-load-generator-1  |     sock.connect(sa)
rideshare-load-generator-1  | ConnectionRefusedError: [Errno 111] Connection refused
rideshare-load-generator-1  |
rideshare-load-generator-1  | During handling of the above exception, another exception occurred:
rideshare-load-generator-1  |
...
rideshare-load-generator-1 exited with code 1

As a result, the load-generator could exit. To fix it, add try ... catch block to requests.get.

@CLAassistant
Copy link

CLAassistant commented Apr 23, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@richzw
Copy link
Contributor Author

richzw commented Apr 23, 2023

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

The CLA has been signed, but click the recheck, the status is still not signed yet

@Rperry2174
Copy link
Contributor

Thanks for the help @richzw I know it's tedious but we'd love for all of our load-generators to match. Could you either help us make the same change in:

If not happy to do so myself

@richzw
Copy link
Contributor Author

richzw commented Apr 26, 2023

Thanks for the help @richzw I know it's tedious but we'd love for all of our load-generators to match. Could you either help us make the same change in:

If not happy to do so myself

@Rperry2174 , I have applied this change to all load-generators. Could you please review it again?

Copy link
Contributor

@Rperry2174 Rperry2174 left a comment

Choose a reason for hiding this comment

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

Sorry for the delay here @richzw was out of town for a bit. Thanks so much for the fix!

@Rperry2174 Rperry2174 merged commit 8f03fa3 into grafana:main May 11, 2023
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