Skip to content

Commit

Permalink
Improve quick checks (elastic#192369)
Browse files Browse the repository at this point in the history
## Summary
Fixes a few issues around the changed quick-checks.

Addresses: 
- elastic/kibana-operations#195
- elastic/kibana-operations#201 &
elastic/kibana-operations#202
  • Loading branch information
delanni authored Sep 11, 2024
1 parent 3a74700 commit 9accb33
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .buildkite/scripts/steps/checks/renovate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@

set -euo pipefail

source .buildkite/scripts/common/util.sh

echo --- Check renovate.json
docker run -v "$(pwd)"/renovate.json:/home/app/renovate.json docker.elastic.co/ci-agent-images/pipelib:0.8.0@sha256:641d7fc6cfe473900a1fbe49876762916d804b09fdf2945f74e9f803f3073779 renovate-config-validator

retry 3 3 docker run \
-v "$(pwd)"/renovate.json:/home/app/renovate.json \
docker.elastic.co/ci-agent-images/pipelib:0.8.0@sha256:641d7fc6cfe473900a1fbe49876762916d804b09fdf2945f74e9f803f3073779 \
renovate-config-validator
10 changes: 6 additions & 4 deletions packages/kbn-ci-stats-reporter/src/ci_stats_reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class CiStatsReporter {
const { stdout } = await execa('git', ['config', 'user.email']);
email = stdout;
} catch (e) {
this.log.debug(e.message);
// no-op - we're ok with email being undefined
}

try {
Expand All @@ -181,7 +181,7 @@ export class CiStatsReporter {
}

const memUsage = process.memoryUsage();
const isElasticCommitter = email && email.endsWith('@elastic.co') ? true : false;
const isElasticCommitter = email && email.endsWith('@elastic.co');

const defaultMeta = {
kibanaUuid,
Expand All @@ -200,14 +200,16 @@ export class CiStatsReporter {
memoryUsageHeapUsed: memUsage.heapUsed,
memoryUsageExternal: memUsage.external,
memoryUsageArrayBuffers: memUsage.arrayBuffers,
nestedTiming: process.env.CI_STATS_NESTED_TIMING ? true : false,
nestedTiming: !!process.env.CI_STATS_NESTED_TIMING,
osArch: Os.arch(),
osPlatform: Os.platform(),
osRelease: Os.release(),
totalMem: Os.totalmem(),
};

this.log.debug('CIStatsReporter committerHash: %s', defaultMeta.committerHash);
if (defaultMeta.committerHash) {
this.log.debug('CIStatsReporter committerHash: %s', defaultMeta.committerHash);
}

return !!(await this.req({
auth: !!buildId,
Expand Down
2 changes: 1 addition & 1 deletion src/dev/run_quick_checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void run(async ({ log, flagsReader }) => {
const failedChecks = results.filter((check) => !check.success);
if (failedChecks.length > 0) {
logger.write(`--- ${failedChecks.length} quick check(s) failed. ❌`);
logger.write(`See above for details.`);
logger.write(`See the script(s) marked with ❌ above for details.`);
process.exitCode = 1;
} else {
logger.write('--- All checks passed. ✅');
Expand Down

0 comments on commit 9accb33

Please sign in to comment.