Skip to content

Commit

Permalink
fix webhook on parquet conversion (#3114)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq authored Dec 8, 2024
1 parent da2750d commit 1f82626
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/webhook/src/webhook/routes/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def process_payload(
if event == "remove":
delete_dataset(dataset=dataset, storage_clients=storage_clients)
elif event in ["add", "update", "move"]:
if event == "update" and get_current_revision(dataset) == payload["repo"]["headSha"] and not private:
if (
event == "update"
and get_current_revision(dataset) == payload["repo"]["headSha"]
and (not payload["scope"] == "repo.config" or not private)
):
# ^ it filters out the webhook calls when the refs/convert/parquet branch is updated
# ^ it also filters switching from private to public if the headSha is in the cache (i.e. if the user is PRO/Enterprise)
logging.warning(
Expand Down

0 comments on commit 1f82626

Please sign in to comment.