rusackas opened a new pull request, #40105: URL: https://github.com/apache/superset/pull/40105
### SUMMARY The daily scheduled CodeQL scan has been failing on master with: ``` EVENT_TYPE schedule ValueError: Unsupported event type ``` …because `scripts/change_detector.py` only handled `pull_request`, `push`, and `workflow_dispatch` events, and CodeQL's schedule trigger (`cron: "0 4 * * *"`) hits the unhandled `else` branch. Example: https://github.com/apache/superset/actions/runs/25843430105/job/75933296431 This was masked because the same commit also got a push-triggered Analyze run that succeeded, so the failure only shows up on whichever commit is master HEAD when the cron fires. ### What this PR does - Add a `schedule` branch alongside `workflow_dispatch`. Both trigger types aren't tied to a specific diff, so both should treat every group as changed. - Fix a latent bug while here: the `workflow_dispatch` branch printed "assuming all changed" but actually triggered **nothing** — it left `files = []`, and `detect_changes([], ...)` returns `False`, so no group flag was set in the output. Setting `files = None` makes the existing `files is None or detect_changes(...)` short-circuit fire for every group, matching the printed intent. Same fix benefits both event types. - Include the unsupported event name in the `ValueError` message so future surprises are easier to debug. - Mypy plumbing: `files: Optional[List[str]]` and a `None` guard on the `len(files) >= 99` check. ### Verified locally ``` $ python scripts/change_detector.py --event-type schedule --sha <sha> --repo apache/superset SHA: ... EVENT_TYPE schedule schedule run, assuming all changed Triggering group: python Triggering group: frontend Triggering group: docker Triggering group: docs Triggering group: superset-extensions-cli ``` Same output for `--event-type workflow_dispatch`. `pull_request` and `push` paths untouched. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A. ### TESTING INSTRUCTIONS After merge, the next scheduled CodeQL run (cron: 04:00 UTC) should complete cleanly instead of failing with `Unsupported event type`. Or trigger a `workflow_dispatch` run manually on the CodeQL workflow — Analyze should now actually run instead of silently skipping. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
