mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
fix: less debug logging, more trace
This commit is contained in:
parent
5aed5026c6
commit
f68414fb2f
7 changed files with 10 additions and 13 deletions
|
@ -67,7 +67,7 @@ async function getAuthHeaders(registry, repository) {
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const authUrl = `${authenticateHeader.parms.realm}?service=${authenticateHeader.parms.service}&scope=repository:${repository}:pull`;
|
const authUrl = `${authenticateHeader.parms.realm}?service=${authenticateHeader.parms.service}&scope=repository:${repository}:pull`;
|
||||||
logger.debug(
|
logger.trace(
|
||||||
`Obtaining docker registry token for ${repository} using url ${authUrl}`
|
`Obtaining docker registry token for ${repository} using url ${authUrl}`
|
||||||
);
|
);
|
||||||
const { token } = (await got(authUrl, opts)).body;
|
const { token } = (await got(authUrl, opts)).body;
|
||||||
|
|
|
@ -13,7 +13,7 @@ function extractPackageFile(content) {
|
||||||
if (match) {
|
if (match) {
|
||||||
const currentFrom = match[1];
|
const currentFrom = match[1];
|
||||||
const dep = getDep(currentFrom);
|
const dep = getDep(currentFrom);
|
||||||
logger.debug(
|
logger.trace(
|
||||||
{
|
{
|
||||||
depName: dep.depName,
|
depName: dep.depName,
|
||||||
currentValue: dep.currentValue,
|
currentValue: dep.currentValue,
|
||||||
|
|
|
@ -45,7 +45,7 @@ function extractPackageFile(content) {
|
||||||
for (const fromLine of content.split('\n')) {
|
for (const fromLine of content.split('\n')) {
|
||||||
const fromMatch = fromLine.match(/^FROM /i);
|
const fromMatch = fromLine.match(/^FROM /i);
|
||||||
if (fromMatch) {
|
if (fromMatch) {
|
||||||
logger.debug({ lineNumber, fromLine }, 'FROM line');
|
logger.trace({ lineNumber, fromLine }, 'FROM line');
|
||||||
const [fromPrefix, currentFrom, ...fromRest] = fromLine.match(/\S+/g);
|
const [fromPrefix, currentFrom, ...fromRest] = fromLine.match(/\S+/g);
|
||||||
if (fromRest.length === 2 && fromRest[0].toLowerCase() === 'as') {
|
if (fromRest.length === 2 && fromRest[0].toLowerCase() === 'as') {
|
||||||
logger.debug('Found a multistage build stage name');
|
logger.debug('Found a multistage build stage name');
|
||||||
|
@ -76,7 +76,7 @@ function extractPackageFile(content) {
|
||||||
const copyFromMatch = fromLine.match(/^(COPY --from=)([^\s]+)\s+(.*)$/i);
|
const copyFromMatch = fromLine.match(/^(COPY --from=)([^\s]+)\s+(.*)$/i);
|
||||||
if (copyFromMatch) {
|
if (copyFromMatch) {
|
||||||
const [fromPrefix, currentFrom, fromSuffix] = copyFromMatch.slice(1);
|
const [fromPrefix, currentFrom, fromSuffix] = copyFromMatch.slice(1);
|
||||||
logger.debug({ lineNumber, fromLine }, 'COPY --from line');
|
logger.trace({ lineNumber, fromLine }, 'COPY --from line');
|
||||||
if (stageNames.includes(currentFrom)) {
|
if (stageNames.includes(currentFrom)) {
|
||||||
logger.debug({ currentFrom }, 'Skipping alias COPY --from');
|
logger.debug({ currentFrom }, 'Skipping alias COPY --from');
|
||||||
} else if (!Number.isNaN(Number(currentFrom))) {
|
} else if (!Number.isNaN(Number(currentFrom))) {
|
||||||
|
|
|
@ -36,8 +36,7 @@ function getDep(lineNumber, match) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractPackageFile(content) {
|
function extractPackageFile(content) {
|
||||||
logger.debug('gomod.extractPackageFile()');
|
logger.trace({ content }, 'gomod.extractPackageFile()');
|
||||||
logger.trace({ content });
|
|
||||||
const deps = [];
|
const deps = [];
|
||||||
try {
|
try {
|
||||||
const lines = content.split('\n');
|
const lines = content.split('\n');
|
||||||
|
@ -45,8 +44,7 @@ function extractPackageFile(content) {
|
||||||
let line = lines[lineNumber];
|
let line = lines[lineNumber];
|
||||||
const requireMatch = line.match(/^require\s+([^\s]+)\s+([^\s]+)/);
|
const requireMatch = line.match(/^require\s+([^\s]+)\s+([^\s]+)/);
|
||||||
if (requireMatch) {
|
if (requireMatch) {
|
||||||
logger.trace(`Matched single-line require on line ${lineNumber}`);
|
logger.trace({ lineNumber }, `require line: "${line}"`);
|
||||||
logger.debug(`require line: "${line}"`);
|
|
||||||
const dep = getDep(lineNumber, requireMatch);
|
const dep = getDep(lineNumber, requireMatch);
|
||||||
deps.push(dep);
|
deps.push(dep);
|
||||||
}
|
}
|
||||||
|
@ -58,8 +56,7 @@ function extractPackageFile(content) {
|
||||||
const multiMatch = line.match(/^\s+([^\s]+)\s+([^\s]+)/);
|
const multiMatch = line.match(/^\s+([^\s]+)\s+([^\s]+)/);
|
||||||
logger.trace(`reqLine: "${line}"`);
|
logger.trace(`reqLine: "${line}"`);
|
||||||
if (multiMatch) {
|
if (multiMatch) {
|
||||||
logger.trace(`Matched multi-line require on line ${lineNumber}`);
|
logger.trace({ lineNumber }, `require line: "${line}"`);
|
||||||
logger.debug(`require line: "${line}"`);
|
|
||||||
const dep = getDep(lineNumber, multiMatch);
|
const dep = getDep(lineNumber, multiMatch);
|
||||||
dep.multiLine = true;
|
dep.multiLine = true;
|
||||||
deps.push(dep);
|
deps.push(dep);
|
||||||
|
|
|
@ -36,7 +36,7 @@ async function extractAllPackageFiles(config, packageFiles) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function extractPackageFile(content, fileName, config) {
|
async function extractPackageFile(content, fileName, config) {
|
||||||
logger.debug(`npm.extractPackageFile(${fileName})`);
|
logger.trace(`npm.extractPackageFile(${fileName})`);
|
||||||
logger.trace({ content });
|
logger.trace({ content });
|
||||||
const deps = [];
|
const deps = [];
|
||||||
let packageJson;
|
let packageJson;
|
||||||
|
|
|
@ -51,7 +51,7 @@ async function fetchDepUpdates(packageFileConfig, dep) {
|
||||||
}
|
}
|
||||||
// istanbul ignore if
|
// istanbul ignore if
|
||||||
if (dep.updates.length) {
|
if (dep.updates.length) {
|
||||||
logger.debug(
|
logger.trace(
|
||||||
{ dependency: depName },
|
{ dependency: depName },
|
||||||
`${dep.updates.length} result(s): ${dep.updates.map(
|
`${dep.updates.length} result(s): ${dep.updates.map(
|
||||||
upgrade => upgrade.newValue
|
upgrade => upgrade.newValue
|
||||||
|
|
|
@ -75,7 +75,7 @@ async function lookupUpdates(config) {
|
||||||
.filter(v => isVersion(v));
|
.filter(v => isVersion(v));
|
||||||
// istanbul ignore if
|
// istanbul ignore if
|
||||||
if (allVersions.length === 0) {
|
if (allVersions.length === 0) {
|
||||||
const message = `No valid versions returned from registry for this package`;
|
const message = `Found no results from datasource that look like a version`;
|
||||||
logger.debug({ dependency: depName, result: dependency }, message);
|
logger.debug({ dependency: depName, result: dependency }, message);
|
||||||
if (!config.currentDigest) {
|
if (!config.currentDigest) {
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue