{"record":{"id":"9d48af65e0249065","repo":"dotnet/runtime","slug":"no-jit-changes-found-starting-with-baseline-hash","errorCode":null,"errorMessage":"No JIT changes found starting with baseline hash","messagePattern":"No JIT changes found starting with baseline hash","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/jitrollingbuild.py","lineNumber":224,"sourceCode":"            raise RuntimeError(\"Couldn't determine baseline git hash\")\n\n        baseline_hash = stdout_git_merge_base.decode('utf-8').strip()\n        logging.info(\"Baseline hash: %s\", baseline_hash)\n\n        # Enumerate the last 20 changes, starting with the baseline, that included JIT and JIT-EE GUID changes.\n        command = [ \"git\", \"log\", \"--pretty=format:%H\", baseline_hash, \"-20\", \"--\", \"src/coreclr/jit/*\", \"src/coreclr/inc/jiteeversionguid.h\" ]\n        logging.debug(\"Invoking: {}\".format(\" \".join(command)))\n        proc = subprocess.Popen(command, stdout=subprocess.PIPE)\n        stdout_change_list, _ = proc.communicate()\n        return_code = proc.returncode\n        change_list_hashes = []\n        if return_code == 0:\n            change_list_hashes = stdout_change_list.decode('utf-8').strip().splitlines()\n        else:\n            raise RuntimeError(\"Couldn't determine list of JIT changes starting with baseline hash\")\n\n        if len(change_list_hashes) == 0:\n            raise RuntimeError(\"No JIT changes found starting with baseline hash\")\n\n        # For each hash, see if the rolling build contains the JIT.\n\n        hashnum = 1\n        for git_hash in change_list_hashes:\n            logging.info(\"try {}: {}\".format(hashnum, git_hash))\n\n            # Set the git hash to look for\n            # Note: there's a slight inefficiency here because this code searches for a JIT at this hash value, and\n            # then when we go to download, we do the same search again because we don't cache the result and pass it\n            # directly on to the downloader.\n            coreclr_args.git_hash = git_hash\n\n            if return_first_hash:\n                # Just use the first one\n                break\n\n            urls = get_jit_urls(coreclr_args)","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/jitrollingbuild.py#L206-L242","documentation":"Thrown by process_git_hash_arg() when the git log command succeeds but returns zero commit hashes — meaning none of the last 20 commits starting from the baseline hash touched src/coreclr/jit/* or src/coreclr/inc/jiteeversionguid.h. The rolling build store only contains JITs built for commits that changed JIT code, so without any JIT changes, there is nothing to search for.","triggerScenarios":"After git log runs successfully (return_code == 0) but the decoded output is empty or produces no lines. change_list_hashes ends up empty, and line 224 raises the RuntimeError. This means the baseline branch simply has no JIT-source changes in its recent history.","commonSituations":"The current branch diverged from main a long time ago, and the 20-commit window from the merge-base doesn't include any JIT changes. The working tree is on a branch focused on non-JIT components (e.g., GC, runtime, tests). The repo layout changed and jit sources moved out of src/coreclr/jit/.","solutions":["Check 'git log --oneline -20 -- src/coreclr/jit/* src/coreclr/inc/jiteeversionguid.h' to confirm there are indeed no recent JIT changes.","Pass -git_hash explicitly with a known JIT rolling build hash from the Azure store.","Use 'jitrollingbuild.py list --global_all' to browse available JIT builds and pick a hash manually."],"exampleFix":"# before: no JIT changes in recent history\npython jitrollingbuild.py download\n\n# after: specify a known good JIT hash\npython jitrollingbuild.py list --global_all\npython jitrollingbuild.py download -git_hash <hash_from_list>","handlingStrategy":"validation","validationCode":"# Check for JIT changes before relying on auto-detection\nimport subprocess\nbaseline = subprocess.run(['git', 'merge-base', 'HEAD', 'origin/main'], capture_output=True, cwd=repo_path).stdout.decode().strip()\nresult = subprocess.run(['git', 'log', '--oneline', baseline, '-20', '--', 'src/coreclr/jit/*'], capture_output=True, cwd=repo_path)\nchanges = result.stdout.decode().strip()\nif not changes:\n    print('No JIT changes found in recent history. Pass -git_hash with a known build hash.')","typeGuard":"def has_jit_changes(repo_path: str, baseline_hash: str) -> bool:\n    result = subprocess.run(['git', 'log', '--pretty=format:%H', baseline_hash, '-20', '--', 'src/coreclr/jit/*'], capture_output=True, cwd=repo_path)\n    return bool(result.stdout.decode().strip())","tryCatchPattern":"try:\n    process_git_hash_arg(coreclr_args)\nexcept RuntimeError as e:\n    if 'No JIT changes' in str(e):\n        logging.info('Use jitrollingbuild.py list --global_all to find available builds.')\n        sys.exit(1)\n    raise","preventionTips":["Use 'jitrollingbuild.py list --global_all' to find available JIT builds when auto-detection fails.","Keep a note of known-good JIT rolling build hashes for your common workflows.","Understand that auto-detection only works if your branch has recent JIT-source changes."],"tags":["git","jitrollingbuild","infrastructure","baseline","no-jit-changes"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}