Skip to content

Instantly share code, notes, and snippets.

View nodirt's full-sized avatar

Nodir Turakulov nodirt

View GitHub Profile
@nodirt
nodirt / prpc.md
Last active September 9, 2020 14:00

pRPC: gRPC on Classic AppEngine today

gRPC is great, but is not available on Classic AppEngine at this time, so while working on the [nextgen CI for Chromium][luci] we wrote pRPC (provisional RPC) for Go that is compatible with gRPC server/client code, but works on HTTP 1.x and Classic AppEngine. In addition it has gRPC-compatible discovery and a CLI tool.

IDL

import java.util.*;
public class BellmanFord
{
public static long dist[];
public static long prev[];
public static LinkedList<DirectedEdge> edgesList = new LinkedList<DirectedEdge>();
public static class DirectedEdge{
protected int v;
protected int w; // edge
@nodirt
nodirt / gist:1469584
Created December 12, 2011 23:12
Find lost, unreachable commits
# retrieves commit relative date and message
humanify() {
while read hash; do
# echo to trim the new line
echo $( git log -n 1 ..$hash --format='%ci : %h : %s%n%b' )
done
}
# show the commits!
git fsck --unreachable | grep -oP '(?<=commit )\w+' | humanify | sort
id: 8919157845550588816
builder {
project: "chrome"
bucket: "try"
builder: "Linux Builder Perf"
}
number: 480
created_by: "user:martiniss@google.com"
create_time {
seconds: 1552425260
{
"name": "bb-${build_id}-${project}-${builder}",
"priority": "30",
"tags": [
"log_location:logdog://logs.chromium.org/${project}/buildbucket/${hostname}/${build_id}/+/annotations",
"luci_project:${project}"
],
"pool_task_template": "SKIP",
"task_slices": [
{
initResin gr-app.js:859:403
Unexpected plugin analytics installed from preloaded:analytics. gr-app.js:1656:42
Unexpected plugin buildbucket installed from preloaded:buildbucket. gr-app.js:1656:42
Unexpected plugin chromium-behavior installed from preloaded:chromium-behavior. gr-app.js:1656:42
Unexpected plugin chromium-coverage installed from preloaded:chromium-coverage. gr-app.js:1656:42
Unexpected plugin chromium-style installed from preloaded:chromium-style. gr-app.js:1656:42
Unexpected plugin chumpdetector installed from preloaded:chumpdetector. gr-app.js:1656:42
Unexpected plugin clearcut installed from preloaded:clearcut. gr-app.js:1656:42
Unexpected plugin codemirror_editor installed from preloaded:codemirror_editor. gr-app.js:1656:42
Unexpected plugin commitqueue installed from preloaded:commitqueue. gr-app.js:1656:42
<gr-overlay id="tryJobsPicker" with-backdrop="" no-cancel-on-outside-click="" class="style-scope cr-buildbucket-view x-scope gr-overlay-0" tabindex="-1" style="outline: none; position: fixed; top: 0px; left: 577.867px; box-sizing: border-box; max-height: 308px; max-width: 1618px; z-index: 103;">
<cr-tryjob-picker autofocus="" tabindex="-1" class="style-scope cr-buildbucket-view">
<header class="style-scope cr-tryjob-picker">
<h3 class="style-scope cr-tryjob-picker">Choose tryjobs</h3>
</header>
<main class="style-scope cr-tryjob-picker">
<input autofocus="" is="iron-input" type="text" placeholder="Regex filter" class="filter style-scope cr-tryjob-picker">
@nodirt
nodirt / gist:e3ecf045a1617692cb5dab1c587eb0df
Created May 30, 2018 17:18
bqschemaupdater rename field
[cr go] proto $ (bqsu-addmissing) bqschemaupdater -message "buildbucket.v2.Build" -table "cr-buildbucket-dev.builds.completed_BETA"
Updating table "cr-buildbucket-dev.builds.completed_BETA"
The following changes to the schema will be made:
================================================================================
--- Current
+++ New
@@ -126,8 +126,7 @@
// Gerrit patchsets to run against.
// Usually present in tryjobs, set by CQ, Gerrit, git-cl-try.
@nodirt
nodirt / diff
Last active February 23, 2018 08:32
[cr go] proto $ (completed_builds) bqschemaupdater -message buildbucket.events.BuildCompleted -table cr-buildbucket-dev.experimental.completed_builds
Updating table "cr-buildbucket-dev.experimental.completed_builds"
The following changes to the schema will be made.
================================================================================
--- Current
+++ New
@@ -76,6 +76,9 @@
repeated STRING tags
INTEGER x
@nodirt
nodirt / schema.txt
Last active February 22, 2018 23:39
// Time of the event creation.
TIMESTAMP create_time
// The state of the build at the completion time.
RECORD build {
INTEGER x
// Buildbucket build id.
INTEGER id