-
Notifications
You must be signed in to change notification settings - Fork 18
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
Public encoding.DecodeTypeMeta #52
Merged
siyuanfoundation
merged 1 commit into
etcd-io:master
from
wzshiming:feat/decode-type-meta
May 16, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
Can you help me understand why removing this function better? While
DecodeSummary
may not do much, it make sure there is in consistency in printing out summary for batch and non-batch mode. With this change, whenever there is some new meta field we want to display, the change has to be in 2 places, and that would be more error prone.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.
I think this function should only be used by cmd without exception, or just move it to cmd 😄.
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.
I really don't see much benefits of this refactoring.
DecodeSummary
is closely related to decode function itself, and can be used elsewhere in theory.@jmhbnz WDYT?
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.
It's minor pr, though for me it's not particularly clear which high level problem this pr is trying to work towards which is why I have not already added review or approval for it.
I suggest we try focus community effort on progressing towards an agreed direction rather than refactor for the sake of it. Our challenge is obviously that auger has only recently come into sig-etcd and we have not created issues yet to establish direction to go in.
Perhaps we should step back a little from this code diff and try to get agreement on what problems we are wanting to solve so it's clear for future pull requests if they align with the direction we are trying to go in?
If project members or contributors can propose issues to start discussion it would be very helpful.
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.
I agree with you. I've already made issue #3 describing what I wanted to achieve. which is directly edit the data from etcd, and using it just like
kubectl
.Since the code changes are already a bit much, I'm trying to split it up as much for review.
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.
The purpose of this PR is to expose
encoding.DecodeTypeMeta
, make it can be used in other packages.then see that
encoding.DecodeSummary
only applies to cmd, so it moves over to cmdThere 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.
In the interest of getting this merged I suggest we limit the pr change to just making
DecodeTypeMeta
public. I am not in favor of the change toDecodeSummary
.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.
Done. change it as you say.
And can you tell me why? As I understand
DecodeSummary
will never be used by others.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.
Personally because it is so early in lifecycle of auger within sig-etcd. We don't yet have regular releases occurring, or announcements of deprecations, or clear understandings of all use cases external to the project. For these reasons I am wary of removing a previously public function just for a very optional refactor.
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.
Thanks for the clarification, I finally understand the difference in how we think about this, you see it as a legacy project that needs to ensure compatibility, and I see it as a new project, the history is actually in github.com/jpbetz/auger.