Skip to content

Commit

Permalink
Merge branch 'main' into elastic#8565
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp authored Feb 20, 2024
2 parents c039090 + 37ae67a commit cbc98d3
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.10.0
20.11.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.10.0
20.11.1
12 changes: 6 additions & 6 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install
# Setup the Node.js toolchain for the architectures we want to support
node_repositories(
node_repositories = {
"20.10.0-darwin_amd64": ("node-v20.10.0-darwin-x64.tar.gz", "node-v20.10.0-darwin-x64", "5ff5e8abd3eea6e5f507eb6677554f5b2188eedef654096aa4168a9941e91a32"),
"20.10.0-darwin_arm64": ("node-v20.10.0-darwin-arm64.tar.gz", "node-v20.10.0-darwin-arm64", "68b93099451d77aac116cf8fce179cabcf53fec079508dc6b39d3a086fb461a8"),
"20.10.0-linux_arm64": ("node-v20.10.0-linux-arm64.tar.xz", "node-v20.10.0-linux-arm64", "a5c22683890d5d244f3afd488ef44e573b5b8287f8911b9a1b061ed3f20a5e6d"),
"20.10.0-linux_amd64": ("node-v20.10.0-linux-x64.tar.xz", "node-v20.10.0-linux-x64", "9c0fbc8cc7be9a6543af4b9afb05759c538c0f81015c388d63277b0158507697"),
"20.10.0-windows_amd64": ("node-v20.10.0-win-x64.zip", "node-v20.10.0-win-x64", "e5b861814a97e28ae7ac06a34e88fd5e0565b447d270c26e20b5ef60bf0aaaf9"),
"20.11.1-darwin_amd64": ("node-v20.11.1-darwin-x64.tar.gz", "node-v20.11.1-darwin-x64", "c52e7fb0709dbe63a4cbe08ac8af3479188692937a7bd8e776e0eedfa33bb848"),
"20.11.1-darwin_arm64": ("node-v20.11.1-darwin-arm64.tar.gz", "node-v20.11.1-darwin-arm64", "e0065c61f340e85106a99c4b54746c5cee09d59b08c5712f67f99e92aa44995d"),
"20.11.1-linux_arm64": ("node-v20.11.1-linux-arm64.tar.xz", "node-v20.11.1-linux-arm64", "36bac185164aa11940715425da1db2ec46e3354325bda9ee0b98b4a607aa0d8b"),
"20.11.1-linux_amd64": ("node-v20.11.1-linux-x64.tar.xz", "node-v20.11.1-linux-x64", "e2c39cb70b9ff79575a02747dd1e89917817cce05da21bef6b94eb9e92442024"),
"20.11.1-windows_amd64": ("node-v20.11.1-win-x64.zip", "node-v20.11.1-win-x64", "bc032628d77d206ffa7f133518a6225a9c5d6d9210ead30d67e294ff37044bda"),
},
node_version = "20.10.0",
node_version = "20.11.1",
node_urls = [
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}",
],
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/advanced/upgrading-nodejs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ These files must be updated when upgrading Node.js:
- {kib-repo}blob/{branch}/WORKSPACE.bazel[`WORKSPACE.bazel`] - The version is specified in the `node_version` property.
Besides this property, the list of files under `node_repositories` must be updated along with their respective SHA256 hashes.
These can be found in the `SHASUMS256.txt` file inside the public `kibana-custom-node-artifacts` GCP bucket.
Example for Node.js v18.18.2: https://storage.googleapis.com/kibana-custom-node-artifacts/node-glibc-217/dist/v18.18.2/SHASUMS256.txt[kibana-custom-node-artifacts/node-glibc-217/dist/v18.18.2/SHASUMS256.txt]
Example for Node.js v20.11.1: https://storage.googleapis.com/kibana-custom-node-artifacts/node-glibc-217/dist/v20.11.1/SHASUMS256.txt[kibana-custom-node-artifacts/node-glibc-217/dist/v20.11.1/SHASUMS256.txt]

See PR {kib-repo}pull/128123[#128123] for an example of how the Node.js version has been upgraded previously.

Expand All @@ -43,7 +43,7 @@ The only difference between the offical Node.js build and our custom build, is t
==== How to start a new build

To generate a new custom Node.js build, https://buildkite.com/elastic/kibana-custom-node-dot-js-builds#new[start a new build] on our dedicated Buildkite pipeline (requires Elastic employee permissions).
Give it a clear name (e.g. `Node 18.18.2`) and remember so set the custom `OVERRIDE_TARGET_VERSION` environment variable to the desired Node.js version - e.g. `OVERRIDE_TARGET_VERSION=18.18.2`.
Give it a clear name (e.g. `Node 20.11.1`) and remember so set the custom `OVERRIDE_TARGET_VERSION` environment variable to the desired Node.js version - e.g. `OVERRIDE_TARGET_VERSION=20.11.1`.
You find the "Environment Variables" field by expanding "Options >" in the "New Build" dialog.

=== Backporting
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "20.10.0",
"node": "20.11.1",
"yarn": "^1.22.19"
},
"resolutions": {
Expand Down
6 changes: 3 additions & 3 deletions packages/kbn-utils/src/streams/reduce_stream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ describe('reduceStream', () => {
}, 0),
]);
expect(stub).toHaveBeenCalledTimes(3);
expect(stub.mock.calls[0]).toEqual([0, 1, 'utf8']);
expect(stub.mock.calls[1]).toEqual([1, 2, 'utf8']);
expect(stub.mock.calls[2]).toEqual([2, 3, 'utf8']);
expect(stub.mock.calls[0]).toEqual([0, 1]);
expect(stub.mock.calls[1]).toEqual([1, 2]);
expect(stub.mock.calls[2]).toEqual([2, 3]);
});

