Skip to content

Conversation

@heretic098
Copy link
Contributor

@heretic098 heretic098 commented Mar 25, 2025

Proposed Changes

Make the ClientConnectivity section of the Device DataClassORJSONMixin optional to resolve the kinds of issues seen in #1016.

  File "/home/user/github/python-tailscale/src/tailscale/tailscale.py", line 114, in devices
    return Devices.from_json(data).devices
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 12, in __mashumaro_from_json__
mashumaro.exceptions.InvalidFieldValue: Field "devices" of type dict[str, Device] in Devices has invalid value {<all the stuff in my tailnet>}

When I make these changes, this error goes away and I am then able to get my list of tailscale devices again.

Related Issues

fixes #1016

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.07%. Comparing base (b67ac92) to head (7a35916).
Report is 254 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1045      +/-   ##
==========================================
+ Coverage   90.17%   91.07%   +0.89%     
==========================================
  Files           4        4              
  Lines         112      112              
  Branches       15        4      -11     
==========================================
+ Hits          101      102       +1     
  Misses         10       10              
+ Partials        1        0       -1     
Flag Coverage Δ
?

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

☔ 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.

@heretic098
Copy link
Contributor Author

Hi @craibo , are you able to fix the labels? I don't seem to have the button.

@craibo
Copy link

craibo commented Apr 18, 2025

I am not unfortunately, well need to wait for @frenck to merge this for us

@frenck frenck changed the title #1016 make client connectivity optional Make client connectivity optional Apr 23, 2025
@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Apr 23, 2025
Copy link
Owner

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @heretic098 👍

Sorry for the delay, we had a busy month! 🙏

../Frenck

@frenck frenck merged commit bed0dd5 into frenck:main Apr 23, 2025
12 of 13 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fails to handle removed devices when parsing models

4 participants