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

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

Merged
merged 2 commits into from
Sep 2, 2020

Conversation

terryyylim
Copy link
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 changed the title Fix invalid characters for project creation Fix invalid characters for project, featureset, entity and features creation Sep 1, 2020
checkValidCharacters(featureSet.getSpec().getProject(), "project");
checkValidCharacters(featureSet.getSpec().getName(), "name");
checkValidCharacters(featureSet.getSpec().getProject(), "project::name");
checkValidCharacters(featureSet.getSpec().getName(), "featureset::name");
Copy link
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
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
Member Author

/retest

@feast-ci-bot
Copy link
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

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
Copy link
Collaborator

pyalex commented Sep 2, 2020

/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