Skip to content
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

Auto rebase workflow addition #1152

Merged

Conversation

GitGab19
Copy link
Collaborator

Goal

The goal of this PR is to better manage the situation in which every time we merge a PR against main, all the others become outdated, and we need to ask PR authors to rebase them.

  • This creates a bottleneck when we have more PRs ready to be merged all together, but instead we need to wait for authors to rebase and force-push.
  • We could update them by using the "Update branch" button, but that's not ideal since the authors's commits will be committed by the maintainer who updates the PR, leading to track the authors commits as "co-authored" by mainainer as well.
  • We could also update the PRs by merging main into PR's branch, but that's not ideal since we would add a merge commit only for this, which will be tracked in the git history forever.

Solution

This PR adds a new workflow file which is executed every time we push something to main (so after we merge a PR).

  • It looks for all opened PRs which are labeled as ready-to-be-merged, and automatically rebase them, without leading to the "co-authoring" issue described before.
  • If a PR cannot be rebased due to some conflicts, a comment will be generated by the github action bot to tell the author of the PR to manually solve it.
  • If there's no conflict, the PR will be rebased and the relative CI will be automatically triggered again to test the most updated state of the PR

Examples

To better understand what this PR looks like, I recommend to take a look at my fork, specifically at:

  • PR #24 - which is the one correctly rebased
  • PR #18 - which is the one with conflicts, for which a comment has been generated by the github action

@GitGab19
Copy link
Collaborator Author

@plebhash @jbesraa @rrybarczyk this PR is my proposal related to discussion we had during last PR-review-club call.
Let me know what you think about it, and if you think that we should strictly define in the contributing.md document the way to update PRs (always rebasing them), and the meaning behing the ready-to-be-merged label.

Copy link
Contributor

🐰Bencher

