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 crashing syncing thread when logging big integers #1336

Merged
merged 3 commits into from
May 8, 2023

Conversation

aniezurawski
Copy link
Contributor

No description provided.

@aniezurawski aniezurawski force-pushed the waj/fix-64-bit-crash branch from 65e9f08 to a1a4fcf Compare May 5, 2023 11:52
@aniezurawski aniezurawski force-pushed the waj/fix-64-bit-crash branch from a1a4fcf to 6178d6a Compare May 5, 2023 11:54
@aniezurawski aniezurawski changed the title Fix crashing syncing thread when logging big integers Draft: Fix crashing syncing thread when logging big integers May 5, 2023
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.01 ⚠️

Comparison is base (ec704a9) 79.64% compared to head (6258e8a) 79.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1336      +/-   ##
==========================================
- Coverage   79.64%   79.64%   -0.01%     
==========================================
  Files         275      275              
  Lines       13517    13523       +6     
==========================================
+ Hits        10766    10770       +4     
- Misses       2751     2753       +2     
Flag Coverage Δ
py3.7 73.02% <66.66%> (-6.17%) ⬇️
py3.9 ?
ubuntu 73.02% <66.66%> (-6.45%) ⬇️
unit 73.02% <66.66%> (-0.69%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/neptune/attributes/atoms/integer.py 88.88% <66.66%> (-6.35%) ⬇️

... and 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aniezurawski aniezurawski changed the title Draft: Fix crashing syncing thread when logging big integers Fix crashing syncing thread when logging big integers May 5, 2023
AleksanderWWW
AleksanderWWW previously approved these changes May 5, 2023
Copy link
Contributor

@AleksanderWWW AleksanderWWW left a comment

Choose a reason for hiding this comment

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

LGTM. One optional thing to change

@@ -45,5 +53,17 @@ def assign(self, value: typing.Union[IntegerVal, float, int], *, wait: bool = Fa
if not isinstance(value, IntegerVal):
value = IntegerVal(value)

if value.value > Integer.MAX_32_BIT_INT or value.value < Integer.MIN_32_BIT_INT:
Copy link
Contributor

Choose a reason for hiding this comment

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

Slightly more readable syntax:
Integer.MIN_32_BIT_INT < value.value < Integer.MAX_32_BIT_INT

Raalsky
Raalsky previously approved these changes May 8, 2023
@aniezurawski aniezurawski merged commit 6cf541a into master May 8, 2023
@aniezurawski aniezurawski deleted the waj/fix-64-bit-crash branch May 8, 2023 11:36
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