Repository navigation
fix(change-detector): compare full push range - #44833
Conversation
Code Review Agent Run #87ae78Actionable Suggestions - 0Additional Suggestions - 2
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
The flagged issue is correct. When a new branch is pushed, the GitHub event payload's Here is the corrected implementation for def get_push_before_sha() -> Optional[str]:
event_path = os.getenv("GITHUB_EVENT_PATH")
if not event_path:
return None
with open(event_path, encoding="utf-8") as event_file:
event = json.load(event_file)
before = event.get("before")
if before and before != "0" * 40:
return before
return NoneWould you like me to check the other comments on this PR and implement fixes for them as well? scripts/change_detector.py |
4d653e5 to
5e37b49
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44833 +/- ##
=======================================
Coverage 85.37% 85.37%
=======================================
Files 3098 3098
Lines 213116 213116
Branches 50276 50276
=======================================
+ Hits 181938 181951 +13
+ Misses 27744 27738 -6
+ Partials 3434 3427 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review Agent Run #9758d3Actionable Suggestions - 0Additional Suggestions - 2
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
5e37b49 to
d823fd7
Compare
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review Agent Run #ab981eActionable Suggestions - 0Additional Suggestions - 4
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
A forced push diffs against the merge base and can skip real changes, and a zero before SHA (a new branch's first push) has no base to compare against. Both now mark every group changed, like workflow_dispatch and schedule. The event file is read once through get_push_event, and the multi-commit push test is keyed by URL so it fails if the full push range is not used. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
This PR has been quiet for a while. We'd like to help get it across the finish line, so we'll push updates here. Thanks for the contribution! Following the review discussion, a forced push and a zero Master's two |
rusackas
left a comment
There was a problem hiding this comment.
Thanks @tarunchaudharydev, and @sadpandajoe for getting it over the line. LGTM!
|
Thank you, everyone, for the support and collaboration! I'm really happy to see this contribution merged. It's been a great experience working with the Apache Superset community. I'm looking forward to contributing more, taking on bigger challenges, and becoming a more active part of this amazing community. I hope to continue learning from all of you and making meaningful contributions to Apache Superset. Excited for what's ahead! |
Co-authored-by: github-issue-actions <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
SUMMARY
Fix the change detector for push events containing multiple commits.
Previously, push events were compared only against the parent of the final commit. This could miss files changed in earlier commits within the same push.
This change uses the GitHub push event's
beforeSHA and compares the fullbefore...afterrange.TESTING INSTRUCTIONS
pytest tests/unit_tests/scripts/change_detector_test.pypre-commit run --files scripts/change_detector.py tests/unit_tests/scripts/change_detector_test.pygit diff --checkAll change-detector tests pass.
ADDITIONAL INFORMATION
change_detector.pyscript #44822