feat: transition to ID-based management for ACLs and Node Attributes#16
Merged
feat: transition to ID-based management for ACLs and Node Attributes#16
Conversation
There was a problem hiding this comment.
👍 Looks good to me! Reviewed everything up to 81f62b6 in 1 minute and 13 seconds
More details
- Looked at
2167lines of code in7files - Skipped
0files when reviewing. - Skipped posting
5drafted comments based on config settings.
1. pkg/acl/acls/acls.go:134
- Draft comment:
Consider using a consistent error message for missing IDs across functions. For example, use "Missing 'id' field" in bothupdateACLanddeleteACL. - Reason this comment was not posted:
Confidence changes required:50%
The code inpkg/acl/acls/acls.gohas inconsistent error messages for missing IDs. InupdateACL, the error message is "Missing ACL 'id' in request body", while indeleteACL, it's "Missing 'id' field". These should be consistent for clarity.
2. pkg/acl/nodeattributes/nodeattributes.go:152
- Draft comment:
Consider using a consistent error message for missing IDs across functions. For example, use "Missing 'id' field" in bothupdateNodeAttranddeleteNodeAttr. - Reason this comment was not posted:
Confidence changes required:50%
The code inpkg/acl/nodeattributes/nodeattributes.gohas inconsistent error messages for missing IDs. InupdateNodeAttr, the error message is "Missing 'id' in request body", while indeleteNodeAttr, it's "Missing 'id' field". These should be consistent for clarity.
3. pkg/sync/sync.go:102
- Draft comment:
The comment "also remove any other custom fields if you want" is misleading as no other fields are removed. Consider updating or removing this comment. - Reason this comment was not posted:
Confidence changes required:50%
Inpkg/sync/sync.go, theremoveIDFieldsfunction has a comment suggesting the removal of other custom fields, but it doesn't actually remove any other fields. This comment might be misleading.
4. terraform/provider/acl_resource.go:137
- Draft comment:
Good use ofdoACLIDRequestfor HTTP operations, ensuring consistent request handling across functions. - Reason this comment was not posted:
Confidence changes required:0%
Interraform/provider/acl_resource.go, theCreatefunction usesdoACLIDRequestfor making HTTP requests. This function is defined in the same file and is used consistently across other functions for HTTP operations, which is good for maintainability.
5. terraform/provider/nodeattr_resource.go:148
- Draft comment:
Good use ofdoNodeAttrIDRequestfor HTTP operations, ensuring consistent request handling across functions. - Reason this comment was not posted:
Confidence changes required:0%
Interraform/provider/nodeattr_resource.go, theCreatefunction usesdoNodeAttrIDRequestfor making HTTP requests. This function is defined in the same file and is used consistently across other functions for HTTP operations, which is good for maintainability.
Workflow ID: wflow_GoQnwtfLkuhXeR4n
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Transition TACL system to ID-based management for ACLs and Node Attributes, updating both backend logic and Terraform provider.
acls.goandnodeattributes.go.acl_resource.goandnodeattr_resource.goto manage resources by stable ID instead of index.isNotFound().sync.goto push ACLs to Tailscale using ID-based JSON.helpers.gofor ID-based operations and error handling.README.mdfor project documentation.This description was created by
for 81f62b6. It will automatically update as commits are pushed.