Skip to content

Commit

Permalink
Improve performance of changelogger-validate-all.sh (#38074)
Browse files Browse the repository at this point in the history
`changelogger version` is unnecessarily calling `git` to fetch the
timestamp and PR number for all the changelog entries, when all it's
really using is the significance. Skip that.

Then, while validating each individual project is reasonably fast, when
there's 117 of them it adds up. We can improve things somewhat by
processing projects in parallel, matching the number of processors in
the system.

On my laptop, the first takes the time from ~16.8s to ~10.7s, and the
second (8 cores) takes it to ~2.3s.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/9695953187

Upstream-Ref: Automattic/jetpack@00c1de8
  • Loading branch information
anomiex authored and matticbot committed Jun 27, 2024
1 parent dc3317a commit dda0885
Show file tree
Hide file tree
Showing 26 changed files with 99 additions and 99 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"autoload": {
"classmap": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-admin-ui/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/jetpack-logo": "^2.0.3",
"automattic/wordbless": "dev-master"
},
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-assets/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0 || ^3.0"
},
"suggest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/wordbless": "@dev"
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-backup/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"automattic/jetpack-status": "^3.3.2"
},
"require-dev": {
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/wordbless": "@dev"
},
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-boost-core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/wordbless": "dev-master"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-2.0-or-later",
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"brain/monkey": "^2.6"
},
"autoload-dev": {
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-config/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"php": ">=7.0"
},
"require-dev": {
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/jetpack-connection": "@dev",
"automattic/jetpack-import": "@dev",
"automattic/jetpack-jitm": "@dev",
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-connection/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"automattic/wordbless": "@dev",
"yoast/phpunit-polyfills": "1.1.0",
"brain/monkey": "2.6.1",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-constants/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-ip/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-jitm/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-licensing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"require-dev": {
"automattic/wordbless": "@dev",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-logo/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-my-jetpack/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/wordbless": "@dev"
},
"suggest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"php": ">=7.0"
},
"require-dev": {
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/wordbless": "@dev",
"yoast/phpunit-polyfills": "1.1.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-redirect/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-roles/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4"
"automattic/jetpack-changelogger": "^4.2.5-alpha"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-status/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"require-dev": {
"brain/monkey": "2.6.1",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/jetpack-connection": "@dev",
"automattic/jetpack-plans": "@dev",
"automattic/jetpack-ip": "^0.2.2"
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-sync/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"automattic/jetpack-status": "^3.3.2"
},
"require-dev": {
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-search": "@dev",
"automattic/jetpack-waf": "^0.16.10",
Expand Down
2 changes: 1 addition & 1 deletion vendor/automattic/jetpack-plans/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.2.4",
"automattic/jetpack-changelogger": "^4.2.5-alpha",
"automattic/jetpack-status": "^3.3.2",
"automattic/wordbless": "@dev"
},
Expand Down
Loading

0 comments on commit dda0885

Please sign in to comment.