ReportFri, August 30, 2024 at 10:13:15 UTC
ProjectStratum v2 (SRI)
Branch1152/merge
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client-submit-serialize✅ (view plot)6,833.70 (-0.09%)7,310.82 (93.47%)
client-submit-serialize-deserialize✅ (view plot)7,791.10 (+0.14%)8,291.78 (93.96%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle✅ (view plot)8,334.10 (-0.28%)8,793.45 (94.78%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle✅ (view plot)932.38 (+3.04%)943.65 (98.81%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize✅ (view plot)718.19 (+2.11%)733.01 (97.98%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize✅ (view plot)252.54 (+1.35%)255.99 (98.65%)
client-sv1-get-authorize/client-sv1-get-authorize✅ (view plot)158.66 (+0.94%)162.29 (97.76%)
client-sv1-get-submit✅ (view plot)6,566.00 (-0.73%)7,069.69 (92.88%)
client-sv1-get-subscribe/client-sv1-get-subscribe✅ (view plot)269.63 (-2.76%)293.05 (92.01%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle✅ (view plot)771.83 (+2.39%)789.89 (97.71%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize✅ (view plot)624.12 (+1.27%)641.68 (97.26%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize✅ (view plot)213.85 (+3.09%)218.92 (97.69%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

🐰Bencher

ReportFri, August 30, 2024 at 10:13:16 UTC
ProjectStratum v2 (SRI)
Branchadd-automatic-rebase-workflow
Testbedsv2

🚨 1 ALERT: Threshold Boundary Limit exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
client_sv2_setup_connection_serialize_deserializeLatency (nanoseconds (ns))🚨 (view plot | view alert)1,168.70 (+18.74%)1,085.76 (107.64%)

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)45.22 (+1.31%)45.56 (99.25%)
client_sv2_handle_message_mining✅ (view plot)80.06 (+8.98%)80.48 (99.48%)
client_sv2_mining_message_submit_standard✅ (view plot)14.66 (+0.04%)14.71 (99.69%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)269.01 (+1.04%)284.40 (94.59%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)593.40 (-0.10%)628.43 (94.43%)
client_sv2_open_channel✅ (view plot)162.25 (-2.09%)171.75 (94.47%)
client_sv2_open_channel_serialize✅ (view plot)278.08 (-1.39%)294.17 (94.53%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)378.59 (+0.09%)428.85 (88.28%)
client_sv2_setup_connection✅ (view plot)161.43 (-1.12%)174.44 (92.54%)
client_sv2_setup_connection_serialize✅ (view plot)433.37 (-8.07%)512.29 (84.59%)
client_sv2_setup_connection_serialize_deserialize🚨 (view plot | view alert)1,168.70 (+18.74%)1,085.76 (107.64%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

🐰Bencher

ReportFri, August 30, 2024 at 10:13:19 UTC
ProjectStratum v2 (SRI)
Branchadd-automatic-rebase-workflow
Testbedsv1

🚨 4 ALERTS: Threshold Boundary Limits exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
serialize_deserialize_authorizeRAM Accesses (accesses)🚨 (view plot | view alert)304.00 (+2.44%)303.54 (100.15%)
serialize_deserialize_handle_subscribeEstimated Cycles (estimated cycles)🚨 (view plot | view alert)28,070.00 (+1.79%)28,053.80 (100.06%)
serialize_deserialize_handle_subscribeRAM Accesses (accesses)🚨 (view plot | view alert)402.00 (+3.32%)401.32 (100.17%)
serialize_deserialize_subscribeRAM Accesses (accesses)🚨 (view plot | view alert)334.00 (+3.73%)333.71 (100.09%)

Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
get_authorize✅ (view plot)8,470.00 (+0.39%)8,699.92 (97.36%)✅ (view plot)3,746.00 (+0.02%)3,849.55 (97.31%)✅ (view plot)5,250.00 (-0.06%)5,395.39 (97.31%)✅ (view plot)7.00 (-6.10%)10.30 (67.97%)✅ (view plot)91.00 (+1.20%)93.62 (97.21%)
get_submit✅ (view plot)95,413.00 (-0.12%)96,067.09 (99.32%)✅ (view plot)59,439.00 (-0.05%)59,725.54 (99.52%)✅ (view plot)85,368.00 (-0.05%)85,769.08 (99.53%)✅ (view plot)42.00 (-17.65%)64.87 (64.75%)✅ (view plot)281.00 (-0.23%)287.93 (97.59%)
get_subscribe✅ (view plot)8,093.00 (+1.21%)8,269.44 (97.87%)✅ (view plot)2,841.00 (+0.27%)2,933.67 (96.84%)✅ (view plot)3,968.00 (+0.20%)4,093.79 (96.93%)✅ (view plot)13.00 (-8.77%)20.62 (63.06%)✅ (view plot)116.00 (+2.40%)117.66 (98.59%)
serialize_authorize✅ (view plot)12,317.00 (+0.65%)12,527.09 (98.32%)✅ (view plot)5,317.00 (+0.01%)5,420.55 (98.09%)✅ (view plot)7,412.00 (-0.04%)7,557.71 (98.07%)✅ (view plot)8.00 (-18.61%)13.46 (59.45%)✅ (view plot)139.00 (+1.93%)141.33 (98.35%)
serialize_deserialize_authorize✅ (view plot)24,755.00 (+0.89%)24,830.27 (99.70%)✅ (view plot)9,868.00 (-0.33%)10,020.18 (98.48%)✅ (view plot)13,925.00 (-0.33%)14,145.89 (98.44%)✅ (view plot)38.00 (+5.89%)41.90 (90.68%)🚨 (view plot | view alert)304.00 (+2.44%)303.54 (100.15%)
serialize_deserialize_handle_authorize✅ (view plot)30,422.00 (+0.74%)30,474.58 (99.83%)✅ (view plot)12,071.00 (-0.19%)12,200.92 (98.94%)✅ (view plot)17,087.00 (-0.19%)17,268.35 (98.95%)✅ (view plot)63.00 (+8.81%)64.23 (98.08%)✅ (view plot)372.00 (+1.79%)372.26 (99.93%)
serialize_deserialize_handle_submit✅ (view plot)126,518.00 (+0.06%)127,006.95 (99.62%)✅ (view plot)73,280.00 (+0.02%)73,569.37 (99.61%)✅ (view plot)105,053.00 (+0.03%)105,453.99 (99.62%)✅ (view plot)107.00 (-6.41%)133.81 (79.96%)✅ (view plot)598.00 (+0.35%)601.85 (99.36%)
serialize_deserialize_handle_subscribe🚨 (view plot | view alert)28,070.00 (+1.79%)28,053.80 (100.06%)✅ (view plot)9,659.00 (+0.21%)9,741.10 (99.16%)✅ (view plot)13,655.00 (+0.16%)13,774.18 (99.13%)✅ (view plot)69.00 (+6.08%)72.66 (94.96%)🚨 (view plot | view alert)402.00 (+3.32%)401.32 (100.17%)
serialize_deserialize_submit✅ (view plot)115,181.00 (+0.04%)115,661.42 (99.58%)✅ (view plot)68,057.00 (-0.03%)68,362.75 (99.55%)✅ (view plot)97,656.00 (-0.03%)98,106.78 (99.54%)✅ (view plot)61.00 (-7.53%)77.19 (79.03%)✅ (view plot)492.00 (+0.54%)495.32 (99.33%)
serialize_deserialize_subscribe✅ (view plot)23,447.00 (+1.93%)23,477.39 (99.87%)✅ (view plot)8,211.00 (+0.22%)8,296.47 (98.97%)✅ (view plot)11,562.00 (+0.19%)11,682.04 (98.97%)✅ (view plot)39.00 (+1.42%)43.46 (89.73%)🚨 (view plot | view alert)334.00 (+3.73%)333.71 (100.09%)
serialize_submit✅ (view plot)99,882.00 (-0.02%)100,421.53 (99.46%)✅ (view plot)61,483.00 (-0.05%)61,773.50 (99.53%)✅ (view plot)88,207.00 (-0.06%)88,620.38 (99.53%)✅ (view plot)46.00 (-11.21%)64.37 (71.46%)✅ (view plot)327.00 (+0.51%)331.20 (98.73%)
serialize_subscribe✅ (view plot)11,494.00 (+1.08%)11,661.97 (98.56%)✅ (view plot)4,188.00 (+0.18%)4,280.67 (97.84%)✅ (view plot)5,824.00 (+0.12%)5,951.03 (97.87%)✅ (view plot)14.00 (-5.81%)19.77 (70.83%)✅ (view plot)160.00 (+2.19%)162.18 (98.66%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

🐰Bencher

ReportFri, August 30, 2024 at 10:13:19 UTC
ProjectStratum v2 (SRI)
Branchadd-automatic-rebase-workflow
Testbedsv2

🚨 1 ALERT: Threshold Boundary Limit exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
client_sv2_mining_message_submit_standardL2 Accesses (accesses)🚨 (view plot | view alert)23.00 (+32.18%)22.99 (100.04%)

Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
client_sv2_handle_message_common✅ (view plot)2,065.00 (+0.02%)2,146.75 (96.19%)✅ (view plot)473.00 (+0.40%)484.32 (97.66%)✅ (view plot)735.00 (+0.33%)752.22 (97.71%)✅ (view plot)7.00 (+6.25%)12.28 (57.01%)✅ (view plot)37.00 (-0.32%)39.37 (93.99%)
client_sv2_handle_message_mining✅ (view plot)8,200.00 (-0.06%)8,320.62 (98.55%)✅ (view plot)2,137.00 (+0.25%)2,168.72 (98.54%)✅ (view plot)3,160.00 (+0.27%)3,211.11 (98.41%)✅ (view plot)35.00 (-5.97%)43.13 (81.16%)✅ (view plot)139.00 (-0.04%)141.67 (98.12%)
client_sv2_mining_message_submit_standard✅ (view plot)6,267.00 (-0.22%)6,381.42 (98.21%)✅ (view plot)1,750.00 (-0.01%)1,762.75 (99.28%)✅ (view plot)2,547.00 (-0.26%)2,573.45 (98.97%)🚨 (view plot | view alert)23.00 (+32.18%)22.99 (100.04%)✅ (view plot)103.00 (-0.97%)106.77 (96.47%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14,720.00 (-0.36%)14,990.45 (98.20%)✅ (view plot)4,694.00 (-0.00%)4,706.75 (99.73%)✅ (view plot)6,755.00 (-0.01%)6,774.32 (99.71%)✅ (view plot)46.00 (+0.70%)52.45 (87.70%)✅ (view plot)221.00 (-0.69%)228.74 (96.62%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27,506.00 (+0.01%)27,808.60 (98.91%)✅ (view plot)10,585.00 (+0.26%)10,604.57 (99.82%)✅ (view plot)15,401.00 (+0.25%)15,429.89 (99.81%)✅ (view plot)83.00 (+0.71%)88.48 (93.81%)✅ (view plot)334.00 (-0.34%)343.66 (97.19%)
client_sv2_open_channel✅ (view plot)4,345.00 (-2.32%)4,615.91 (94.13%)✅ (view plot)1,461.00 (+0.06%)1,472.16 (99.24%)✅ (view plot)2,160.00 (+0.26%)2,172.67 (99.42%)✅ (view plot)10.00 (-10.05%)15.86 (63.06%)✅ (view plot)61.00 (-4.62%)68.50 (89.05%)
client_sv2_open_channel_serialize✅ (view plot)14,012.00 (-1.07%)14,425.09 (97.14%)✅ (view plot)5,064.00 (+0.02%)5,075.16 (99.78%)✅ (view plot)7,327.00 (+0.09%)7,340.23 (99.82%)✅ (view plot)35.00 (-2.20%)41.38 (84.59%)✅ (view plot)186.00 (-2.30%)197.74 (94.06%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22,639.00 (-0.03%)22,954.66 (98.62%)✅ (view plot)8,027.00 (+0.36%)8,043.57 (99.79%)✅ (view plot)11,674.00 (+0.33%)11,700.83 (99.77%)✅ (view plot)79.00 (+7.03%)82.35 (95.94%)✅ (view plot)302.00 (-0.67%)312.68 (96.58%)
client_sv2_setup_connection✅ (view plot)4,647.00 (-0.92%)4,756.60 (97.70%)✅ (view plot)1,502.00 (+0.06%)1,513.16 (99.26%)✅ (view plot)2,277.00 (+0.03%)2,295.63 (99.19%)✅ (view plot)12.00 (+26.24%)14.45 (83.05%)✅ (view plot)66.00 (-2.38%)69.53 (94.92%)
client_sv2_setup_connection_serialize✅ (view plot)16,110.00 (-0.73%)16,448.90 (97.94%)✅ (view plot)5,963.00 (+0.02%)5,974.16 (99.81%)✅ (view plot)8,665.00 (+0.09%)8,678.06 (99.85%)✅ (view plot)40.00 (-7.26%)51.48 (77.69%)✅ (view plot)207.00 (-1.51%)216.16 (95.76%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35,552.00 (+0.03%)35,716.70 (99.54%)✅ (view plot)14,855.00 (+0.20%)14,871.86 (99.89%)✅ (view plot)21,822.00 (+0.21%)21,851.39 (99.87%)✅ (view plot)93.00 (-3.37%)111.43 (83.46%)✅ (view plot)379.00 (-0.15%)383.64 (98.79%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@plebhash plebhash requested a review from jbesraa August 30, 2024 12:46
@jbesraa
Copy link
Contributor

jbesraa commented Aug 30, 2024

This looks good
@GitGab19 do you have an example PR where this workflow ran on so we can see how the commits look like after the bot rebase?

@plebhash
Copy link
Collaborator

This looks good @GitGab19 do you have an example PR where this workflow ran on so we can see how the commits look like after the bot rebase?

aside from the PRs listed on the description, there's also this one: GitGab19#23

@plebhash plebhash merged commit fd71db1 into stratum-mining:main Aug 30, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants