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

Add Common module #801

Merged
merged 10 commits into from
Jun 22, 2020
Merged

Conversation

terryyylim
Copy link
Member

@terryyylim terryyylim commented Jun 18, 2020

What this PR does / why we need it:
Since common functionality can be found across existing modules (core, serving, ingestion, SDK), a common module has also been created in this PR, with tests added. The refactoring of parts of the codebase to be aligned with usage of common module will be incrementally done moving forward.

Does this PR introduce a user-facing change?:

NONE

common/.gitignore Outdated Show resolved Hide resolved
import java.util.regex.Pattern;
import java.util.stream.Collectors;

public class StringUtils {
Copy link
Collaborator

@pyalex pyalex Jun 18, 2020

Choose a reason for hiding this comment

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

I would rather have those functions grouped by domain. Also name "StringUtils" doesn't bring clarity here - you can call "utils" almost anything of course :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I was expecting this haha, had a hard time thinking for a name so pushed for a review to have you guys help brainstorm 😂

Copy link
Member Author

Choose a reason for hiding this comment

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

By domain you mean FeatureSet, Store etc?

Copy link
Member

Choose a reason for hiding this comment

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

My trigger words are

  • Info
  • Spec
  • Util
  • Helper
  • Metadata

Sometimes unavoidable, but we should pay attention when/why they are introduced.

Copy link
Collaborator

Choose a reason for hiding this comment

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

By domain you mean FeatureSet, Store etc?

exactly

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated classes based on domain.

* @param exclude flag to determine if subscriptions with exclusion flag should be returned
* @return List of Subscription class objects
*/
public static List<StoreProto.Store.Subscription> getSubscriptionsByStr(
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe better name "parseSubscriptionFrom"? similarly to protobuf api https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Parser

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed function to follow protobuf api convention.

@terryyylim terryyylim changed the title [WIP] Add common module and blacklisting of projects, featuresets [WIP] Add blacklisting to subscriptions Jun 18, 2020
@terryyylim terryyylim changed the title [WIP] Add blacklisting to subscriptions Add blacklisting to subscriptions Jun 19, 2020
@terryyylim terryyylim added the kind/feature New feature or request label Jun 19, 2020
@@ -14,25 +14,28 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package feast.serving.util;
package feast.common.function;
Copy link
Member

@woop woop Jun 19, 2020

Choose a reason for hiding this comment

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

Why do we have to nest this inside of function? I thought we wanted to have the functionality be domain specific. How about models or model?

@terryyylim
Copy link
Member Author

/test test-end-to-end-batch

@terryyylim terryyylim changed the title Add blacklisting to subscriptions Add Common module Jun 22, 2020
@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: terryyylim, woop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@woop
Copy link
Member

woop commented Jun 22, 2020

/lgtm

@feast-ci-bot feast-ci-bot merged commit fc53df1 into feast-dev:master Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants