Skip to content

Commit

Permalink
Merge pull request #926 from DalgoT4D/925-sending-more-schema-change-…
Browse files Browse the repository at this point in the history
…emails-than-there-are-schema-changes

check for transforms in schema changes before sending email
  • Loading branch information
fatchat authored Dec 21, 2024
2 parents be09521 + 27b09a8 commit df2c024
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ddpui/celeryworkers/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def detect_schema_changes_for_org(org: Org):
continue

change_type = connection_catalog.get("schemaChange")
catalog_diff: dict = connection_catalog.get("catalogDiff")

logger.info(
"Found schema changes for connection %s of type %s",
Expand All @@ -451,7 +452,11 @@ def detect_schema_changes_for_org(org: Org):
)

# notify users
if change_type in ["breaking", "non_breaking"]:
if change_type == "breaking" or (
change_type == "non_breaking"
and catalog_diff
and len(catalog_diff.get("transforms", [])) > 0
):
try:
frontend_url = os.getenv("FRONTEND_URL")
if frontend_url.endswith("/"):
Expand Down

0 comments on commit df2c024

Please sign in to comment.