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
[BEAM-12736] ProtoByteBuddyUtils fix enabling field names defined in camel-case to be used with ProtoMessageSchema #15306
[BEAM-12736] ProtoByteBuddyUtils fix enabling field names defined in camel-case to be used with ProtoMessageSchema #15306
Conversation
…rsion 2.5.0 & grpcio to 1.34.0
[BEAM-12411] Cherry-pick apache#14888: Update Tensorflow to version 2.5.0 & grpcio to 1.34.0
…and shutdown BigQuery services
…GBK safety checks by default
… content blockers
[BEAM-12507][BEAM-12508][release-2.31.0] Fix release content blockers
camel-case to be used with ProtoMessageSchema
retest this please |
@@ -45,8 +45,8 @@ processResources { | |||
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [ | |||
'dataflow.legacy_environment_major_version' : '8', | |||
'dataflow.fnapi_environment_major_version' : '8', | |||
'dataflow.legacy_container_version' : 'beam-master-20210525', | |||
'dataflow.fnapi_container_version' : 'beam-master-20210524', |
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 looks like maybe you picked up this change from the relase branch?
} | ||
return jobService; | ||
} | ||
|
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.
Also this
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 made this change against the v2.31.0 tag, then had to merge-in HEAD for Github to allow PR creation. Only once I'd pushed the button did I realise I'd captured irrelevant commits.
Really, really, sorry. What do you recommend?
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.
Files reverted.
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.
Looks good overall, I have a few suggestions though
final String camel = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name); | ||
return DEFAULT_PROTO_GETTER_PREFIX | ||
+ camel | ||
+ PROTO_GETTER_SUFFIX.getOrDefault(fieldType.getTypeName(), ""); | ||
} | ||
|
||
static String protoSetterName(String name, FieldType fieldType) { | ||
static String protoSetterNameFromSnake(String name, FieldType fieldType) { |
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.
What do you think about adding a CaseFormat
parameter to protoSetterName
instead of having a function for each format?
static String protoSetterNameFromSnake(String name, FieldType fieldType) { | |
static String protoSetterName(String name, FieldType fieldType, CaseFormat caseFormat) { |
bool primitiveBoolCamel = 13; | ||
string primitiveStringCamel = 14; | ||
bytes primitiveBytesCamel = 15; | ||
} |
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.
Could you add another test case to make sure we exercise the oneof logic for camel case?
@chrishinds - Could you look at the open comments please? |
Any update on this? Should we close it? |
It would be a shame to close, it's very close. I think the only blocker is the missing test case for oneof/camel-case |
@TheNeuralBit - I am not sure the author is still active. If you have time, feel free to edit the PR. Or merge, and file a follow up jira. |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
ProtoByteBuddyUtils.protoGetterName() previously depended on field names being snake-case. Now it attempts method identification first with snake-case, and then with camel-case.
R: @reuvenlax
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunner
compliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.