-
Notifications
You must be signed in to change notification settings - Fork 26.3k
build: adding a script to compare commits in master and stable branches #35130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a533b97
to
e46395a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run the script and sanity check the build/ci commits that are in ONLY IN MASTER? It doesn't look right to me.
scripts/compare-master-to-stable.js
Outdated
console.log(` | ||
Comparing branches "${branch}" and master. | ||
|
||
***** Only in MASTER ***** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kara, I updated |
@AndrewKushnir Updating my 9.0.x branch fixed the issue. But it concerns me that it's so easy to get into this state by mistake. Could we throw if we notice the branch is out of date? Or can we update the branch in the script? |
Thanks for the feedback @kara. I've added the logic to fetch upstream and also compare upstream branches, so now the script should compare the latest versions of master and patch branches without additional manual actions. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand your last comment correctly, my local state shouldn't matter now because we should be pulling from upstream branches. But this is what I see under Only in PATCH
***** Only in PATCH (9.0.x) *****
[v9.0.0-rc.2] bc97c25efe build: add ngJitMode to ng_rollup_bundle terser config (#33865)
[v9.0.0-rc.3] f1bf5b26d1 fix(router): make routerLinkActive work with query params which contain arrays (#22666)
[v9.0.0-rc.5] 1183075d16 Revert "fix(common): update closure locales to include directionality data (#34240)"
[v9.0.0-rc.8] a9f13015b2 build: upgrade to io_bazel_rules_sass 1.24.0 (#34589)
[v9.0.0-rc.8] a812880054 build: package-build & release scripts should handle new pkg_npm naming (#34589)
[v9.0.0-rc.8] d35451327e test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34589)
[v9.0.0-rc.8] e175878480 test: keep diff in integration/bazel minimal by not introducing additional_root_paths (#34589)
[v9.0.0-rc.8] f7dc3a7b64 build: renamed "injected_scripts" target to "asset_injected_index_html" (#34589)
[v9.0.0-rc.8] 68e6db5d7a build: add a before-all-other bootstrap script that patches require (#34589)
[v9.0.0-rc.8] d83071c3b1 build: should use $(execpath) in npm_package_bin args (#34589)
[v9.0.0-rc.8] 3e72381bb0 build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34589)
[v9.0.0-rc.8] c4e9cef314 build: add better comments to defaults.bzl jasmine_node_test macro (#34589)
[v9.0.0-rc.8] 613367508f test: add coverage to //tools/ts-api-guardian/... on WindowsCI (#34589)
[v9.0.0-rc.10] 20dc436585 fix(language-service): rename getDiagnostics to getSemanticDiagnostics (#34909)
[v9.0.0-rc.11] 8b858fb30a Revert "ci: filter out bad commit from the commit message check to green up master (#35017)" (#35024)
[v9.0.1] ce85cbf2d3 Revert "feat(ngcc): pause async ngcc processing if another process has the lockfile (#35131)"
Some of these commits (e.g. a9f1301) are also on the master branch, so they shouldn't be here.
@kara, yes local state should not matter. I see the same diff in the output:
These 10 commits that are showing as delta in patch branch are likely artifacts of merging and rolling back PR #34589:
The compare script is now relies on git to generate deltas with minimum post-processing, i.e. the same 10 commits are present when I execute underlying git command:
I'll look into this more and keep you updated. Thank you. |
@josephperrott, thanks for the review! I've applied the necessary changes based on your feedback. Could you please take another look when you get a chance? Thank you. |
Adding a script that compares commits in master and patch branches and finds a delta between them. This is useful for release reviews, to make sure all the necessary commits are included into the patch branch and there is no discrepancy.
2d71ffb
to
45b0ae2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, in terms of code, Kara will have to give final confirmation that its the correct output we are looking for.
@kara we discussed this Joey: the delta that was showing up in the list was related to the #34589 that was rolled back and then the changes were merged again. As a result, for some reasons git was unable to cleanly calculate the delta while using the
Which looks correct to me. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm otherwise. thanks!
Thanks for the review @IgorMinar, I've addressed your comments. |
@kara please take a look or remove yourself from the reviewer list if you are happy with our reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adding a script that compares commits in master and patch branches and finds a delta between them. This is useful for release reviews, to make sure all the necessary commits are included into the patch branch and there is no discrepancy.
This script was inspired by the compare-master-to-stable.js one that was used in AngularJS.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?