Title: Push api call to a push source that doesn't exist returns 200 · Issue #3210 · feast-dev/feast · GitHub
Open Graph Title: Push api call to a push source that doesn't exist returns 200 · Issue #3210 · feast-dev/feast
X Title: Push api call to a push source that doesn't exist returns 200 · Issue #3210 · feast-dev/feast
Description: Expected Behavior When we POST to a push source that doesn't exist like so curl -X POST "http://localhost:6566/push" -d '{ "push_source_name": "push_source_name_that_does_not_exist", "df": { "some_entity": [1001], "event_timestamp": ["20...
Open Graph Description: Expected Behavior When we POST to a push source that doesn't exist like so curl -X POST "http://localhost:6566/push" -d '{ "push_source_name": "push_source_name_that_does_not_exist", "df": { "some_...
X Description: Expected Behavior When we POST to a push source that doesn't exist like so curl -X POST "http://localhost:6566/push" -d '{ "push_source_name": "push_source_name_tha...
Opengraph URL: https://github.com/feast-dev/feast/issues/3210
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Push api call to a push source that doesn't exist returns 200","articleBody":"## Expected Behavior \r\nWhen we `POST` to a push source that doesn't exist like so\r\n```\r\ncurl -X POST \"http://localhost:6566/push\" -d '{\r\n \"push_source_name\": \"push_source_name_that_does_not_exist\",\r\n \"df\": {\r\n \"some_entity\": [1001],\r\n \"event_timestamp\": [\"2022-05-13 10:59:42\"],\r\n \"created\": [\"2022-05-13 10:59:42\"],\r\n ...\r\n },\r\n \"to\": \"online_and_offline\",\r\n }' | jq\r\n```\r\nI'd expect an error. It is a valid format to the correct endpoint, but is an entity that doesn't exist. A [422 unprocessable entity](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422) error would probably make sense here.\r\n\r\n## Current Behavior\r\nMethod `FeatureStore().push` receives a [`push_source_name`](https://github.com/feast-dev/feast/blob/7c50ab510633c11646b6ff04853f3f26942ad646/sdk/python/feast/feature_store.py#L1418) indicating which feature views are impacted by the new data being pushed. The set of feature views is filtered down [here](https://github.com/feast-dev/feast/blob/7c50ab510633c11646b6ff04853f3f26942ad646/sdk/python/feast/feature_store.py#L1437-L1445). If a push source name is provided that doesn't actually exist then the resulting set is empty, the loop is skipped and the function is a no-op. This successful return means that the [`/push` call in feature_server.py](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/feature_server.py#L95-L100) never throws to return an error code.\r\n\r\n## Steps to reproduce\r\n* start a local feature server\r\n* make a push call to a push source that does not exist\r\n\r\n### Specifications\r\n\r\n- Version:\r\n- Platform:\r\n- Subsystem:\r\n\r\n## Possible Solution\r\n* Raise a custom exception when no push source is found with the provided name\r\n* Catch that exception in the feature server\r\n* Return 422 in that case\r\n\r\nIf this is considered reasonable, I'm happy to make the contribution myself.","author":{"url":"https://github.com/robhowley","@type":"Person","name":"robhowley"},"datePublished":"2022-09-13T20:20:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3210/feast/issues/3210"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2b69b360-387a-d007-69ef-c26604ce5f08 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7EC:330DBF:21AF6DA:2EAE29C:69728EFB |
| html-safe-nonce | 06f851ab3899c7ba4b55de3485510c040325ff1c268fae4e36912a0abd84a3dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0VDOjMzMERCRjoyMUFGNkRBOjJFQUUyOUM6Njk3MjhFRkIiLCJ2aXNpdG9yX2lkIjoiMjc2OTQzMjI2MzI2NTUyMTQwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 39075465acba7f1e506b6f49aab571a3d287e38a7f41190740e668bc08d58f6d |
| hovercard-subject-tag | issue:1371963723 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/3210/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8ff87414e2a643ba4be9e331bd35f318db5132c7f89f4a3edc96360e4df4e387/feast-dev/feast/issues/3210 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8ff87414e2a643ba4be9e331bd35f318db5132c7f89f4a3edc96360e4df4e387/feast-dev/feast/issues/3210 |
| og:image:alt | Expected Behavior When we POST to a push source that doesn't exist like so curl -X POST "http://localhost:6566/push" -d '{ "push_source_name": "push_source_name_that_does_not_exist", "df": { "some_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | robhowley |
| hostname | github.com |
| expected-hostname | github.com |
| None | f55b89ef71fda443a25c469605964fe31f4313158c4238f900f8894d6f31ffa4 |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 69ed002f93fb5a101bb3ef79e8704a63acc02bd2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width