createSpanLink.test.ts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. import { DataSourceInstanceSettings, MutableDataFrame } from '@grafana/data';
  2. import { setDataSourceSrv, setTemplateSrv } from '@grafana/runtime';
  3. import { TraceSpan } from '@jaegertracing/jaeger-ui-components';
  4. import { TraceToMetricsOptions } from 'app/core/components/TraceToMetrics/TraceToMetricsSettings';
  5. import { DatasourceSrv } from 'app/features/plugins/datasource_srv';
  6. import { TraceToLogsOptions } from '../../../core/components/TraceToLogs/TraceToLogsSettings';
  7. import { LinkSrv, setLinkSrv } from '../../panel/panellinks/link_srv';
  8. import { TemplateSrv } from '../../templating/template_srv';
  9. import { createSpanLinkFactory } from './createSpanLink';
  10. describe('createSpanLinkFactory', () => {
  11. it('returns no links if there is no data source uid', () => {
  12. const splitOpenFn = jest.fn();
  13. const createLink = createSpanLinkFactory({ splitOpenFn: splitOpenFn });
  14. const links = createLink!(createTraceSpan());
  15. expect(links?.logLinks).toBeUndefined();
  16. expect(links?.metricLinks).toBeUndefined();
  17. expect(links?.traceLinks).toHaveLength(0);
  18. });
  19. describe('should return loki link', () => {
  20. beforeAll(() => {
  21. setDataSourceSrv({
  22. getInstanceSettings(uid: string): DataSourceInstanceSettings | undefined {
  23. return { uid: 'loki1', name: 'loki1', type: 'loki' } as any;
  24. },
  25. } as any);
  26. setLinkSrv(new LinkSrv());
  27. setTemplateSrv(new TemplateSrv());
  28. });
  29. it('with default keys when tags not configured', () => {
  30. const createLink = setupSpanLinkFactory();
  31. expect(createLink).toBeDefined();
  32. const links = createLink!(createTraceSpan());
  33. const linkDef = links?.logLinks?.[0];
  34. expect(linkDef).toBeDefined();
  35. expect(linkDef!.href).toBe(
  36. `/explore?left=${encodeURIComponent(
  37. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"loki1","queries":[{"expr":"{cluster=\\"cluster1\\", hostname=\\"hostname1\\"}","refId":""}],"panelsState":{}}'
  38. )}`
  39. );
  40. });
  41. it('with tags that passed in and without tags that are not in the span', () => {
  42. const createLink = setupSpanLinkFactory({
  43. tags: ['ip', 'newTag'],
  44. });
  45. expect(createLink).toBeDefined();
  46. const links = createLink!(
  47. createTraceSpan({
  48. process: {
  49. serviceName: 'service',
  50. tags: [
  51. { key: 'hostname', value: 'hostname1' },
  52. { key: 'ip', value: '192.168.0.1' },
  53. ],
  54. },
  55. })
  56. );
  57. const linkDef = links?.logLinks?.[0];
  58. expect(linkDef).toBeDefined();
  59. expect(linkDef!.href).toBe(
  60. `/explore?left=${encodeURIComponent(
  61. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"loki1","queries":[{"expr":"{ip=\\"192.168.0.1\\"}","refId":""}],"panelsState":{}}'
  62. )}`
  63. );
  64. });
  65. it('from tags and process tags as well', () => {
  66. const createLink = setupSpanLinkFactory({
  67. tags: ['ip', 'host'],
  68. });
  69. expect(createLink).toBeDefined();
  70. const links = createLink!(
  71. createTraceSpan({
  72. process: {
  73. serviceName: 'service',
  74. tags: [
  75. { key: 'hostname', value: 'hostname1' },
  76. { key: 'ip', value: '192.168.0.1' },
  77. ],
  78. },
  79. })
  80. );
  81. const linkDef = links?.logLinks?.[0];
  82. expect(linkDef).toBeDefined();
  83. expect(linkDef!.href).toBe(
  84. `/explore?left=${encodeURIComponent(
  85. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"loki1","queries":[{"expr":"{ip=\\"192.168.0.1\\", host=\\"host\\"}","refId":""}],"panelsState":{}}'
  86. )}`
  87. );
  88. });
  89. it('with adjusted start and end time', () => {
  90. const createLink = setupSpanLinkFactory({
  91. spanStartTimeShift: '1m',
  92. spanEndTimeShift: '1m',
  93. });
  94. expect(createLink).toBeDefined();
  95. const links = createLink!(
  96. createTraceSpan({
  97. process: {
  98. serviceName: 'service',
  99. tags: [
  100. { key: 'hostname', value: 'hostname1' },
  101. { key: 'ip', value: '192.168.0.1' },
  102. ],
  103. },
  104. })
  105. );
  106. const linkDef = links?.logLinks?.[0];
  107. expect(linkDef).toBeDefined();
  108. expect(linkDef!.href).toBe(
  109. `/explore?left=${encodeURIComponent(
  110. '{"range":{"from":"2020-10-14T01:01:00.000Z","to":"2020-10-14T01:01:01.000Z"},"datasource":"loki1","queries":[{"expr":"{hostname=\\"hostname1\\"}","refId":""}],"panelsState":{}}'
  111. )}`
  112. );
  113. });
  114. it('filters by trace and span ID', () => {
  115. const createLink = setupSpanLinkFactory({
  116. filterBySpanID: true,
  117. filterByTraceID: true,
  118. });
  119. expect(createLink).toBeDefined();
  120. const links = createLink!(createTraceSpan());
  121. const linkDef = links?.logLinks?.[0];
  122. expect(linkDef).toBeDefined();
  123. expect(linkDef!.href).toBe(
  124. `/explore?left=${encodeURIComponent(
  125. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"loki1","queries":[{"expr":"{cluster=\\"cluster1\\", hostname=\\"hostname1\\"} |=\\"7946b05c2e2e4e5a\\" |=\\"6605c7b08e715d6c\\"","refId":""}],"panelsState":{}}'
  126. )}`
  127. );
  128. });
  129. it('creates link from dataFrame', () => {
  130. const splitOpenFn = jest.fn();
  131. const createLink = createSpanLinkFactory({
  132. splitOpenFn,
  133. dataFrame: new MutableDataFrame({
  134. fields: [
  135. { name: 'traceID', values: ['testTraceId'] },
  136. {
  137. name: 'spanID',
  138. config: { links: [{ title: 'link', url: '${__data.fields.spanID}' }] },
  139. values: ['testSpanId'],
  140. },
  141. ],
  142. }),
  143. });
  144. expect(createLink).toBeDefined();
  145. const links = createLink!(createTraceSpan());
  146. const linkDef = links?.logLinks?.[0];
  147. expect(linkDef).toBeDefined();
  148. expect(linkDef!.href).toBe('testSpanId');
  149. });
  150. it('handles renamed tags', () => {
  151. const createLink = setupSpanLinkFactory({
  152. mapTagNamesEnabled: true,
  153. mappedTags: [
  154. { key: 'service.name', value: 'service' },
  155. { key: 'k8s.pod.name', value: 'pod' },
  156. ],
  157. });
  158. expect(createLink).toBeDefined();
  159. const links = createLink!(
  160. createTraceSpan({
  161. process: {
  162. serviceName: 'service',
  163. tags: [
  164. { key: 'service.name', value: 'serviceName' },
  165. { key: 'k8s.pod.name', value: 'podName' },
  166. ],
  167. },
  168. })
  169. );
  170. const linkDef = links?.logLinks?.[0];
  171. expect(linkDef).toBeDefined();
  172. expect(linkDef!.href).toBe(
  173. `/explore?left=${encodeURIComponent(
  174. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"loki1","queries":[{"expr":"{service=\\"serviceName\\", pod=\\"podName\\"}","refId":""}],"panelsState":{}}'
  175. )}`
  176. );
  177. });
  178. it('handles incomplete renamed tags', () => {
  179. const createLink = setupSpanLinkFactory({
  180. mapTagNamesEnabled: true,
  181. mappedTags: [
  182. { key: 'service.name', value: '' },
  183. { key: 'k8s.pod.name', value: 'pod' },
  184. ],
  185. });
  186. expect(createLink).toBeDefined();
  187. const links = createLink!(
  188. createTraceSpan({
  189. process: {
  190. serviceName: 'service',
  191. tags: [
  192. { key: 'service.name', value: 'serviceName' },
  193. { key: 'k8s.pod.name', value: 'podName' },
  194. ],
  195. },
  196. })
  197. );
  198. const linkDef = links?.logLinks?.[0];
  199. expect(linkDef).toBeDefined();
  200. expect(linkDef!.href).toBe(
  201. `/explore?left=${encodeURIComponent(
  202. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"loki1","queries":[{"expr":"{service.name=\\"serviceName\\", pod=\\"podName\\"}","refId":""}],"panelsState":{}}'
  203. )}`
  204. );
  205. });
  206. it('handles empty queries', () => {
  207. const createLink = setupSpanLinkFactory({
  208. tags: [],
  209. });
  210. expect(createLink).toBeDefined();
  211. const links = createLink!(
  212. createTraceSpan({
  213. process: {
  214. serviceName: 'service',
  215. tags: [
  216. { key: 'service.name', value: 'serviceName' },
  217. { key: 'k8s.pod.name', value: 'podName' },
  218. ],
  219. },
  220. })
  221. );
  222. expect(links?.logLinks).toBeUndefined();
  223. });
  224. });
  225. describe('should return splunk link', () => {
  226. const splunkUID = 'splunkUID';
  227. beforeAll(() => {
  228. setDataSourceSrv({
  229. getInstanceSettings(uid: string): DataSourceInstanceSettings | undefined {
  230. return { uid: splunkUID, name: 'Splunk 8', type: 'grafana-splunk-datasource' } as any;
  231. },
  232. } as any);
  233. setLinkSrv(new LinkSrv());
  234. setTemplateSrv(new TemplateSrv());
  235. });
  236. it('the `query` keyword is used in the link rather than `expr` that loki uses', () => {
  237. const createLink = setupSpanLinkFactory({
  238. datasourceUid: splunkUID,
  239. });
  240. const links = createLink!(createTraceSpan());
  241. const linkDef = links?.logLinks?.[0];
  242. expect(linkDef).toBeDefined();
  243. expect(linkDef!.href).toContain(`${encodeURIComponent('datasource":"Splunk 8","queries":[{"query"')}`);
  244. expect(linkDef!.href).not.toContain(`${encodeURIComponent('datasource":"Splunk 8","queries":[{"expr"')}`);
  245. });
  246. it('automatically timeshifts the timerange by one second in a splunk query', () => {
  247. const createLink = setupSpanLinkFactory({
  248. datasourceUid: splunkUID,
  249. });
  250. const links = createLink!(createTraceSpan());
  251. const linkDef = links?.logLinks?.[0];
  252. expect(linkDef).toBeDefined();
  253. expect(linkDef!.href).toContain(
  254. `${encodeURIComponent('{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"}')}`
  255. );
  256. expect(linkDef!.href).not.toContain(
  257. `${encodeURIComponent('{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:00.000Z"}')}`
  258. );
  259. });
  260. it('formats query correctly if filterByTraceID and or filterBySpanID is true', () => {
  261. const createLink = setupSpanLinkFactory({
  262. datasourceUid: splunkUID,
  263. filterByTraceID: true,
  264. filterBySpanID: true,
  265. });
  266. expect(createLink).toBeDefined();
  267. const links = createLink!(createTraceSpan());
  268. const linkDef = links?.logLinks?.[0];
  269. expect(linkDef).toBeDefined();
  270. expect(linkDef!.href).toBe(
  271. `/explore?left=${encodeURIComponent(
  272. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"Splunk 8","queries":[{"query":"cluster=\\"cluster1\\" hostname=\\"hostname1\\" \\"7946b05c2e2e4e5a\\" \\"6605c7b08e715d6c\\"","refId":""}],"panelsState":{}}'
  273. )}`
  274. );
  275. });
  276. it('should format one tag correctly', () => {
  277. const createLink = setupSpanLinkFactory({
  278. tags: ['ip'],
  279. });
  280. expect(createLink).toBeDefined();
  281. const links = createLink!(
  282. createTraceSpan({
  283. process: {
  284. serviceName: 'service',
  285. tags: [{ key: 'ip', value: '192.168.0.1' }],
  286. },
  287. })
  288. );
  289. const linkDef = links?.logLinks?.[0];
  290. expect(linkDef).toBeDefined();
  291. expect(linkDef!.href).toBe(
  292. `/explore?left=${encodeURIComponent(
  293. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"Splunk 8","queries":[{"query":"ip=\\"192.168.0.1\\"","refId":""}],"panelsState":{}}'
  294. )}`
  295. );
  296. });
  297. it('should format multiple tags correctly', () => {
  298. const createLink = setupSpanLinkFactory({
  299. tags: ['ip', 'hostname'],
  300. });
  301. expect(createLink).toBeDefined();
  302. const links = createLink!(
  303. createTraceSpan({
  304. process: {
  305. serviceName: 'service',
  306. tags: [
  307. { key: 'hostname', value: 'hostname1' },
  308. { key: 'ip', value: '192.168.0.1' },
  309. ],
  310. },
  311. })
  312. );
  313. const linkDef = links?.logLinks?.[0];
  314. expect(linkDef).toBeDefined();
  315. expect(linkDef!.href).toBe(
  316. `/explore?left=${encodeURIComponent(
  317. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"Splunk 8","queries":[{"query":"hostname=\\"hostname1\\" ip=\\"192.168.0.1\\"","refId":""}],"panelsState":{}}'
  318. )}`
  319. );
  320. });
  321. it('handles renamed tags', () => {
  322. const createLink = setupSpanLinkFactory({
  323. mapTagNamesEnabled: true,
  324. mappedTags: [
  325. { key: 'service.name', value: 'service' },
  326. { key: 'k8s.pod.name', value: 'pod' },
  327. ],
  328. });
  329. expect(createLink).toBeDefined();
  330. const links = createLink!(
  331. createTraceSpan({
  332. process: {
  333. serviceName: 'service',
  334. tags: [
  335. { key: 'service.name', value: 'serviceName' },
  336. { key: 'k8s.pod.name', value: 'podName' },
  337. ],
  338. },
  339. })
  340. );
  341. const linkDef = links?.logLinks?.[0];
  342. expect(linkDef).toBeDefined();
  343. expect(linkDef!.href).toBe(
  344. `/explore?left=${encodeURIComponent(
  345. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"Splunk 8","queries":[{"query":"service=\\"serviceName\\" pod=\\"podName\\"","refId":""}],"panelsState":{}}'
  346. )}`
  347. );
  348. });
  349. });
  350. describe('should return metric link', () => {
  351. beforeAll(() => {
  352. setDataSourceSrv({
  353. getInstanceSettings(uid: string): DataSourceInstanceSettings | undefined {
  354. return { uid: 'prom1', name: 'prom1', type: 'prometheus' } as any;
  355. },
  356. } as any);
  357. setLinkSrv(new LinkSrv());
  358. setTemplateSrv(new TemplateSrv());
  359. });
  360. it('returns single query with span', () => {
  361. const splitOpenFn = jest.fn();
  362. const createLink = createSpanLinkFactory({
  363. splitOpenFn,
  364. traceToMetricsOptions: {
  365. datasourceUid: 'prom1',
  366. queries: [{ query: 'customQuery' }],
  367. },
  368. });
  369. expect(createLink).toBeDefined();
  370. const links = createLink!(createTraceSpan());
  371. const linkDef = links?.metricLinks?.[0];
  372. expect(linkDef).toBeDefined();
  373. expect(linkDef!.href).toBe(
  374. `/explore?left=${encodeURIComponent(
  375. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"prom1","queries":[{"expr":"customQuery","refId":"A"}],"panelsState":{}}'
  376. )}`
  377. );
  378. });
  379. it('returns nothing if no queries specified', () => {
  380. const splitOpenFn = jest.fn();
  381. const createLink = createSpanLinkFactory({
  382. splitOpenFn,
  383. traceToMetricsOptions: {
  384. datasourceUid: 'prom1',
  385. } as TraceToMetricsOptions,
  386. });
  387. expect(createLink).toBeDefined();
  388. const links = createLink!(createTraceSpan());
  389. expect(links?.metricLinks).toBeUndefined();
  390. });
  391. it('returns multiple queries including default', () => {
  392. const splitOpenFn = jest.fn();
  393. const createLink = createSpanLinkFactory({
  394. splitOpenFn,
  395. traceToMetricsOptions: {
  396. datasourceUid: 'prom1',
  397. queries: [
  398. { name: 'Named Query', query: 'customQuery' },
  399. { name: 'defaultQuery', query: '' },
  400. { query: 'no_name_here' },
  401. ],
  402. } as TraceToMetricsOptions,
  403. });
  404. expect(createLink).toBeDefined();
  405. const links = createLink!(createTraceSpan());
  406. expect(links?.metricLinks).toBeDefined();
  407. expect(links?.metricLinks).toHaveLength(3);
  408. const namedLink = links?.metricLinks?.[0];
  409. expect(namedLink).toBeDefined();
  410. expect(namedLink!.title).toBe('Named Query');
  411. expect(namedLink!.href).toBe(
  412. `/explore?left=${encodeURIComponent(
  413. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"prom1","queries":[{"expr":"customQuery","refId":"A"}],"panelsState":{}}'
  414. )}`
  415. );
  416. const defaultLink = links?.metricLinks?.[1];
  417. expect(defaultLink).toBeDefined();
  418. expect(defaultLink!.title).toBe('defaultQuery');
  419. expect(defaultLink!.href).toBe(
  420. `/explore?left=${encodeURIComponent(
  421. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"prom1","queries":[{"expr":"histogram_quantile(0.5, sum(rate(tempo_spanmetrics_latency_bucket{operation=\\"operation\\"}[5m])) by (le))","refId":"A"}],"panelsState":{}}'
  422. )}`
  423. );
  424. const unnamedQuery = links?.metricLinks?.[2];
  425. expect(unnamedQuery).toBeDefined();
  426. expect(unnamedQuery!.title).toBeUndefined();
  427. expect(unnamedQuery!.href).toBe(
  428. `/explore?left=${encodeURIComponent(
  429. '{"range":{"from":"2020-10-14T01:00:00.000Z","to":"2020-10-14T01:00:01.000Z"},"datasource":"prom1","queries":[{"expr":"no_name_here","refId":"A"}],"panelsState":{}}'
  430. )}`
  431. );
  432. });
  433. });
  434. describe('should return span links', () => {
  435. beforeAll(() => {
  436. setDataSourceSrv(new DatasourceSrv());
  437. setLinkSrv(new LinkSrv());
  438. setTemplateSrv(new TemplateSrv());
  439. });
  440. it('ignores parent span link', () => {
  441. const createLink = setupSpanLinkFactory();
  442. expect(createLink).toBeDefined();
  443. const links = createLink!(
  444. createTraceSpan({ references: [{ refType: 'CHILD_OF', spanID: 'parent', traceID: 'traceID' }] })
  445. );
  446. const traceLinks = links?.traceLinks;
  447. expect(traceLinks).toBeDefined();
  448. expect(traceLinks).toHaveLength(0);
  449. });
  450. it('returns links for references and subsidiarilyReferencedBy references', () => {
  451. const createLink = setupSpanLinkFactory();
  452. expect(createLink).toBeDefined();
  453. const links = createLink!(
  454. createTraceSpan({
  455. references: [
  456. {
  457. refType: 'FOLLOWS_FROM',
  458. spanID: 'span1',
  459. traceID: 'traceID',
  460. span: { operationName: 'SpanName' } as any,
  461. },
  462. ],
  463. subsidiarilyReferencedBy: [{ refType: 'FOLLOWS_FROM', spanID: 'span3', traceID: 'traceID2' }],
  464. })
  465. );
  466. const traceLinks = links?.traceLinks;
  467. expect(traceLinks).toBeDefined();
  468. expect(traceLinks).toHaveLength(2);
  469. expect(traceLinks![0]).toEqual(
  470. expect.objectContaining({
  471. href: 'traceID-span1',
  472. title: 'SpanName',
  473. })
  474. );
  475. expect(traceLinks![1]).toEqual(
  476. expect.objectContaining({
  477. href: 'traceID2-span3',
  478. title: 'View linked span',
  479. })
  480. );
  481. });
  482. });
  483. });
  484. function setupSpanLinkFactory(options: Partial<TraceToLogsOptions> = {}, datasourceUid = 'lokiUid') {
  485. const splitOpenFn = jest.fn();
  486. return createSpanLinkFactory({
  487. splitOpenFn,
  488. traceToLogsOptions: {
  489. datasourceUid,
  490. ...options,
  491. },
  492. createFocusSpanLink: (traceId, spanId) => {
  493. return {
  494. href: `${traceId}-${spanId}`,
  495. } as any;
  496. },
  497. });
  498. }
  499. function createTraceSpan(overrides: Partial<TraceSpan> = {}): TraceSpan {
  500. return {
  501. spanID: '6605c7b08e715d6c',
  502. traceID: '7946b05c2e2e4e5a',
  503. processID: 'processId',
  504. operationName: 'operation',
  505. logs: [],
  506. startTime: new Date('2020-10-14T01:00:00Z').valueOf() * 1000,
  507. duration: 1000 * 1000,
  508. flags: 0,
  509. hasChildren: false,
  510. dataFrameRowIndex: 0,
  511. tags: [
  512. {
  513. key: 'host',
  514. value: 'host',
  515. },
  516. ],
  517. process: {
  518. serviceName: 'test service',
  519. tags: [
  520. {
  521. key: 'cluster',
  522. value: 'cluster1',
  523. },
  524. {
  525. key: 'hostname',
  526. value: 'hostname1',
  527. },
  528. {
  529. key: 'label2',
  530. value: 'val2',
  531. },
  532. ],
  533. },
  534. ...overrides,
  535. } as any;
  536. }