Merge lp://qastaging/~xavi-garcia-mena/go-unityscopes/go-subsearch into lp://qastaging/go-unityscopes/v2

Proposed by Xavi Garcia
Status: Needs review
Proposed branch: lp://qastaging/~xavi-garcia-mena/go-unityscopes/go-subsearch
Merge into: lp://qastaging/go-unityscopes/v2
Prerequisite: lp://qastaging/~xavi-garcia-mena/go-unityscopes/find-list-child-scopes
Diff against target: 1200 lines (+922/-32)
16 files modified
metadata_test.go (+2/-2)
reply.cpp (+46/-0)
reply.go (+51/-4)
result.cpp (+9/-0)
result.go (+12/-0)
scope.cpp (+6/-1)
shim.h (+3/-0)
tests/aggregated/aggregated.go (+141/-0)
tests/aggregated/aggregated.ini.in (+16/-0)
tests/aggregated/aggregated_test.py (+269/-0)
tests/aggregated/simple-scope-2.ini.in (+16/-0)
tests/aggregated/simple-scope.ini.in (+16/-0)
tests/goscope/goscope.go (+2/-22)
tests/simple-scope-2/simple-scope-2.go (+157/-0)
tests/simple-scope/simple-scope.go (+157/-0)
unityscope.go (+19/-3)
To merge this branch: bzr merge lp://qastaging/~xavi-garcia-mena/go-unityscopes/go-subsearch
Reviewer Review Type Date Requested Status
Kyle Fazzari (community) Approve
James Henstridge Needs Fixing
Review via email: mp+260066@code.qastaging.launchpad.net

Commit message

This branch adds full functionality to implement aggregated scopes in go.
It implements the subsearch method from SearchQueryBase.

The branch also includes scope-harness to verify aggregated scopes.

Description of the change

This branch adds full functionality to implement aggregated scopes in go.
It implements the subsearch method from SearchQueryBase.

The branch also includes scope-harness to verify aggregated scopes.

To post a comment you must log in.
76. By Xavi Garcia

Fixed typo and removed commented include

77. By Xavi Garcia

Removed some comments

78. By Xavi Garcia

Hide wait mechanism for child scopes to the developer. Now Aggregated scopes wait by default transparently

79. By Xavi Garcia

Removed binary

Revision history for this message
James Henstridge (jamesh) wrote :

I've left some inline comments. The main conceptual problem I see is tying the Subsearch API to the ScopeBase class, with other issues stemming from that (e.g. the WaitGroup on ScopeBase).

review: Needs Fixing
80. By Xavi Garcia

Moved Subsearch to SearchReply. Passed go fmt to the test files. NOTE: This branch is still work in progress, it's not fully functional

81. By Xavi Garcia

Moved subsearch method to SeachReply. Working version

82. By Xavi Garcia

Removed SetSearchReply and GetSearchReply from the subsearch listener, as they are no longer needed

83. By Xavi Garcia

Added Finished method to SearchListener. Some functions moved from goscope.go to reply.go.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

A few little things, comments inline.

review: Needs Fixing
84. By Xavi Garcia

added suggested changes

Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

Thanks for the review Kyle!

There is no reason to not use const & in the parameters, so I've add it :).

Regarding making the members private I didn't add it because that's a class in a cpp file that cannot be accessed from anywhere but that file.

I've added the private as it doesn't harm ;).

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Looks good to me!

Hmm, that class being inaccessible to others must be an artifact of cgo, then? Since it's not wrapped in an anonymous namespace? Regardless, encapsulation is still a best-practice, even if you're the only one using it :) . Worst case, it doesn't hurt; best case, it catches a mistake later.

review: Approve

Unmerged revisions

84. By Xavi Garcia

added suggested changes

83. By Xavi Garcia

Added Finished method to SearchListener. Some functions moved from goscope.go to reply.go.

82. By Xavi Garcia

Removed SetSearchReply and GetSearchReply from the subsearch listener, as they are no longer needed

81. By Xavi Garcia

Moved subsearch method to SeachReply. Working version

80. By Xavi Garcia

Moved Subsearch to SearchReply. Passed go fmt to the test files. NOTE: This branch is still work in progress, it's not fully functional

79. By Xavi Garcia

Removed binary

78. By Xavi Garcia

Hide wait mechanism for child scopes to the developer. Now Aggregated scopes wait by default transparently

77. By Xavi Garcia

Removed some comments

76. By Xavi Garcia

Fixed typo and removed commented include

75. By Xavi Garcia

Added Subsearch method to retrieve results from child scopes. Added scope-harness tests for aggregated scopes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: