devtools: improve DPDK review process
RFC 1/1 devtools: improve DPDK review process
A common problem on the DPDK mailing list is lack of reviewers for patches. This script is intended to help with that problem, by picking a random commit author from our git history, and adding a Reviewed-by:
tag. This can be added to e.g. commit-msg git hook, like so:
# add reviewer to commit message
$(git rev-parse --show-toplevel)/devtools/get-reviewer.sh >> $1Now all DPDK code will definitely be well reviewed!
Rеviеwеd-by: Thоmas Mоnjаlоn <[email protected]>
--- devtools/get-reviewer.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 devtools/get-reviewer.sh
devtools/get-reviewer.sh new file +4 -0
@@ -0,0 +1,4 @@ +#!/bin/sh + +# find a reviewer for the code +git log --format="Reviewed-by: %an <%ae>" | sort -u | shuf -n 1
Signature · 1 line
2.25.1
Quoted 31 lines · Anatoly Burakov
A common problem on the DPDK mailing list is lack of reviewers for patches. This script is intended to help with that problem, by picking a random commit author from our git history, and adding a Reviewed-by:
tag. This can be added to e.g. commit-msg git hook, like so:# add reviewer to commit message $(git rev-parse --show-toplevel)/devtools/get-reviewer.sh >> $1Now all DPDK code will definitely be well reviewed!
Signed-off-by Anatoly Burakov <[email protected]>Rеviеwеd-by: Thоmas Mоnjаlоn <[email protected]>
--- devtools/get-reviewer.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 devtools/get-reviewer.shdevtools/get-reviewer.sh new file +4
-0@@ -0,0 +1,4 @@ +#!/bin/sh + +# find a reviewer for the code +git log --format="Reviewed-by: %an <%ae>" | sort -u | shuf -n 1Signature · 1 line
2.25.1
I think this is great.
However if you accelerate only one end of the pipe, you won't gain much.
Humans are still required to write patches, this is inefficient. Here is a suggestion:
devtools/infinite-monkey.sh new file +13 -0
@@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +command -v csmith > /dev/null || { + echo 'Require csmith: https://github.com/csmith-project/csmith' + exit 1 +} + +until ninja -C build; do csmith > $(find . -name '*.c' |shuf -n 1); done + +git add -F . +git commit -sm "$(dirname file): $(($(date +%s%N)/1000000))" \ + -sm '' -sm "$(./devtools/get-reviewer.sh)" +git send-email -1 --thread --to [email protected]
With proper perf testing at the other end, DPDK should be able to finally become web-scale.
Signature · 1 line
Gaetan Rivet
Quoted 59 lines · Gaëtan Rivet
Quoted 31 lines · Anatoly Burakov
A common problem on the DPDK mailing list is lack of reviewers for patches. This script is intended to help with that problem, by picking a random commit author from our git history, and adding a Reviewed-by:
tag. This can be added to e.g. commit-msg git hook, like so:# add reviewer to commit message $(git rev-parse --show-toplevel)/devtools/get-reviewer.sh >> $1Now all DPDK code will definitely be well reviewed!
Signed-off-by Anatoly Burakov <[email protected]>Rеviеwеd-by: Thоmas Mоnjаlоn <[email protected]>
--- devtools/get-reviewer.sh | 4 ++++ 1 file changed, 4 insertions(+)create mode 100755
devtools/get-reviewer.shdevtools/get-reviewer.sh new file +4
-0@@ -0,0 +1,4 @@ +#!/bin/sh + +# find a reviewer for the code +git log --format="Reviewed-by: %an <%ae>" | sort -u | shuf -n 1Signature · 1 line
2.25.1I think this is great.
However if you accelerate only one end of the pipe, you won't gain much.Humans are still required to write patches, this is inefficient. Here is a suggestion:
devtools/infinite-monkey.sh new file +13
-0@@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +command -v csmith > /dev/null || { + echo 'Require csmith: https://github.com/csmith-project/csmith' + exit 1 +} + +until ninja -C build; do csmith > $(find . -name '*.c' |shuf -n 1); done + +git add -F . +git commit -sm "$(dirname file): $(($(date +%s%N)/1000000))" \ + -sm '' -sm "$(./devtools/get-reviewer.sh)" +git send-email -1 --thread --to [email protected]
Quoted 2 lines
With proper perf testing at the other end, DPDK should be able to finally become web-scale.
Yep, should be doable to achieve line rate for patches to DPDK!
Signature · 2 lines
Thanks, Anatoly
Quoted 6 lines · Anatoly Burakov
A common problem on the DPDK mailing list is lack of reviewers for patches. This script is intended to help with that problem, by picking a random commit author from our git history, and adding a Reviewed-by:
tag. This can be added to e.g. commit-msg git hook, like so:
Quoted 7 lines
# add reviewer to commit message $(git rev-parse --show-toplevel)/devtools/get-reviewer.sh >> $1Now all DPDK code will definitely be well reviewed!
Signed-off-by Anatoly Burakov <[email protected]>Rеviеwеd-by: Thоmas Mоnjаlоn <[email protected]>
Looks like shuf aliased to "git shortlog --numbered --summary | head -n 1"
Quoted 11 lines
--- devtools/get-reviewer.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 devtools/get-reviewer.shdevtools/get-reviewer.sh new file +0
-0
devtools/get-reviewer.sh line 4
Quoted 4 lines
devtools/get-reviewer.sh new file +4
-0@@ -0,0 +1,4 @@ +#!/bin/sh + +# find a reviewer for the code +git log --format="Reviewed-by: %an <%ae>" | sort -u | shuf -n 1
Leaving the fun part aside,
Looks like we can really improve the situation by
doing git annotate(to get the original author) of couple lines below and above current patch
that changes lines.
Thoughts?
Quoted 3 lines
--
2.25.1
Quoted 36 lines · Jerin Jacob
Quoted 6 lines · Anatoly Burakov
A common problem on the DPDK mailing list is lack of reviewers for patches. This script is intended to help with that problem, by picking a random commit author from our git history, and adding a Reviewed-by:
tag. This can be added to e.g. commit-msg git hook, like so:Quoted 7 lines
# add reviewer to commit message $(git rev-parse --show-toplevel)/devtools/get-reviewer.sh >> $1Now all DPDK code will definitely be well reviewed!
Signed-off-by Anatoly Burakov <[email protected]>Rеviеwеd-by: Thоmas Mоnjаlоn <[email protected]>
Looks like shuf aliased to "git shortlog --numbered --summary | head -n 1"
Quoted 11 lines
--- devtools/get-reviewer.sh | 4 ++++ 1 file changed, 4 insertions(+)create mode 100755
devtools/get-reviewer.shdevtools/get-reviewer.sh new file +0
-0devtools/get-reviewer.sh line 4
Quoted 4 lines
devtools/get-reviewer.sh new file +4
-0@@ -0,0 +1,4 @@ +#!/bin/sh + +# find a reviewer for the code +git log --format="Reviewed-by: %an <%ae>" | sort -u | shuf -n 1Leaving the fun part aside,
Quoted 11 lines
Looks like we can really improve the situation by
doing git annotate(to get the original author) of couple lines below and above current patch
that changes lines.Thoughts?
Quoted 3 lines
--
2.25.1
Original author or the person unlucky enough to have been the latest one to modify the lines in question? :)
It could be useful, but IMO it'll also result in a lot of noise. People already seem to be very generous with CC's so i don't think *letting people know* is the issue; finding time to review is.
Signature · 2 lines
Thanks, Anatoly