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

Catch ASN Parse error more gracefully #626

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Conversation

mrchrisadams
Copy link
Member

We recently saw a bunch of exceptions when looking up an ASN from IP addresses.

This handles them more gracefully while we investigate what's causing them.

This pull request includes changes to the apps/greencheck module to improve error handling and testing. The most important changes involve adding a new exception type to the imports, updating error handling in the check_for_matching_asn method, and adding a new test case to ensure the new error handling works as expected.

Improvements to error handling:

Enhancements to testing:

Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 13.0222 814.982 2.97 274
checkout 8.58 3.58776 3.59 1
pip install uv wheel 8.7 3.58255 1.79 2
pip install requirements 66.942 32.1157 5.35 6
pytest 11.72 775.696 2.96 262

🌳 CO2 Data:
City: Washington, Lat: 38.7095, Lon: -78.1539
IP: 20.51.206.227
CO₂ from energy is: 0.320287926 g
CO₂ from manufacturing (embodied carbon) is: 0.078175983 g
Carbon Intensity for this location: 393 gCO₂eq/kWh
SCI: 0.398464 gCO₂eq / pipeline run emitted

Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 13.8503 829.267 3.00 276
checkout 8.82 3.589 1.79 2
pip install uv wheel 8.96 3.59166 1.80 2
pip install requirements 69.478 32.8381 5.47 6
pytest 12.4482 789.248 3.00 263

🌳 CO2 Data:
City: Washington, Lat: 38.7095, Lon: -78.1539
IP: 20.55.14.158
CO₂ from energy is: 0.325901931 g
CO₂ from manufacturing (embodied carbon) is: 0.078746611 g
Carbon Intensity for this location: 393 gCO₂eq/kWh
SCI: 0.404649 gCO₂eq / pipeline run emitted

@mrchrisadams mrchrisadams merged commit 5be47de into master Nov 15, 2024
4 checks passed
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.

1 participant