Merge branch 'master' into multi-cluster

This commit is contained in:
Nir Gazit
2021-01-20 10:10:09 +02:00
8 changed files with 36 additions and 18349 deletions
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-kafka': minor
'@backstage/plugin-kafka-backend': minor
---
Created alpha version of Kafka plugin, supporting listing consumer group for a Backstage configured service.
+11
View File
@@ -15,12 +15,23 @@
*/
export interface Config {
kafka?: {
/**
* Client ID used to Backstage uses to identify when connecting to the Kafka cluster.
*/
clientId: string;
clusters: {
name: string;
/**
* List of brokers in the Kafka cluster to connect to.
*/
brokers: string[];
/**
* Optional SSL connection parameters to connect to the cluster. Passed directly to Node tls.connect.
* See https://nodejs.org/dist/latest-v8.x/docs/api/tls.html#tls_tls_createsecurecontext_options
*/
ssl?: {
ca: string[];
/** @visibility secret */
key: string;
cert: string;
};
File diff suppressed because it is too large Load Diff
-1
View File
@@ -45,7 +45,6 @@
"@backstage/cli": "^0.4.3",
"@types/jest-when": "^2.7.2",
"@types/lodash": "^4.14.151",
"jest-extended": "^0.11.5",
"jest-when": "^3.1.0",
"supertest": "^4.0.2"
},
-23
View File
@@ -1,23 +0,0 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import '@backstage/backend-common';
describe('test', () => {
it('unbreaks the test runner', () => {
expect(true).toBeTruthy();
});
});
@@ -86,26 +86,29 @@ describe('router', () => {
expect(response.status).toEqual(200);
expect(response.body.consumerId).toEqual('hey');
expect(response.body.offsets).toIncludeSameMembers([
{
topic: 'topic1',
partitionId: 1,
groupOffset: '100',
topicOffset: '500',
},
{
topic: 'topic1',
partitionId: 2,
groupOffset: '213',
topicOffset: '1000',
},
{
topic: 'topic2',
partitionId: 1,
groupOffset: '456',
topicOffset: '456',
},
]);
// Note the Set comparison here since there's no guarantee on the order of the elements in the list.
expect(new Set(response.body.offsets)).toStrictEqual(
new Set([
{
topic: 'topic1',
partitionId: 1,
groupOffset: '100',
topicOffset: '500',
},
{
topic: 'topic1',
partitionId: 2,
groupOffset: '213',
topicOffset: '1000',
},
{
topic: 'topic2',
partitionId: 1,
groupOffset: '456',
topicOffset: '456',
},
]),
);
});
it('handles internal error correctly', async () => {
+1 -8
View File
@@ -14,11 +14,4 @@
* limitations under the License.
*/
import type { Config } from '@jest/types';
import 'jest-extended';
const config: Config.InitialOptions = {
setupFilesAfterEnv: ['jest-extended'],
};
export default config;
export {};
+1 -32
View File
@@ -13018,7 +13018,7 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2:
dependencies:
homedir-polyfill "^1.0.1"
expect@^24.1.0, expect@^24.8.0:
expect@^24.8.0:
version "24.9.0"
resolved "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca"
integrity sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==
@@ -16318,20 +16318,6 @@ jest-esm-transformer@^1.0.0:
"@babel/core" "^7.4.4"
"@babel/plugin-transform-modules-commonjs" "^7.4.4"
jest-extended@^0.11.5:
version "0.11.5"
resolved "https://registry.npmjs.org/jest-extended/-/jest-extended-0.11.5.tgz#f063b3f1eaadad8d7c13a01f0dfe0f538d498ccf"
integrity sha512-3RsdFpLWKScpsLD6hJuyr/tV5iFOrw7v6YjA3tPdda9sJwoHwcMROws5gwiIZfcwhHlJRwFJB2OUvGmF3evV/Q==
dependencies:
expect "^24.1.0"
jest-get-type "^22.4.3"
jest-matcher-utils "^22.0.0"
jest-get-type@^22.4.3:
version "22.4.3"
resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4"
integrity sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==
jest-get-type@^24.9.0:
version "24.9.0"
resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e"
@@ -16395,15 +16381,6 @@ jest-leak-detector@^26.6.2:
jest-get-type "^26.3.0"
pretty-format "^26.6.2"
jest-matcher-utils@^22.0.0:
version "22.4.3"
resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz#4632fe428ebc73ebc194d3c7b65d37b161f710ff"
integrity sha512-lsEHVaTnKzdAPR5t4B6OcxXo9Vy4K+kRRbG5gtddY8lBEC+Mlpvm1CJcsMESRjzUhzkz568exMV1hTB76nAKbA==
dependencies:
chalk "^2.0.1"
jest-get-type "^22.4.3"
pretty-format "^22.4.3"
jest-matcher-utils@^24.9.0:
version "24.9.0"
resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073"
@@ -20994,14 +20971,6 @@ pretty-error@^2.1.1:
renderkid "^2.0.1"
utila "~0.4"
pretty-format@^22.4.3:
version "22.4.3"
resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f"
integrity sha512-S4oT9/sT6MN7/3COoOy+ZJeA92VmOnveLHgrwBE3Z1W5N9S2A1QGNYiE1z75DAENbJrXXUb+OWXhpJcg05QKQQ==
dependencies:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"
pretty-format@^24.9.0:
version "24.9.0"
resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9"