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

Migrate internal entities to Google's Auto-Value. #679

Merged
merged 2 commits into from
May 26, 2020
Merged

Migrate internal entities to Google's Auto-Value. #679

merged 2 commits into from
May 26, 2020

Conversation

rigelbm
Copy link
Contributor

@rigelbm rigelbm commented May 23, 2020

The amount of boilerplate code I had to write in my last PR (#677) to add two fields in a response, was just too much. Enough is enough, so I migrated our internal entities to use Google's Auto-Value, that auto-generates a lot of this boilerplate automatically.

@rigelbm rigelbm requested a review from ijuma May 23, 2020 18:12
rigelbm added a commit that referenced this pull request May 26, 2020
The amount of boilerplate code I had to write in my last PR (#677) to add two fields in a response, was just too much. Enough is enough, so I migrated our internal entities to use Google's Auto-Value, that auto-generates a lot of this boilerplate automatically.
@rigelbm rigelbm requested review from rnpridgeon and agg111 May 26, 2020 12:05
@rnpridgeon
Copy link
Contributor

For the uninitiated (myself) https://www.baeldung.com/introduction-to-autovalue

Copy link
Contributor

@rnpridgeon rnpridgeon left a comment

Choose a reason for hiding this comment

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

LGTM, prior to merging though I'd ensure that the changes to toString does not alter log messages in some material way. User log aggregation/analytic pipelines may rely on the log messages being in a particular format so any material change there would represent a breakting change.

id, name, format, autoOffsetReset, autoCommitEnable, responseMinBytes, requestWaitMs);
}

@Override
public String toString() {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the effect of a change like this on logging?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AutoValue will generate reasonably similar toStrings for these entities. Most of these entities, and their toStrings were added as part of 5.5 preview. I would not expect people to be depending on them.

@rigelbm rigelbm merged commit fb5089c into confluentinc:master May 26, 2020
@rigelbm rigelbm deleted the auto-value branch September 2, 2020 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants