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

Remove project from DeleteSource table in shredder_targets #6573

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BenWu
Copy link
Contributor

@BenWu BenWu commented Nov 27, 2024

Description

Fix for #6541

project shouldn't be in the DeleteSource because it doesn't match what's in the shredder config.py and also breaks the table and dataset properties of the object. I also added a check to the constructor to validate the table value

Reviewer, please follow this checklist

┆Issue is synchronized with this Jira Task

@dataops-ci-bot
Copy link

Integration report for "fix"

sql.diff

Click to expand!
diff -bur --no-dereference --new-file /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/monitoring_derived/shredder_targets_v1/query.py /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/monitoring_derived/shredder_targets_v1/query.py
--- /tmp/workspace/main-generated-sql/sql/moz-fx-data-shared-prod/monitoring_derived/shredder_targets_v1/query.py	2024-11-27 19:00:06.000000000 +0000
+++ /tmp/workspace/generated-sql/sql/moz-fx-data-shared-prod/monitoring_derived/shredder_targets_v1/query.py	2024-11-27 19:00:04.000000000 +0000
@@ -185,13 +185,13 @@
                     stable_table_ref.dataset_id[: -len("_stable")]
                     in glean_channel_names
                 ):
-                    deletion_request_table = (
-                        f"{stable_table_ref.project}.{stable_table_ref.dataset_id}.deletion_request_v1"
-                    )
-                    if table_exists(client, deletion_request_table):
+                    if table_exists(
+                        client,
+                        f"{stable_table_ref.project}.{stable_table_ref.dataset_id}.deletion_request_v1",
+                    ):
                         table_to_deletions[stable_table] = {
                             DeleteSource(
-                                table=deletion_request_table,
+                                table=f"{stable_table_ref.dataset_id}.deletion_request_v1",
                                 field=GLEAN_CLIENT_ID,
                                 project=SHARED_PROD,
                             )

Link to full diff

@BenWu BenWu requested a review from akkomar November 27, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants