[kudu-CR] version util: track extra delimiter too
Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/13911 ) Change subject: version_util: track extra delimiter too .. version_util: track extra delimiter too One of the version_util tests verifies that the current version's canonical representation matches its raw version. The test fails when the delimiter between the maintenance and extra components is a period, because the canonical representation builder (i.e. ToString()) assumes that the delimiter is always a dash. Rather than weaken the invariant enforced by the unit test, let's track the parsed delimiter faithfully. I chose to store it separately from the extra component itself since it didn't logically seem like part of it. Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Reviewed-on: http://gerrit.cloudera.org:8080/13911 Tested-by: Adar Dembo Reviewed-by: Alexey Serbin --- M src/kudu/util/version_util-test.cc M src/kudu/util/version_util.cc M src/kudu/util/version_util.h 3 files changed, 31 insertions(+), 17 deletions(-) Approvals: Adar Dembo: Verified Alexey Serbin: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 3 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong
[kudu-CR] version util: track extra delimiter too
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13911 ) Change subject: version_util: track extra delimiter too .. Patch Set 2: Code-Review+2 (1 comment) http://gerrit.cloudera.org:8080/#/c/13911/2/src/kudu/util/version_util.cc File src/kudu/util/version_util.cc: http://gerrit.cloudera.org:8080/#/c/13911/2/src/kudu/util/version_util.cc@44 PS2, Line 44: this->extra_delimiter == other.extra_delimiter && > I don't view this as a "semantic" version comparison; I view it as a canoni Ah, indeed. It seems we semantically compare versions as tuples, doing something like make_tuple(v.major, v.minor, v.maintenance) >= make_tuple(1, 7, 1); -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 2 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong Gerrit-Comment-Date: Wed, 24 Jul 2019 18:06:06 + Gerrit-HasComments: Yes
[kudu-CR] version util: track extra delimiter too
Adar Dembo has removed Kudu Jenkins from this change. ( http://gerrit.cloudera.org:8080/13911 ) Change subject: version_util: track extra delimiter too .. Removed reviewer Kudu Jenkins with the following votes: * Verified-1 by Kudu Jenkins (120) -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: deleteReviewer Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 2 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong
[kudu-CR] version util: track extra delimiter too
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13911 ) Change subject: version_util: track extra delimiter too .. Patch Set 2: Verified+1 Overriding Jenkins, failures were in NTP. -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 2 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Wed, 24 Jul 2019 17:52:57 + Gerrit-HasComments: No
[kudu-CR] version util: track extra delimiter too
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/13911 ) Change subject: version_util: track extra delimiter too .. Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/13911/2/src/kudu/util/version_util.cc File src/kudu/util/version_util.cc: http://gerrit.cloudera.org:8080/#/c/13911/2/src/kudu/util/version_util.cc@44 PS2, Line 44: this->extra_delimiter == other.extra_delimiter && > Do we really want to include the delimiter into the criteria while performi I don't view this as a "semantic" version comparison; I view it as a canonical version comparison. And since the ToString() changes alter the canonical representation to include the delimiter, equality should too. Put another way, I think equality should behave as if we're comparing raw versions. -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 2 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Wed, 24 Jul 2019 17:50:37 + Gerrit-HasComments: Yes
[kudu-CR] version util: track extra delimiter too
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/13911 ) Change subject: version_util: track extra delimiter too .. Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/13911/2/src/kudu/util/version_util.cc File src/kudu/util/version_util.cc: http://gerrit.cloudera.org:8080/#/c/13911/2/src/kudu/util/version_util.cc@44 PS2, Line 44: this->extra_delimiter == other.extra_delimiter && Do we really want to include the delimiter into the criteria while performing semantic version comparison? I think my question is: why to bother about the representation details why semantically comparing versions? Or this method is not considered to be semantic comparison at all? -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 2 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Wed, 24 Jul 2019 17:32:46 + Gerrit-HasComments: Yes
[kudu-CR] version util: track extra delimiter too
Hello Alexey Serbin, Kudu Jenkins, Andrew Wong, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/13911 to look at the new patch set (#2). Change subject: version_util: track extra delimiter too .. version_util: track extra delimiter too One of the version_util tests verifies that the current version's canonical representation matches its raw version. The test fails when the delimiter between the maintenance and extra components is a period, because the canonical representation builder (i.e. ToString()) assumes that the delimiter is always a dash. Rather than weaken the invariant enforced by the unit test, let's track the parsed delimiter faithfully. I chose to store it separately from the extra component itself since it didn't logically seem like part of it. Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 --- M src/kudu/util/version_util-test.cc M src/kudu/util/version_util.cc M src/kudu/util/version_util.h 3 files changed, 31 insertions(+), 17 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/11/13911/2 -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 2 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] version util: track extra delimiter too
Hello Alexey Serbin, Andrew Wong, I'd like you to do a code review. Please visit http://gerrit.cloudera.org:8080/13911 to review the following change. Change subject: version_util: track extra delimiter too .. version_util: track extra delimiter too One of the version_util tests verifies that the current version's canonical representation matches its raw version. The test fails when the delimiter between the maintenance and extra components is a period, because the canonical representation builder (i.e. ToString()) assumes that the delimiter is always a dash. Rather than weaken the invariant enforced by the unit test, let's track the parsed delimiter faithfully. I chose to store it separately from the extra component itself since it didn't logically seem like part of it. Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 --- M src/kudu/util/version_util-test.cc M src/kudu/util/version_util.cc M src/kudu/util/version_util.h 3 files changed, 30 insertions(+), 17 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/11/13911/1 -- To view, visit http://gerrit.cloudera.org:8080/13911 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I0fe983e55ae9f83d075297016ccc5d50c208c549 Gerrit-Change-Number: 13911 Gerrit-PatchSet: 1 Gerrit-Owner: Adar Dembo Gerrit-Reviewer: Alexey Serbin Gerrit-Reviewer: Andrew Wong