{
 "number": 35722,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/35722",
 "title": "ci: cache BSD sdk sources separately",
 "author": "willcl-ark",
 "author_association": "MEMBER",
 "created_at": "2026-07-14T13:38:44Z",
 "updated_at": "2026-09-16T12:03:14Z",
 "age_days": 65,
 "draft": false,
 "labels": [
  "Tests",
  "Needs rebase"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "cd4b34c58dfcea8b5906d4bd397d0611c50e11c9",
 "head_ref": "depends-sdk-sources",
 "head_repo": "willcl-ark/bitcoin",
 "head_history": [
  {
   "t": "2026-07-14T13:51:51Z",
   "sha": "ae284ca3bc7d7f36c5bd7085f869a9ce60fdc0a5"
  },
  {
   "t": "2026-07-14T14:57:40Z",
   "sha": "cd4b34c58dfcea8b5906d4bd397d0611c50e11c9"
  }
 ],
 "additions": 120,
 "deletions": 69,
 "changed_files": 6,
 "commit_count": 3,
 "size_bucket": "M",
 "mergeable_state": "dirty",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": [
    {
     "number": 35754,
     "title": "ci: update and verify SDKs, lock lint dependencies",
     "author": "l0rinc"
    }
   ]
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "maflcko",
   "sedited"
  ]
 },
 "signals": {
  "needs_rebase": true,
  "ci_failed": false,
  "mergeable_state": "dirty",
  "last_author_activity": "2026-08-04T11:19:13Z",
  "last_reviewer_activity": "2026-09-16T12:03:14Z",
  "last_reviewer": "sedited",
  "author_silent_days": 44,
  "waiting_on_author_days": 1,
  "days_since_update": 1
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": [
   35754
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "Sometimes CI jobs need to (re)download *BSD SDK archives, and these downloads can delay or fail the job, as has been happening recently.\n\nThe SDKs are currently downloaded and extracted _while building the CI image itself_; this means that when the relevant image-build cache is missed or invalidated, the SDK archives are downloaded again, which is unnecessary.\n\nInstead, cache the BSD SDK archives separately and mount them into the runtime container. Move the BSD SDK setup out of `01_base_install.sh` and run it after the container starts, so it is no longer part of the image build and the BSD SDKs are no longer part of the image build cache/layers.\n\nThis means rebuilding the BSD images no longer relies on pulling the SDK archives, reducing reliance and load we have on archive servers in many cases.\n\nWhile touching 02_run_container.py and adding new paths to it, unify path handling for all caches a bit more.",
 "commits": [
  {
   "sha": "aa040360ce2dddcbe445ed85cde0d1e417310dfe",
   "date": "2026-07-14T14:42:02Z",
   "message": "ci: move BSD SDK setup out of image build\n\nThe base install script runs while constructing the CI image, but the BSD\nSDKs are only needed later when compiling the source in the running\ncontainer.\n\nMoving them out of base_install.sh means we can cache them similarly to\nother sources/caches."
  },
  {
   "sha": "732997364b5e2d1c6424e7e4acb99bf06c63b14c",
   "date": "2026-07-14T14:42:03Z",
   "message": "ci: cache BSD SDK sources\n\nRestore and save the NetBSD, FreeBSD, and OpenBSD SDK archives through the\nexisting cache provider.\n\nMount the shared sdk-sources directory in the container so cache hits\navoid downloading the archives again."
  },
  {
   "sha": "cd4b34c58dfcea8b5906d4bd397d0611c50e11c9",
   "date": "2026-07-14T14:42:04Z",
   "message": "ci: unify cache path handling\n\nThe cache directories need to be created and mounted in both host and Docker\nmodes. Keeping separate lists lets the paths drift.\n\nDefine each cache's source and destination once and derive the volume and bind\nmounts from that definition."
  }
 ],
 "timeline": [
  {
   "t": "2026-07-14T13:51:51Z",
   "kind": "force_push",
   "who": "willcl-ark",
   "commit": "ae284ca3bc7d7f36c5bd7085f869a9ce60fdc0a5"
  },
  {
   "t": "2026-07-14T14:57:40Z",
   "kind": "force_push",
   "who": "willcl-ark",
   "commit": "cd4b34c58dfcea8b5906d4bd397d0611c50e11c9"
  },
  {
   "t": "2026-08-04T10:00:05Z",
   "kind": "comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "text": "An alternative would be to add fallback mirrors (like in depends), but this may be fine as well (haven't looked closely)"
  },
  {
   "t": "2026-08-04T11:12:48Z",
   "kind": "comment",
   "who": "willcl-ark",
   "assoc": "MEMBER",
   "text": "Yeah I'm open to either option too. The nice thing about caching them in CI is that nobody has to update the fallback mirror on each SDK update (or forget to!). But IMO it's the \"cleaner\" approach, and the fallbacks also work for contributors local development; could be superior depending on how flakey the original hosts are...\n\nI think it might be @achow101 who could add fallbacks of these, if we want to go that route?"
  },
  {
   "t": "2026-08-04T11:18:22Z",
   "kind": "comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "text": "Do you recall any CI logs where the download failed?"
  },
  {
   "t": "2026-08-04T11:19:13Z",
   "kind": "comment",
   "who": "willcl-ark",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI do not, it was just the re-downloading them needlessly which prompted this change."
  },
  {
   "t": "2026-09-16T12:03:14Z",
   "kind": "comment",
   "who": "sedited",
   "assoc": "MEMBER",
   "text": "Ping for rebase."
  }
 ],
 "labels_log": [
  {
   "t": "2026-07-14T13:52:34Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-07-14T16:14:28Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-07-14T16:14:31Z",
   "action": "labeled",
   "label": "Tests",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-04T09:13:18Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-07-14T14:57:47Z",
   "kind": "renamed",
   "who": "willcl-ark",
   "from": "[NOMERGE] ci: cache BSD sdk sources separately",
   "to": "ci: cache BSD sdk sources separately"
  },
  {
   "t": "2026-07-14T14:59:51Z",
   "kind": "ready_for_review",
   "who": "willcl-ark"
  }
 ],
 "text_chars": 2476,
 "text_tokens_estimate": 619,
 "changed_paths": [
  ".github/actions/cache/restore/action.yml",
  ".github/actions/cache/save/action.yml",
  ".github/actions/configure-environment/action.yml",
  "ci/test/01_base_install.sh",
  "ci/test/01_setup_bsd.sh",
  "ci/test/02_run_container.py"
 ],
 "files": [
  {
   "path": ".github/actions/cache/restore/action.yml",
   "add": 10,
   "del": 0
  },
  {
   "path": ".github/actions/cache/save/action.yml",
   "add": 9,
   "del": 0
  },
  {
   "path": ".github/actions/configure-environment/action.yml",
   "add": 10,
   "del": 0
  },
  {
   "path": "ci/test/01_base_install.sh",
   "add": 0,
   "del": 40
  },
  {
   "path": "ci/test/01_setup_bsd.sh",
   "add": 56,
   "del": 0
  },
  {
   "path": "ci/test/02_run_container.py",
   "add": 35,
   "del": 29
  }
 ],
 "test_lines": 160,
 "git": {
  "head": "cd4b34c58dfcea8b5906d4bd397d0611c50e11c9",
  "head_matches_backup": true,
  "base": "2d4065d1fe4d9ad802e7c2b996d6cb12d66677a2",
  "commits": [
   {
    "sha": "aa040360ce",
    "subject": "ci: move BSD SDK setup out of image build",
    "files": 3,
    "add": 57,
    "del": 40
   },
   {
    "sha": "732997364b",
    "subject": "ci: cache BSD SDK sources",
    "files": 4,
    "add": 39,
    "del": 1
   },
   {
    "sha": "cd4b34c58d",
    "subject": "ci: unify cache path handling",
    "files": 1,
    "add": 33,
    "del": 37
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "34de281bedd89e36",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}