[kbn/pm] use mtime of untracked files in bootstrap cache key (#64293)
This commit is contained in:
parent
4cc5b3a4d3
commit
7a4d97cec8
7
packages/kbn-pm/dist/index.js
vendored
7
packages/kbn-pm/dist/index.js
vendored
|
@ -57025,7 +57025,7 @@ async function getChangesForProjects(projects, kbn, log) {
|
||||||
log.verbose('getting changed files');
|
log.verbose('getting changed files');
|
||||||
const {
|
const {
|
||||||
stdout
|
stdout
|
||||||
} = await execa__WEBPACK_IMPORTED_MODULE_3___default()('git', ['ls-files', '-dmt', '--', ...Array.from(projects.values()).filter(p => kbn.isPartOfRepo(p)).map(p => p.path)], {
|
} = await execa__WEBPACK_IMPORTED_MODULE_3___default()('git', ['ls-files', '-dmto', '--exclude-standard', '--', ...Array.from(projects.values()).filter(p => kbn.isPartOfRepo(p)).map(p => p.path)], {
|
||||||
cwd: kbn.getAbsolute()
|
cwd: kbn.getAbsolute()
|
||||||
});
|
});
|
||||||
const output = stdout.trim();
|
const output = stdout.trim();
|
||||||
|
@ -57052,10 +57052,13 @@ async function getChangesForProjects(projects, kbn, log) {
|
||||||
unassignedChanges.set(path, 'deleted');
|
unassignedChanges.set(path, 'deleted');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '?':
|
||||||
|
unassignedChanges.set(path, 'untracked');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'H':
|
case 'H':
|
||||||
case 'S':
|
case 'S':
|
||||||
case 'K':
|
case 'K':
|
||||||
case '?':
|
|
||||||
default:
|
default:
|
||||||
log.warning(`unexpected modification status "${tag}" for ${path}, please report this!`);
|
log.warning(`unexpected modification status "${tag}" for ${path}, please report this!`);
|
||||||
unassignedChanges.set(path, 'invalid');
|
unassignedChanges.set(path, 'invalid');
|
||||||
|
|
|
@ -32,7 +32,7 @@ import { Kibana } from '../utils/kibana';
|
||||||
|
|
||||||
export type ChecksumMap = Map<string, string | undefined>;
|
export type ChecksumMap = Map<string, string | undefined>;
|
||||||
/** map of [repo relative path to changed file, type of change] */
|
/** map of [repo relative path to changed file, type of change] */
|
||||||
type Changes = Map<string, 'modified' | 'deleted' | 'invalid'>;
|
type Changes = Map<string, 'modified' | 'deleted' | 'invalid' | 'untracked'>;
|
||||||
|
|
||||||
const statAsync = promisify(Fs.stat);
|
const statAsync = promisify(Fs.stat);
|
||||||
const projectBySpecificitySorter = (a: Project, b: Project) => b.path.length - a.path.length;
|
const projectBySpecificitySorter = (a: Project, b: Project) => b.path.length - a.path.length;
|
||||||
|
@ -45,7 +45,8 @@ async function getChangesForProjects(projects: ProjectMap, kbn: Kibana, log: Too
|
||||||
'git',
|
'git',
|
||||||
[
|
[
|
||||||
'ls-files',
|
'ls-files',
|
||||||
'-dmt',
|
'-dmto',
|
||||||
|
'--exclude-standard',
|
||||||
'--',
|
'--',
|
||||||
...Array.from(projects.values())
|
...Array.from(projects.values())
|
||||||
.filter(p => kbn.isPartOfRepo(p))
|
.filter(p => kbn.isPartOfRepo(p))
|
||||||
|
@ -78,10 +79,13 @@ async function getChangesForProjects(projects: ProjectMap, kbn: Kibana, log: Too
|
||||||
unassignedChanges.set(path, 'deleted');
|
unassignedChanges.set(path, 'deleted');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '?':
|
||||||
|
unassignedChanges.set(path, 'untracked');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'H':
|
case 'H':
|
||||||
case 'S':
|
case 'S':
|
||||||
case 'K':
|
case 'K':
|
||||||
case '?':
|
|
||||||
default:
|
default:
|
||||||
log.warning(`unexpected modification status "${tag}" for ${path}, please report this!`);
|
log.warning(`unexpected modification status "${tag}" for ${path}, please report this!`);
|
||||||
unassignedChanges.set(path, 'invalid');
|
unassignedChanges.set(path, 'invalid');
|
||||||
|
|
Loading…
Reference in a new issue