Skip to content

Commit

Permalink
fix: 🐛 restore the check on the webhook payload (#591)
Browse files Browse the repository at this point in the history
* fix: 🐛 restore the check on the webhook payload

The upstream issue has been fixed on the Hub. It's important to restore
the test, because it avoids collision between datasets and models
(models don't have a prefix in the webhook v1).

* feat: 🎸 update docker image
  • Loading branch information
severo authored Sep 27, 2022
1 parent 72963ce commit e66d59d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chart/docker-images.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dockerImage": {
"admin": "707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-admin:sha-49a60c5",
"api": "707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-api:sha-8d9e37d",
"api": "707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-api:sha-5d183a4",
"reverseProxy": "docker.io/nginx:1.20",
"worker": {
"splits": "707930574880.dkr.ecr.us-east-1.amazonaws.com/hub-datasets-server-worker:sha-0dff3bf",
Expand Down
8 changes: 3 additions & 5 deletions services/api/src/api/routes/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ def get_dataset_name(id: Optional[str]) -> Optional[str]:
if id is None:
return None
dataset_name = id.removeprefix("datasets/")
# temporarily disabled to fix a bug with the webhook
# (see https://github.com/huggingface/datasets-server/issues/380#issuecomment-1254670923)
# if id == dataset_name:
# logger.info(f"ignored because a full dataset id must starts with 'datasets/': {id}")
# return None
if id == dataset_name:
logger.info(f"ignored because a full dataset id must starts with 'datasets/': {id}")
return None
return dataset_name if is_non_empty_string(dataset_name) else None


Expand Down

0 comments on commit e66d59d

Please sign in to comment.