| 1 | import path from 'node:path'; |
| 2 | import { createDatabase, type |
| 3 | import { ConfigService } |
| 4 | import type { AuthService |
| 5 | import { and, eq |
| 6 | import { migrate } |
| 7 | import { |
| 8 | afterAll, |
| 9 | afterEach, |
| 10 | beforeAll, |
| 11 | beforeEach, |
| 12 | describe, |
| 13 | expect, |
| 14 | it, |
| 15 | vi, |
| 16 | } from 'vitest'; |
| 17 | |
| 18 | import type { Auth |
| 19 | import { |
| 20 | GitHubImportsDisabledError, |
| 21 | GitHubNotConnectedError, |
| 22 | ImportNotFailedError, |
| 23 | ImportNotFoundError, |
| 24 | ImportRetryWouldOverwriteError, |
| 25 | RepositoryImportingError, |
| 26 | StaleImportAttemptError, |
| 27 | } from '../../lib/imports/imports.errors.js'; |
| 28 | import { assertNotImporting } |
| 29 | import { ImportsService } |
| 30 | import type { RepositoriesService |
| 31 | import { RepositoryAccessService } |
| 32 | import { ImportDispatcherService } |
| 33 | import { ImportWriterService } |
| 34 | import { MAX_IMPORT_ATTEMPTS } |
| 35 | |
| 36 | const CONNECTION = process |
| 37 | const MIGRATIONS = path |
| 38 | import.meta.dirname, |
| 39 | '../../../../../packages/db/drizzle', |
| 40 | ); |
| 41 | |
| 42 | const OWNER = ' |
| 43 | const STRANGER = ' |
| 44 | const CONFIGURED = new |
| 45 | IMPORTER_URL: 'http://importer:3004', |
| 46 | IMPORTER_SECRET: 'secret', |
| 47 | GITHUB_CLIENT_ID: 'id', |
| 48 | GITHUB_CLIENT_SECRET: 'client-secret', |
| 49 | }); |
| 50 | |
| 51 | const issue = { |
| 52 | number: 3, |
| 53 | title: 'Crash on start', |
| 54 | body: 'It crashes', |
| 55 | authorLogin: 'octocat', |
| 56 | state: 'closed' as |
| 57 | createdAt: '2024-01-01T00:00:00.000Z', |
| 58 | updatedAt: '2024-01-03T00:00:00.000Z', |
| 59 | closedAt: '2024-01-02T00:00:00.000Z', |
| 60 | labels: [{ name: |
| 61 | }; |
| 62 | |
| 63 | const pullRequest = { |
| 64 | state: 'merged' as |
| 65 | draft: false, |
| 66 | baseRef: 'main', |
| 67 | headRef: 'fix', |
| 68 | headSha: 'b'.repeat |
| 69 | headInRepository: false, |
| 70 | mergeCommitSha: 'a'.repeat |
| 71 | mergedAt: '2024-01-02T00:00:00.000Z', |
| 72 | }; |
| 73 | |
| 74 | // Needs a throwaway Postgres; the suite is skipped without one. |
| 75 | describe.skipIf(!CONNECTION |
| 76 | let db: |
| 77 | let pool: |
| 78 | let dispatcher: |
| 79 | let writer: |
| 80 | let imports: |
| 81 | let repositoryId: |
| 82 | let importer: |
| 83 | let keys = |
| 84 | |
| 85 | const auth = |
| 86 | api: { |
| 87 | createApiKey: vi.fn |
| 88 | const id = |
| 89 | await db.insert |
| 90 | id, |
| 91 | referenceId: body.userId |
| 92 | key: `hashed-${id |
| 93 | createdAt: new Date |
| 94 | updatedAt: new Date |
| 95 | }); |
| 96 | return { id, |
| 97 | }), |
| 98 | getAccessToken: vi.fn |
| 99 | }, |
| 100 | } as unknown as |
| 101 | |
| 102 | async function startImport |
| 103 | values: Partial |
| 104 | ) { |
| 105 | const [row] |
| 106 | .insert(schema.repositoryImport |
| 107 | .values({ |
| 108 | repositoryId, |
| 109 | requestedById: OWNER, |
| 110 | source: 'octo/repo', |
| 111 | ...values, |
| 112 | }) |
| 113 | .returning(); |
| 114 | return row; |
| 115 | } |
| 116 | |
| 117 | async function importRow |
| 118 | const [row] |
| 119 | .select() |
| 120 | .from(schema.repositoryImport |
| 121 | .where(eq(schema |
| 122 | return row; |
| 123 | } |
| 124 | |
| 125 | async function keyExists |
| 126 | if (!id) |
| 127 | const rows = |
| 128 | .select() |
| 129 | .from(schema.apikey |
| 130 | .where(eq(schema |
| 131 | return rows.length |
| 132 | } |
| 133 | |
| 134 | beforeAll(async () |
| 135 | ({ db, pool |
| 136 | await migrate(db |
| 137 | }); |
| 138 | |
| 139 | beforeEach(async () |
| 140 | await db |
| 141 | .delete(schema.user |
| 142 | .where(inArray(schema |
| 143 | await db.insert |
| 144 | { |
| 145 | id: OWNER, |
| 146 | name: 'Owner', |
| 147 | email: 'import-owner@example.com', |
| 148 | username: 'import_owner', |
| 149 | }, |
| 150 | { |
| 151 | id: STRANGER, |
| 152 | name: 'Stranger', |
| 153 | email: 'import-stranger@example.com', |
| 154 | username: 'import_stranger', |
| 155 | }, |
| 156 | ]); |
| 157 | await db.insert |
| 158 | { |
| 159 | id: 'account_import_owner', |
| 160 | accountId: '1', |
| 161 | providerId: 'github', |
| 162 | userId: OWNER, |
| 163 | scope: 'read:user,user:email,repo', |
| 164 | updatedAt: new Date |
| 165 | }, |
| 166 | // Signed in with GitHub, which never asks for `repo`. |
| 167 | { |
| 168 | id: 'account_import_stranger', |
| 169 | accountId: '2', |
| 170 | providerId: 'github', |
| 171 | userId: STRANGER, |
| 172 | scope: 'read:user,user:email', |
| 173 | updatedAt: new Date |
| 174 | }, |
| 175 | ]); |
| 176 | const [repository] |
| 177 | .insert(schema.repository |
| 178 | .values({ |
| 179 | name: 'repo', |
| 180 | slug: 'repo', |
| 181 | ownerId: OWNER, |
| 182 | visibility: 'public', |
| 183 | }) |
| 184 | .returning(); |
| 185 | repositoryId = repository. |
| 186 | |
| 187 | importer = vi. |
| 188 | vi.stubGlobal('fetch |
| 189 | dispatcher = new |
| 190 | writer = new |
| 191 | imports = new |
| 192 | db, |
| 193 | CONFIGURED, |
| 194 | auth, |
| 195 | { |
| 196 | createRepository: async () |
| 197 | } as unknown as |
| 198 | new RepositoryAccessService(db |
| 199 | dispatcher, |
| 200 | ); |
| 201 | }); |
| 202 | |
| 203 | afterEach(async () |
| 204 | await dispatcher.onApplicationShutdown |
| 205 | vi.unstubAllGlobals(); |
| 206 | await db.delete |
| 207 | }); |
| 208 | |
| 209 | afterAll(async () |
| 210 | await db |
| 211 | .delete(schema.user |
| 212 | .where(inArray(schema |
| 213 | await pool.end |
| 214 | }); |
| 215 | |
| 216 | describe('dispatching', |
| 217 | it('hands a pending import to the importer with a fresh push key', |
| 218 | await startImport(); |
| 219 | expect(await dispatcher |
| 220 | |
| 221 | const row = |
| 222 | expect(row).toMatchObject |
| 223 | expect(await keyExists |
| 224 | const job = |
| 225 | expect(job).toEqual |
| 226 | importId: row.id |
| 227 | attempt: row.claimToken |
| 228 | source: 'octo/repo', |
| 229 | destination: 'import_owner/repo', |
| 230 | githubToken: 'gh-token', |
| 231 | ghostToken: `ghost_pat_${row |
| 232 | lastAttempt: false, |
| 233 | }); |
| 234 | }); |
| 235 | |
| 236 | it('puts a refused job back with backoff and drops its key', |
| 237 | importer.mockResolvedValue(new |
| 238 | await startImport(); |
| 239 | await dispatcher.tick |
| 240 | |
| 241 | const row = |
| 242 | expect(row).toMatchObject |
| 243 | status: 'pending', |
| 244 | attempts: 1, |
| 245 | apiKeyId: null, |
| 246 | lastError: 'The import could not be started', |
| 247 | }); |
| 248 | expect(row.nextAttemptAt |
| 249 | Date.now() - |
| 250 | ); |
| 251 | expect( |
| 252 | await db |
| 253 | .select() |
| 254 | .from(schema.apikey |
| 255 | .where(eq(schema |
| 256 | ).toEqual([]); |
| 257 | }); |
| 258 | |
| 259 | it('retries an attempt whose importer went silent, with a new token and key', |
| 260 | await startImport(); |
| 261 | await dispatcher.tick |
| 262 | const first = |
| 263 | await db |
| 264 | .update(schema.repositoryImport |
| 265 | .set({ leaseUntil: |
| 266 | .where(eq(schema |
| 267 | |
| 268 | await dispatcher.tick |
| 269 | const second = |
| 270 | expect(second).toMatchObject |
| 271 | status: 'running', |
| 272 | attempts: 2, |
| 273 | lastError: 'The importer stopped responding', |
| 274 | }); |
| 275 | expect(second.claimToken |
| 276 | expect(await keyExists |
| 277 | expect(await keyExists |
| 278 | await expect( |
| 279 | dispatcher.renewLease(first |
| 280 | ).rejects.toBeInstanceOf( |
| 281 | }); |
| 282 | |
| 283 | it('fails a silent attempt that used the last try', |
| 284 | await startImport(); |
| 285 | await dispatcher.tick |
| 286 | const row = |
| 287 | await db |
| 288 | .update(schema.repositoryImport |
| 289 | .set({ |
| 290 | attempts: MAX_IMPORT_ATTEMPTS, |
| 291 | leaseUntil: sql`now() - interval '1 second'` |
| 292 | }) |
| 293 | .where(eq(schema |
| 294 | |
| 295 | expect(await dispatcher |
| 296 | expect(await importRow |
| 297 | status: 'failed', |
| 298 | apiKeyId: null, |
| 299 | lastError: 'The importer stopped responding', |
| 300 | }); |
| 301 | expect(await keyExists |
| 302 | }); |
| 303 | |
| 304 | it('fails without retrying when the GitHub account is gone', |
| 305 | await db.delete |
| 306 | await startImport(); |
| 307 | await dispatcher.tick |
| 308 | expect((await importRow |
| 309 | expect(importer).not |
| 310 | }); |
| 311 | |
| 312 | it('has nothing to do without imports', |
| 313 | expect(await dispatcher |
| 314 | }); |
| 315 | }); |
| 316 | |
| 317 | describe('callbacks', |
| 318 | async function running |
| 319 | await startImport(); |
| 320 | await dispatcher.tick |
| 321 | return importRow(); |
| 322 | } |
| 323 | |
| 324 | it('renews the lease of the current attempt', |
| 325 | const row = |
| 326 | await db |
| 327 | .update(schema.repositoryImport |
| 328 | .set({ leaseUntil: |
| 329 | .where(eq(schema |
| 330 | expect(await dispatcher |
| 331 | repositoryId, |
| 332 | ); |
| 333 | expect((await importRow |
| 334 | Date.now() + |
| 335 | ); |
| 336 | }); |
| 337 | |
| 338 | it('records success, the default branch, and drops the key', |
| 339 | const row = |
| 340 | await dispatcher.settle |
| 341 | succeeded: true, |
| 342 | defaultBranch: 'trunk', |
| 343 | }); |
| 344 | expect(await importRow |
| 345 | status: 'succeeded', |
| 346 | apiKeyId: null, |
| 347 | }); |
| 348 | expect(await keyExists |
| 349 | const [repository] |
| 350 | .select() |
| 351 | .from(schema.repository |
| 352 | .where(eq(schema |
| 353 | expect(repository.defaultBranch |
| 354 | await expect( |
| 355 | dispatcher.settle(row |
| 356 | succeeded: true, |
| 357 | defaultBranch: null, |
| 358 | }), |
| 359 | ).rejects.toBeInstanceOf( |
| 360 | }); |
| 361 | |
| 362 | it('retries a retryable failure and fails a permanent one', |
| 363 | const row = |
| 364 | await dispatcher.settle |
| 365 | succeeded: false, |
| 366 | error: 'GitHub hiccup', |
| 367 | retryable: true, |
| 368 | }); |
| 369 | expect(await importRow |
| 370 | status: 'pending', |
| 371 | lastError: 'GitHub hiccup', |
| 372 | }); |
| 373 | |
| 374 | await db |
| 375 | .update(schema.repositoryImport |
| 376 | .set({ nextAttemptAt: |
| 377 | .where(eq(schema |
| 378 | await dispatcher.tick |
| 379 | const next = |
| 380 | await dispatcher.settle |
| 381 | succeeded: false, |
| 382 | error: 'Repository not found', |
| 383 | retryable: false, |
| 384 | }); |
| 385 | expect(await importRow |
| 386 | status: 'failed', |
| 387 | lastError: 'Repository not found', |
| 388 | }); |
| 389 | }); |
| 390 | |
| 391 | it('fails a retryable failure once attempts run out', |
| 392 | const row = |
| 393 | await db |
| 394 | .update(schema.repositoryImport |
| 395 | .set({ attempts: |
| 396 | .where(eq(schema |
| 397 | await dispatcher.settle |
| 398 | succeeded: false, |
| 399 | error: 'Still broken', |
| 400 | retryable: true, |
| 401 | }); |
| 402 | expect((await importRow |
| 403 | }); |
| 404 | }); |
| 405 | |
| 406 | describe('writing', |
| 407 | it('upserts releases by tag', |
| 408 | const release = |
| 409 | tagName: 'v1', |
| 410 | name: 'One', |
| 411 | body: null, |
| 412 | isDraft: false, |
| 413 | isPrerelease: false, |
| 414 | createdAt: '2024-01-01T00:00:00.000Z', |
| 415 | publishedAt: '2024-01-01T00:00:00.000Z', |
| 416 | }; |
| 417 | await writer.writeReleases |
| 418 | await writer.writeReleases |
| 419 | { ...release, |
| 420 | ]); |
| 421 | await writer.writeReleases |
| 422 | |
| 423 | const rows = |
| 424 | .select() |
| 425 | .from(schema.release |
| 426 | .where(eq(schema |
| 427 | expect(rows).toHaveLength |
| 428 | expect(rows[0]) |
| 429 | name: 'One, again', |
| 430 | authorId: schema.IMPORTER_USER_ID |
| 431 | }); |
| 432 | }); |
| 433 | |
| 434 | it('keeps numbers, credits authors and attaches pull requests', |
| 435 | await writer.writeIssues |
| 436 | issue, |
| 437 | { ...issue, |
| 438 | { |
| 439 | ...issue, |
| 440 | number: 6, |
| 441 | state: 'open', |
| 442 | closedAt: null, |
| 443 | labels: [], |
| 444 | pullRequest: { |
| 445 | ...pullRequest, |
| 446 | state: 'open', |
| 447 | mergeCommitSha: null, |
| 448 | mergedAt: null, |
| 449 | }, |
| 450 | }, |
| 451 | ]); |
| 452 | |
| 453 | const rows = |
| 454 | .select() |
| 455 | .from(schema.issue |
| 456 | .where(eq(schema |
| 457 | .orderBy(schema.issue |
| 458 | expect( |
| 459 | rows.map((row |
| 460 | ).toEqual([ |
| 461 | [3, 'closed', |
| 462 | [5, 'closed', |
| 463 | [6, 'closed', |
| 464 | ]); |
| 465 | expect(rows[0] |
| 466 | '_Opened by [@octocat](https://github.com/octocat) on GitHub._\n\nIt crashes', |
| 467 | ); |
| 468 | expect(rows[0] |
| 469 | expect(rows[2] |
| 470 | |
| 471 | const pulls = |
| 472 | .select() |
| 473 | .from(schema.pullRequest |
| 474 | .where(inArray(schema |
| 475 | expect(pulls.find |
| 476 | state: 'merged', |
| 477 | mergeCommitSha: 'a'.repeat |
| 478 | headRepositoryId: null, |
| 479 | }); |
| 480 | expect(pulls.find |
| 481 | 'closed', |
| 482 | ); |
| 483 | |
| 484 | const labels = |
| 485 | .select({ name: |
| 486 | .from(schema.issueLabel |
| 487 | .innerJoin(schema.label |
| 488 | .where(eq(schema |
| 489 | expect(labels).toEqual |
| 490 | }); |
| 491 | |
| 492 | it('keeps a same-repository head live', |
| 493 | await writer.writeIssues |
| 494 | { |
| 495 | ...issue, |
| 496 | state: 'open', |
| 497 | closedAt: null, |
| 498 | labels: [], |
| 499 | pullRequest: { |
| 500 | ...pullRequest, |
| 501 | state: 'open', |
| 502 | headInRepository: true, |
| 503 | mergeCommitSha: null, |
| 504 | mergedAt: null, |
| 505 | }, |
| 506 | }, |
| 507 | ]); |
| 508 | const [pull] |
| 509 | .select({ |
| 510 | state: schema.pullRequest |
| 511 | headRepositoryId: schema.pullRequest |
| 512 | }) |
| 513 | .from(schema.pullRequest |
| 514 | .innerJoin( |
| 515 | schema.issue, |
| 516 | eq(schema.issue |
| 517 | ) |
| 518 | .where(eq(schema |
| 519 | expect(pull).toEqual |
| 520 | }); |
| 521 | |
| 522 | it('deduplicates comment batches and starts over when the issue is sent again', |
| 523 | await writer.writeIssues |
| 524 | const comment = |
| 525 | githubId: 4_000_000_000, |
| 526 | issueNumber: 3, |
| 527 | authorLogin: 'hubot', |
| 528 | body: 'Same here', |
| 529 | createdAt: '2024-01-01T01:00:00.000Z', |
| 530 | updatedAt: '2024-01-01T01:00:00.000Z', |
| 531 | }; |
| 532 | await writer.writeComments |
| 533 | comment, |
| 534 | comment, |
| 535 | { ...comment, |
| 536 | { ...comment, |
| 537 | ]); |
| 538 | await writer.writeComments |
| 539 | await writer.writeComments |
| 540 | |
| 541 | const read = |
| 542 | const [row] |
| 543 | .select() |
| 544 | .from(schema.issue |
| 545 | .where( |
| 546 | and( |
| 547 | eq(schema.issue |
| 548 | eq(schema.issue |
| 549 | ), |
| 550 | ); |
| 551 | const comments = |
| 552 | .select() |
| 553 | .from(schema.issueComment |
| 554 | .where(eq(schema |
| 555 | return { row, |
| 556 | }; |
| 557 | |
| 558 | const before = |
| 559 | expect(before.comments |
| 560 | expect(before.comments |
| 561 | comment.githubId, |
| 562 | comment.githubId + |
| 563 | ]); |
| 564 | expect(before.row |
| 565 | expect(before.row |
| 566 | expect(before.comments |
| 567 | '_Posted by [@hubot](https://github.com/hubot) on GitHub._\n\nSame here', |
| 568 | ); |
| 569 | |
| 570 | await writer.writeIssues |
| 571 | const after = |
| 572 | expect(after.row |
| 573 | expect(after.comments |
| 574 | |
| 575 | await writer.writeComments |
| 576 | { ...comment, |
| 577 | ]); |
| 578 | expect((await read |
| 579 | }); |
| 580 | |
| 581 | it('writes nothing for an empty batch', |
| 582 | await writer.writeIssues |
| 583 | expect( |
| 584 | await db |
| 585 | .select() |
| 586 | .from(schema.issue |
| 587 | .where(eq(schema |
| 588 | ).toEqual([]); |
| 589 | }); |
| 590 | }); |
| 591 | |
| 592 | describe('the import flow', |
| 593 | const owner = |
| 594 | username: 'import_owner', |
| 595 | repo: 'repo', |
| 596 | requesterId: OWNER, |
| 597 | }; |
| 598 | |
| 599 | it('reports availability and the linked account', |
| 600 | expect(await imports |
| 601 | enabled: true, |
| 602 | connected: true, |
| 603 | }); |
| 604 | expect(await imports |
| 605 | enabled: true, |
| 606 | connected: false, |
| 607 | }); |
| 608 | }); |
| 609 | |
| 610 | it('lists repositories with the linked account only', |
| 611 | importer.mockResolvedValueOnce( |
| 612 | Response.json([ |
| 613 | { full_name: 'octo/repo', |
| 614 | ]), |
| 615 | ); |
| 616 | expect(await imports |
| 617 | repositories: [ |
| 618 | { fullName: 'octo/repo', |
| 619 | ], |
| 620 | }); |
| 621 | await expect(imports |
| 622 | GitHubNotConnectedError, |
| 623 | ); |
| 624 | }); |
| 625 | |
| 626 | it('starts an import for a readable repository', |
| 627 | importer.mockResolvedValueOnce(Response |
| 628 | await imports.start |
| 629 | expect(importer.mock |
| 630 | 'https://api.github.com/repos/octo/repo', |
| 631 | ); |
| 632 | expect((await importRow |
| 633 | await expect(assertNotImporting |
| 634 | RepositoryImportingError, |
| 635 | ); |
| 636 | }); |
| 637 | |
| 638 | it('refuses to start without configuration or a linked account', |
| 639 | const disabled = |
| 640 | db, |
| 641 | new ConfigService({}) |
| 642 | auth, |
| 643 | {} as RepositoriesService, |
| 644 | new RepositoryAccessService(db |
| 645 | dispatcher, |
| 646 | ); |
| 647 | await expect( |
| 648 | disabled.start({ |
| 649 | ).rejects.toBeInstanceOf( |
| 650 | await expect( |
| 651 | imports.start({ |
| 652 | ).rejects.toBeInstanceOf( |
| 653 | }); |
| 654 | |
| 655 | it('shows progress and retries a failed import', |
| 656 | await expect(imports |
| 657 | ImportNotFoundError, |
| 658 | ); |
| 659 | await expect(imports |
| 660 | ImportNotFoundError, |
| 661 | ); |
| 662 | |
| 663 | await startImport({ |
| 664 | status: 'failed', |
| 665 | attempts: MAX_IMPORT_ATTEMPTS, |
| 666 | lastError: 'boom', |
| 667 | }); |
| 668 | expect( |
| 669 | await imports.status |
| 670 | ).toMatchObject({ |
| 671 | status: 'failed', |
| 672 | lastError: 'boom', |
| 673 | source: 'octo/repo', |
| 674 | }); |
| 675 | await assertNotImporting(db |
| 676 | |
| 677 | await writer.writeIssues |
| 678 | await imports.retry |
| 679 | expect(await importRow |
| 680 | await expect(imports |
| 681 | ImportNotFailedError, |
| 682 | ); |
| 683 | }); |
| 684 | |
| 685 | it('refuses a retry after a local issue was created', |
| 686 | await startImport({ |
| 687 | await db.insert |
| 688 | repositoryId, |
| 689 | number: 1, |
| 690 | title: 'Local issue', |
| 691 | authorId: OWNER, |
| 692 | }); |
| 693 | const wake = |
| 694 | await expect(imports |
| 695 | ImportRetryWouldOverwriteError, |
| 696 | ); |
| 697 | expect(await importRow |
| 698 | status: 'failed', |
| 699 | attempts: 6, |
| 700 | lastError: 'boom', |
| 701 | }); |
| 702 | expect(wake).not |
| 703 | }); |
| 704 | |
| 705 | it('makes an issue being opened wait for a retry holding the import row, then refuses it', |
| 706 | await startImport({ |
| 707 | const retrying = |
| 708 | try { |
| 709 | await retrying.query |
| 710 | await retrying.query |
| 711 | 'select 1 from repository_import where repository_id = $1 for update', |
| 712 | [repositoryId], |
| 713 | ); |
| 714 | |
| 715 | let settled = |
| 716 | const opening = |
| 717 | .transaction((tx) |
| 718 | .finally(() => |
| 719 | settled = true; |
| 720 | }); |
| 721 | await new Promise |
| 722 | expect(settled).toBe |
| 723 | |
| 724 | await retrying.query |
| 725 | `update repository_import set status = 'pending' where repository_id = $1`, |
| 726 | [repositoryId], |
| 727 | ); |
| 728 | await retrying.query |
| 729 | await expect(opening |
| 730 | } finally { |
| 731 | retrying.release(); |
| 732 | } |
| 733 | }); |
| 734 | |
| 735 | it('retries only for a caller with GitHub linked', |
| 736 | await startImport({ |
| 737 | await db.delete |
| 738 | await expect(imports |
| 739 | GitHubNotConnectedError, |
| 740 | ); |
| 741 | }); |
| 742 | }); |
| 743 | }); |