test('provides the return value of the last iteration of the reducer', async () => {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ describe('useStateProps', () => {
"_eventsCount": 0,
"_maxListeners": undefined,
"requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"searchSessionId": "123",
Expand Down Expand Up @@ -212,6 +213,7 @@ describe('useStateProps', () => {
"_eventsCount": 0,
"_maxListeners": undefined,
"requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"searchSessionId": "123",
Expand Down Expand Up @@ -313,6 +315,7 @@ describe('useStateProps', () => {
"_eventsCount": 0,
"_maxListeners": undefined,
"requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"searchSessionId": "123",
Expand Down Expand Up @@ -390,6 +393,7 @@ describe('useStateProps', () => {
"_eventsCount": 0,
"_maxListeners": undefined,
"requests": Map {},
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"searchSessionId": "123",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe('requestOAuthClientCredentialsToken', () => {
"scheduling": "lifo",
"sockets": Object {},
"totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"maxContentLength": 1000000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ describe('requestOAuthJWTToken', () => {
"scheduling": "lifo",
"sockets": Object {},
"totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"maxContentLength": 1000000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ describe('requestOAuthToken', () => {
"scheduling": "lifo",
"sockets": Object {},
"totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"maxContentLength": 1000000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ describe('sendEmailGraphApi', () => {
"scheduling": "lifo",
"sockets": Object {},
"totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"maxContentLength": 1000000,
Expand All @@ -113,7 +114,7 @@ describe('sendEmailGraphApi', () => {
"validateStatus": [Function],
},
]
`);
`);
});

test('email was sent on behalf of the user "from" mailbox', async () => {
Expand Down Expand Up @@ -195,6 +196,7 @@ describe('sendEmailGraphApi', () => {
"scheduling": "lifo",
"sockets": Object {},
"totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"maxContentLength": 1000000,
Expand All @@ -204,7 +206,7 @@ describe('sendEmailGraphApi', () => {
"validateStatus": [Function],
},
]
`);
`);
});

test('sendMail request was sent to the custom configured Graph API URL', async () => {
Expand Down Expand Up @@ -285,6 +287,7 @@ describe('sendEmailGraphApi', () => {
"scheduling": "lifo",
"sockets": Object {},
"totalSocketCount": 0,
Symbol(shapeMode): false,
Symbol(kCapture): false,
},
"maxContentLength": 1000000,
Expand All @@ -294,7 +297,7 @@ describe('sendEmailGraphApi', () => {
"validateStatus": [Function],
},
]
`);
`);
});

test('throw the exception and log the proper error if message was not sent successfuly', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const triggerTestNowMonitor = async ({
configId: string;
name: string;
}): Promise<TestNowResponse | undefined> => {
return await apiService.get(SYNTHETICS_API_URLS.TRIGGER_MONITOR + `/${configId}`);
return await apiService.post(SYNTHETICS_API_URLS.TRIGGER_MONITOR + `/${configId}`);
};

export const runOnceMonitor = async ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { SYNTHETICS_API_URLS } from '../../../common/constants';
import { normalizeSecrets } from '../../synthetics_service/utils/secrets';

export const testNowMonitorRoute: SyntheticsRestApiRouteFactory<TestNowResponse> = () => ({
method: 'GET',
method: 'POST',
path: SYNTHETICS_API_URLS.TRIGGER_MONITOR + '/{monitorId}',
validate: {
params: schema.object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ({ getService }: FtrProviderContext) {
const resp = await monitorTestService.addMonitor(newMonitor);

const res = await supertest
.get(SYNTHETICS_API_URLS.TRIGGER_MONITOR + `/${resp.id}`)
.post(SYNTHETICS_API_URLS.TRIGGER_MONITOR + `/${resp.id}`)
.set('kbn-xsrf', 'true')
.expect(200);

Expand Down Expand Up @@ -79,7 +79,7 @@ export default function ({ getService }: FtrProviderContext) {
.expect(200);

const res = await supertest
.get(`/s/${SPACE_ID}${SYNTHETICS_API_URLS.TRIGGER_MONITOR}/${resp.body.id}`)
.post(`/s/${SPACE_ID}${SYNTHETICS_API_URLS.TRIGGER_MONITOR}/${resp.body.id}`)
.set('kbn-xsrf', 'true')
.expect(200);

Expand Down

0 comments on commit cbc98d3

Please sign in to comment.