Skip to content

Fix invalid characters for project, featureset, entity and features creation - #976

Merged
feast-ci-bot merged 2 commits into
feast-dev:masterfrom
terryyylim:improve-validation-check
Sep 2, 2020
Merged

Fix invalid characters for project, featureset, entity and features creation#976
feast-ci-bot merged 2 commits into
feast-dev:masterfrom
terryyylim:improve-validation-check

Conversation

@terryyylim

Copy link
Copy Markdown
Member

What this PR does / why we need it:
Currently - in names is being replaced to _. This is hacky solution that need to be implemented in many places. It also creates potential bug since project-1 and project_1 (feature-set and feature_set) will be using the same bq table.

It's better to validate this (and not allow such characters) on feature set creation. This PR addresses the above issue for project, featureset, features and entities.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Users will no longer be allowed to include dashes in project, featureset, entity and feature name.

@terryyylim
terryyylim requested a review from pyalex September 1, 2020 10:04
@terryyylim
terryyylim requested a review from zhilingc as a code owner September 1, 2020 10:04
@terryyylim terryyylim changed the title Fix invalid characters for project creation Fix invalid characters for project, featureset, entity and features creation Sep 1, 2020
@terryyylim
terryyylim force-pushed the improve-validation-check branch from d4faf1e to 07ffd6b Compare September 1, 2020 10:08
@terryyylim
terryyylim force-pushed the improve-validation-check branch from 07ffd6b to e478d39 Compare September 1, 2020 10:36
checkValidCharacters(featureSet.getSpec().getProject(), "project");
checkValidCharacters(featureSet.getSpec().getName(), "name");
checkValidCharacters(featureSet.getSpec().getProject(), "project::name");
checkValidCharacters(featureSet.getSpec().getName(), "featureset::name");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it make more sense to have a new argument like resource and field instead of ::

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added resource. I think it's clearer to show what they inputted as well, so I replaced field with the actual input itself in the error message.

@terryyylim

Copy link
Copy Markdown
Member Author

/retest

@feast-ci-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details 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

@pyalex

pyalex commented Sep 2, 2020

Copy link
Copy Markdown
Collaborator

/lgtm

@feast-ci-bot
feast-ci-bot merged commit 0b09bd9 into feast-dev:master Sep 2, 2020
@mrzzy mrzzy added the compat/breaking Breaking user-facing change label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants