mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[CI] Quiet quickcheck i18n output (#197871)
## Summary The i18n check spews out ~5k lines of log. This makes it difficult to spot any errors, or even break the check through some buffer issue. This PR quiets output from i18n quick check, yet keeping the error outputs. We've tested it in https://github.com/elastic/kibana/pull/194379, and locally (to see if we still see the errors) - it seems to have fixed errors from @pgayvallet 's case. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
e3b8ccf025
commit
2162c56b59
2 changed files with 10 additions and 10 deletions
|
@ -5,4 +5,4 @@ set -euo pipefail
|
|||
source .buildkite/scripts/common/util.sh
|
||||
|
||||
echo --- Check i18n
|
||||
node scripts/i18n_check
|
||||
node scripts/i18n_check --quiet
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
import { Listr } from 'listr2';
|
||||
import { run } from '@kbn/dev-cli-runner';
|
||||
import { ToolingLog } from '@kbn/tooling-log';
|
||||
import { getTimeReporter } from '@kbn/ci-stats-reporter';
|
||||
import { isFailError } from '@kbn/dev-cli-errors';
|
||||
import { I18nCheckTaskContext, MessageDescriptor } from '../types';
|
||||
|
@ -24,13 +23,7 @@ import {
|
|||
import { TaskReporter } from '../utils/task_reporter';
|
||||
import { flagFailError, isDefined, undefinedOrBoolean } from '../utils/verify_bin_flags';
|
||||
|
||||
const toolingLog = new ToolingLog({
|
||||
level: 'info',
|
||||
writeTo: process.stdout,
|
||||
});
|
||||
|
||||
const runStartTime = Date.now();
|
||||
const reportTime = getTimeReporter(toolingLog, 'scripts/i18n_check');
|
||||
|
||||
const skipOnNoTranslations = ({ config }: I18nCheckTaskContext) =>
|
||||
!config?.translations.length && 'No translations found.';
|
||||
|
@ -50,9 +43,13 @@ run(
|
|||
namespace: namespace,
|
||||
fix = false,
|
||||
path,
|
||||
silent,
|
||||
quiet,
|
||||
},
|
||||
log,
|
||||
}) => {
|
||||
const reportTime = getTimeReporter(log, 'scripts/i18n_check');
|
||||
|
||||
if (
|
||||
fix &&
|
||||
(isDefined(ignoreIncompatible) ||
|
||||
|
@ -131,13 +128,15 @@ run(
|
|||
{
|
||||
concurrent: false,
|
||||
exitOnError: true,
|
||||
renderer: process.env.CI ? 'verbose' : ('default' as any),
|
||||
forceTTY: false,
|
||||
renderer:
|
||||
((silent || quiet) && 'silent') || (process.env.CI ? 'verbose' : ('default' as any)),
|
||||
}
|
||||
);
|
||||
|
||||
try {
|
||||
const messages: Map<string, MessageDescriptor[]> = new Map();
|
||||
const taskReporter = new TaskReporter({ toolingLog });
|
||||
const taskReporter = new TaskReporter({ toolingLog: log });
|
||||
await list.run({ messages, taskReporter });
|
||||
|
||||
reportTime(runStartTime, 'total', {
|
||||
|
@ -150,6 +149,7 @@ run(
|
|||
reportTime(runStartTime, 'error', {
|
||||
success: false,
|
||||
});
|
||||
log.error(error);
|
||||
} else {
|
||||
log.error('Unhandled exception!');
|
||||
log.error(error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue