[{"data":1,"prerenderedAt":330,"buildId":331},["ShallowReactive",2],{"docs:\u002Fguide\u002Fmigrating":3},{"page":4,"section":16,"document":17,"credits":10,"prev":323,"next":327},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"migrating","\u002Fguide\u002Fmigrating","guide\u002Fmigrating.md","Migrating from the bash heavy","What changes for agents, scripts and config when fleetjobs replaces the bash heavy script, and how to compare the two on your own logs.",null,[],"i-lucide-arrow-right-left","article",true,7,"guide",{"nodes":18,"toc":318},[19,44,52,189,199,206,212,218,264,272,278],[20,21,22,23,27,28,31,32,35,36,39,40,43],"p",{},"fleetjobs keeps the command line of the bash ",[24,25,26],"code",{},"heavy",". ",[24,29,30],{},"heavy \u003Ccmd>"," and ",[24,33,34],{},"heavy --light \u003Ccmd>"," work as before, and so do ",[24,37,38],{},"status",", ",[24,41,42],{},"night"," and the variables below. What changes is that jobs queue and no longer give up.",[45,46,51],"h2",{"id":47,"anchor":48},"changes",{"label":49,"icon":50},"Section titled \"Changes\"","#","Changes",[53,54,55,68],"table",{},[56,57,58],"thead",{},[59,60,61,65],"tr",{},[62,63,64],"th",{},"Bash heavy",[62,66,67],{},"fleetjobs",[69,70,71,87,99,110,133,144,159,172],"tbody",{},[59,72,73,81],{},[74,75,76,77,80],"td",{},"Waits ",[24,78,79],{},"HEAVY_WAIT"," seconds for a slot, then exits 75",[74,82,83,84,86],{},"Queues the job with no limit. ",[24,85,79],{}," does nothing",[59,88,89,92],{},[74,90,91],{},"One process per call, killed with its shell",[74,93,94,95,98],{},"A detached job. ",[24,96,97],{},"heavy wait \u003Cid>"," picks it up again",[59,100,101,104],{},[74,102,103],{},"No way to queue and return",[74,105,106,109],{},[24,107,108],{},"heavy submit \u003Ccmd>"," prints a job id",[59,111,112,122],{},[74,113,114,115,118,119],{},"Hosts in ",[24,116,117],{},"~\u002F.config\u002Fheavy\u002Fremotes",", or in ",[24,120,121],{},"HEAVY_REMOTES",[74,123,124,127,128,27,131,86],{},[24,125,126],{},"hosts"," in ",[24,129,130],{},"~\u002F.config\u002Ffleetjobs\u002Fconfig.json",[24,132,121],{},[59,134,135,138],{},[74,136,137],{},"Slot counts fixed in the script",[74,139,140,143],{},[24,141,142],{},"local"," in the config file",[59,145,146,152],{},[74,147,148,149],{},"Logs in ",[24,150,151],{},"~\u002F.cache\u002Fheavy.log",[74,153,154,155,158],{},"One JSON record for each job in ",[24,156,157],{},"log\u002Fjobs.jsonl"," in the store",[59,160,161,164],{},[74,162,163],{},"Every remote failure runs here again",[74,165,166,167],{},"Only suspect ones, by the ",[168,169,171],"a",{"href":170},"\u002Fguide\u002Ftrust","trust table",[59,173,174,183],{},[74,175,176,179,180],{},[24,177,178],{},"HEAVY_DIR"," defaulted to ",[24,181,182],{},"~\u002F.cache",[74,184,185,186],{},"It defaults to ",[24,187,188],{},"~\u002F.local\u002Fstate\u002Ffleetjobs",[20,190,191,192,27,195,198],{},"A full queue no longer gives exit 75. A job exits 75 only when nobody has waited for it for 10 minutes, or 60 if it came from ",[24,193,194],{},"heavy submit",[24,196,197],{},"HEAVY_ABANDON"," changes the 10 minutes.",[20,200,201,202,205],{},"The scope names, ",[24,203,204],{},"HEAVY_SLICE"," and the retry after an out-of-memory kill stay the same, so a tool that watches them keeps working.",[45,207,211],{"id":208,"anchor":209},"compare-before-you-switch",{"label":210,"icon":50},"Section titled \"Compare before you switch\"","Compare before you switch",[20,213,214,217],{},[24,215,216],{},"heavy replay"," reads the old logs and runs the scheduler over them, so you can see what the queue would have done:",[219,220,224],"pre",{"language":221,"frame":222,"class":223,"wrap":14},"sh","terminal","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[24,225,227,246,247],{"class":226},"language-sh",[228,229,232,235,239,243],"span",{"class":230,"style":231},"line","display: inline",[228,233,26],{"style":234},"color:#953800;--shiki-dark:#FFA657",[228,236,238],{"style":237},"color:#0A3069;--shiki-dark:#A5D6FF"," replay",[228,240,242],{"style":241},"color:#0550AE;--shiki-dark:#79C0FF"," --policy",[228,244,245],{"style":237}," bash","\n",[228,248,249,251,253,255,258,261],{"class":230,"style":231},[228,250,26],{"style":234},[228,252,238],{"style":237},[228,254,242],{"style":241},[228,256,257],{"style":237}," default",[228,259,260],{"style":241}," --host",[228,262,263],{"style":237}," build-box:2",[20,265,266,267,271],{},"The first run checks that the replay reproduces your logged waits. The second shows waits under the new scheduler with a host of two slots. See ",[168,268,270],{"href":269},"\u002Freference\u002Fcli#heavy-replay","replay",".",[45,273,277],{"id":274,"anchor":275},"switch",{"label":276,"icon":50},"Section titled \"Switch\"","Switch",[279,280,281,291,304,311],"ol",{},[282,283,284,285,287,288,271],"li",{},"Install fleetjobs and put its ",[24,286,26],{}," ahead of the old script on ",[24,289,290],{},"PATH",[282,292,293,294,296,297,299,300,271],{},"Move the lines of ",[24,295,117],{}," into ",[24,298,126],{},". See ",[168,301,303],{"href":302},"\u002Fguide\u002Fhosts","Remote hosts",[282,305,306,307,310],{},"Let the old jobs drain. Both versions share the host slots in ",[24,308,309],{},"~\u002Foverflow"," while they do.",[282,312,313,314,271],{},"Point agents at ",[168,315,317],{"href":316},"\u002Fguide\u002Fagents","the For agents page",[319,321,322],{"id":47,"depth":320,"text":51},2,{"id":208,"depth":320,"text":211},{"id":274,"depth":320,"text":277},{"path":324,"title":325,"description":326},"\u002Fguide\u002Fnight","Night queue","What happens to a job the kernel killed twice for memory, and how to list, accept, reject and run the jobs queued for the night.",{"path":316,"title":328,"description":329},"For agents","What a coding agent runs, reads and decides when fleetjobs queues its builds and tests, with a prompt to paste into AGENTS.md.",1796530822179,"9e7c308e-a25b-413c-bd8b-9a1122ddc1d4"]