[ci-stats-reporter] ensure HTTP adapter is used (#114367)

* [ci-stats-reporter] ensure HTTP adapter is used

* update kbn/pm dist

Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
Spencer 2021-10-08 17:52:44 -05:00 committed by GitHub
parent b06e6db2f5
commit 032473ba29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -13,6 +13,8 @@ import Path from 'path';
import crypto from 'crypto';
import execa from 'execa';
import Axios from 'axios';
// @ts-expect-error not "public", but necessary to prevent Jest shimming from breaking things
import httpAdapter from 'axios/lib/adapters/http';
import { ToolingLog } from '../tooling_log';
import { parseConfig, Config } from './ci_stats_config';
@ -225,6 +227,7 @@ export class CiStatsReporter {
baseURL: BASE_URL,
headers,
data: body,
adapter: httpAdapter,
});
return true;

View file

@ -8965,6 +8965,8 @@ var _execa = _interopRequireDefault(__webpack_require__(134));
var _axios = _interopRequireDefault(__webpack_require__(177));
var _http = _interopRequireDefault(__webpack_require__(199));
var _ci_stats_config = __webpack_require__(218);
/*
@ -8974,6 +8976,7 @@ var _ci_stats_config = __webpack_require__(218);
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
// @ts-expect-error not "public", but necessary to prevent Jest shimming from breaking things
const BASE_URL = 'https://ci-stats.kibana.dev';
class CiStatsReporter {
@ -9173,7 +9176,8 @@ class CiStatsReporter {
url: path,
baseURL: BASE_URL,
headers,
data: body
data: body,
adapter: _http.default
});
return true;
} catch (error) {