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

Remove derp section from ClientConnectivity model #428

Merged
merged 6 commits into from
Nov 4, 2023

Conversation

heretic098
Copy link
Contributor

@heretic098 heretic098 commented Oct 10, 2023

Proposed Changes

Remove the requirement for the tailscale API to return the derp information in the ClientConnectivity section of the response as it has been removed in tailscale/tailscale@b7988b3.

Create a default empty list to hold tags in case none are returned from the API. This avoids issues returning information where some devices have no tags defined. In this case with the current implementation you see errors like this:

devices.XXXXXXXXXXX.tags
  Field required [type=missing, input_value={'addresses': ['XXX.YY.ZZ...: True, 'upnp': False}}}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.0.3/v/missing

Related Issues

#427

(Github link to related issues or pull requests)

@heretic098
Copy link
Contributor Author

@frenck , I don't seem to be able to resolve the issue with the labels myself. Any assistance appreciated.

Copy link

sonarcloud bot commented Nov 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Nov 4, 2023
src/tailscale/models.py Outdated Show resolved Hide resolved
src/tailscale/models.py Outdated Show resolved Hide resolved
src/tailscale/models.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2023

Codecov Report

Merging #428 (e020ed5) into main (3799499) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #428      +/-   ##
==========================================
- Coverage   91.07%   90.99%   -0.09%     
==========================================
  Files           4        4              
  Lines         112      111       -1     
  Branches       15       15              
==========================================
- Hits          102      101       -1     
  Misses          9        9              
  Partials        1        1              
Files Coverage Δ
src/tailscale/models.py 91.83% <100.00%> (-0.17%) ⬇️

src/tailscale/models.py Outdated Show resolved Hide resolved
src/tailscale/models.py Outdated Show resolved Hide resolved
@frenck
Copy link
Owner

frenck commented Nov 4, 2023

Sorry for the mess in the changes above. I messed up the merge :(

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 👍

../Frenck

@frenck frenck merged commit 5eb19de into frenck:main Nov 4, 2023
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2023
@heretic098 heretic098 deleted the derp_removal branch November 6, 2023 16:37
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.

None yet

3 participants