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: Reduce update scope for twingate_resource_update
#176
fix: Reduce update scope for twingate_resource_update
#176
Conversation
Pull Request Test Coverage Report for Build 8107348223Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
app/handlers/handlers_resource.py
Outdated
crd = ResourceSpec(**new["spec"]) | ||
crd = ResourceSpec(**spec) | ||
|
||
if len(diff) == 1 and diff[0][0] == "add" and diff[0][1] == ("id",): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I wonder if there is a nicer way to do this because the indexes are quite abstract. Maybe
if diff == (("add", ("id",), None, ANY),):
? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minhtule I thought about it but ANY
is in unittest
which I wouldnt want to import on non testing code
…listens-to-too-many-updates
Related Tickets & Documents
Fixes #173
Changes
twingate_resource_update
should only care whenspec
updates