microsoft / microsoft/lage

Lage failing to bring back cached results for prepare scripts using backfill

Open
#156 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
816
Forks
88
PR merge metrics
No merged PRs in 30d

Description

Lage build showing some ERR entries while trying to fetch from cache using backfill approach. The overall build is passing though with success exit code. Lage is trying to use backfill to bring back cached results for the prepare scripts, but it's failing to do so (for some reason). Locally, lage is configured to use local cache (config file see below), so there shouldn't be any network requests involved. The failures are specifically happening here, in lage: lage/backfill.ts at master · microsoft/lage (github.com) (which is pointing to this part of backfill, and this is the fetch for Local storage). I don't know which part fails.

This is my config file -
const path = require("path");

module.exports = {
cacheStorageConfig: {
provider: "local",
},
logFolder: path.join(__dirname, "node_modules", ".cache", "backfill-logs"),
outputGlob: ["**/*", "!node_modules", "!package.json", "!Pods"],
logLevel: "info",
mode: "PASS",
};

Here are some logs -
info Lage task runner - let's make it
info @1js/lpc-mobile-assets prepare ▶️ start
info @1js/lpc-mobile-assets prepare ⏭️ skip - c8a07652eae3490bf584c6cc3fbb892d08931cdd
info @1js/feed-loki-rest-interface prepare ▶️ start
info @1js/feed-loki-rest-interface prepare ⏭️ skip - 0184a38f78c4fda8c634faabc05b227af04d6943
info @1js/lpp-loki-rest-interface prepare ▶️ start
info @1js/lpp-loki-rest-interface prepare ⏭️ skip - 97281c229c41ce20612607a01365e01e6a77ec51
info @1js/feed-mobile-assets prepare ▶️ start
info @1js/feed-mobile-assets prepare ⏭️ skip - 9dd1772be234afd66f4b073e8da052cbdfb34ce8
info @1js/lpp-core prepare ✔️ done - 5.75s
info @1js/lpc-models prepare ✔️ done - 5.99s
ERR! @1js/lpc-linkedin#prepare fetchBackfill
info @1js/lpc-linkedin prepare ▶️ start
ERR! @1js/lpc-teams-web#prepare fetchBackfill
info @1js/lpc-teams-web prepare ▶️ start
ERR! @1js/lpe-core#prepare fetchBackfill
info @1js/lpe-core prepare ▶️ start
ERR! @1js/nova-lpc-web#prepare fetchBackfill
info @1js/nova-lpc-web prepare ▶️ start
info @1js/lpc-linkedin prepare ✔️ done - 3.62s
info @1js/lpc-teams-web prepare ✔️ done - 1.70s
info @1js/lpe-core prepare ✔️ done - 1.71s
ERR! @1js/lpc-core#prepare fetchBackfill
info @1js/lpc-core prepare ▶️ start
info @1js/nova-lpc-web prepare ✔️ done - 4.83s
info @1js/lpc-core prepare ✔️ done - 5.94s

Should this be a warning instead of error (since the overall build is a success) and maybe with some description like : "Fetching cache failed. Will continue without cache".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/cache/backfill.ts around line 66 and trace the fetchBackfill call into the referenced backfill API and LocalCacheStorage fetch path. Reproduce with the supplied local-cache configuration and logs, identify why the fetch fails, and verify the resulting handling and message against the successful build behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.