rusackas opened a new pull request, #41966:
URL: https://github.com/apache/superset/pull/41966

   ### SUMMARY
   
   Test-only PR that reproduces 
[#29857](https://github.com/apache/superset/issues/29857) — "Duplicated entries 
in Alerts & Reports execution log".
   
   A single report execution transitions through the `WORKING` state and then a 
terminal `SUCCESS`/`ERROR` state. Each transition calls `create_log`, which 
inserts a `ReportExecutionLog` row, and every row shares the same execution 
`uuid`. As a result one execution surfaces as multiple rows in the 
execution-log view — the "trigger" row and the "result" row that maintainers 
confirmed on the issue (and in Preset Cloud).
   
   The new test `test_email_chart_report_schedule_single_log_per_execution` 
runs one email-chart report execution end-to-end and asserts that the single 
execution (identified by its execution `uuid`) yields exactly one 
`ReportExecutionLog` row.
   
   No production code is changed — this PR does **not** fix the bug. It is a 
red regression test that documents and pins the current behavior.
   
   ### How to interpret CI
   
   This test is expected to **FAIL on master** (red). The failure is the point: 
it demonstrates the bug reproduces. Locally the assertion fails because one 
execution writes two rows (`WORKING` + `SUCCESS`) with the same `uuid`:
   
   ```
   assert len(logs) == 1
   E   assert 2 == 1
   ```
   
   When a fix lands (deduplicating the log so one execution = one row, or 
replacing the trigger row with the result row), this test should flip to green 
with no further changes.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   SUPERSET_CONFIG=tests.integration_tests.superset_test_config \
     pytest 
"tests/integration_tests/reports/commands_tests.py::test_email_chart_report_schedule_single_log_per_execution"
 -v
   ```
   
   Observe the `AssertionError` on `assert len(logs) == 1` — this is the 
reproduction of the duplicate-log-entry behavior.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue: Closes #29857
   - [x] Required feature flags: `ALERT_REPORTS`
   - [x] Changes are TEST ONLY (no production code touched)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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