File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,10 +144,36 @@ jobs:
144144 }
145145
146146 const data = JSON.parse(fs.readFileSync(runJsonPath, 'utf8'));
147+ const getCache = () => {
148+ try {
149+ const { NxCache } = require('nx/src/native');
150+ const { workspaceRoot } = require('nx/src/utils/workspace-root');
151+ const { cacheDir } = require('nx/src/utils/cache-directory');
152+ const { getDbConnection } = require('nx/src/utils/db-connection');
153+
154+ return new NxCache(workspaceRoot, cacheDir, getDbConnection());
155+ } catch (error) {
156+ console.log(`Nx cache entry check unavailable: ${error.message}`);
157+ return null;
158+ }
159+ };
160+ const cache = getCache();
161+ const getCacheEntryStatus = (hash) => {
162+ if (!cache) {
163+ return 'unchecked';
164+ }
165+
166+ try {
167+ return cache.get(hash) ? 'present' : 'missing';
168+ } catch (error) {
169+ return `error: ${error.message}`;
170+ }
171+ };
147172 const tasks = (data.tasks ?? []).map((task) => ({
148173 taskId: task.taskId,
149174 hash: task.hash,
150175 cacheStatus: task.cacheStatus,
176+ cacheEntry: getCacheEntryStatus(task.hash),
151177 status: task.status,
152178 }));
153179
Original file line number Diff line number Diff line change 4747 "libsDir" : " packages"
4848 },
4949 "defaultBase" : " master" ,
50+ "maxCacheSize" : " 5GB" ,
5051 "tui" : {
5152 "enabled" : false
5253 },
You can’t perform that action at this time.
0 commit comments