From 1f8262624e21846c6b059d612688e2d5a9ae77a8 Mon Sep 17 00:00:00 2001 From: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com> Date: Sun, 8 Dec 2024 01:06:21 +0100 Subject: [PATCH] fix webhook on parquet conversion (#3114) --- services/webhook/src/webhook/routes/webhook.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/webhook/src/webhook/routes/webhook.py b/services/webhook/src/webhook/routes/webhook.py index a3591def4..fc88b88f1 100644 --- a/services/webhook/src/webhook/routes/webhook.py +++ b/services/webhook/src/webhook/routes/webhook.py @@ -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(