codeant-ai-for-open-source[bot] commented on code in PR #42494:
URL: https://github.com/apache/superset/pull/42494#discussion_r3670126377


##########
superset/migrations/versions/2026-07-28_10-00_2d6ad72e4af6_add_include_cta_to_report_schedule.py:
##########
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""add include_cta to report_schedule
+
+Adds a nullable ``include_cta`` column to the ``report_schedule`` table. It 
controls
+whether the call-to-action link back to Superset (e.g. "Explore in Superset") 
is
+included in the notifications delivered for that schedule. The column defaults 
to
+true and NULL is treated as true, so existing schedules keep the link.
+
+Revision ID: 2d6ad72e4af6
+Revises: e5f6a7b8c9d0
+Create Date: 2026-07-28 10:00:00.000000
+
+"""
+
+import sqlalchemy as sa
+
+from superset.migrations.shared.utils import add_columns, drop_columns
+
+# revision identifiers, used by Alembic.
+revision = "2d6ad72e4af6"
+down_revision = "e5f6a7b8c9d0"

Review Comment:
   **Suggestion:** The new revision branches directly from `e5f6a7b8c9d0`, but 
the repository already has `d3b9a1f6c204` on that same parent. Without a merge 
revision, Alembic will expose two heads, causing migration-head validation and 
deployments that expect a single head to fail. Chain this migration from the 
current head or add a merge migration. [logic error]
   
   <details>
   <summary><b>Severity Level:</b> Critical 🚨</summary>
   
   ```mdx
   - ❌ Alembic reports multiple heads during migration validation.
   - ❌ Single-head deployment upgrades cannot resolve the revision target.
   - ⚠️ Database rollout requires manual multi-head or merge handling.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Load the Alembic revision graph containing
   
`superset/migrations/versions/2026-07-07_12-00_e5f6a7b8c9d0_add_extension_storage_table.py:26`,
   which defines `e5f6a7b8c9d0` as the parent revision.
   
   2. The existing migration
   
`superset/migrations/versions/2026-07-27_10-00_d3b9a1f6c204_version_transaction_issued_at_index.py:34-35`
   also declares `d3b9a1f6c204` with `down_revision = "e5f6a7b8c9d0"`.
   
   3. The new migration
   
`superset/migrations/versions/2026-07-28_10-00_2d6ad72e4af6_add_include_cta_to_report_schedule.py:35-36`
   independently declares `2d6ad72e4af6` with the same `down_revision`, so both 
revisions are
   terminal nodes.
   
   4. Run Alembic head validation or execute an upgrade targeting a single 
`head`; Alembic
   exposes `d3b9a1f6c204` and `2d6ad72e4af6` as separate heads, requiring an 
explicit
   multi-head target or a merge revision and breaking deployments that expect 
one current
   head.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=5aa4246327ad499b855fa3e5ecd30ca6&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=5aa4246327ad499b855fa3e5ecd30ca6&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset/migrations/versions/2026-07-28_10-00_2d6ad72e4af6_add_include_cta_to_report_schedule.py
   **Line:** 35:36
   **Comment:**
        *Logic Error: The new revision branches directly from `e5f6a7b8c9d0`, 
but the repository already has `d3b9a1f6c204` on that same parent. Without a 
merge revision, Alembic will expose two heads, causing migration-head 
validation and deployments that expect a single head to fail. Chain this 
migration from the current head or add a merge migration.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42494&comment_hash=374eb15cd4daef9b55152f464e2b0ce641dcbc43a77010450b4c39b40a50d93c&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42494&comment_hash=374eb15cd4daef9b55152f464e2b0ce641dcbc43a77010450b4c39b40a50d93c&reaction=dislike'>👎</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to