Commit deb2db8
committed
feat(perf): cache
Calls to `vcs.GetFiles()` only result in one or two API calls (paging
aside). However the method is called each time a CEL expression
references `"path".pathChanged()` or the `on-path-change` annotation is
checked for matches. Because of this, because matching is evaluated
several times in a row, and because some users have tens of PipelineRuns
in their `.tekton` directory, in some cases a single push event may cause
PaC to make hundreds of API requests listing the same files repeatedly.vcs.GetFiles() to reduce redundant VCS API volume1 parent 860c901 commit deb2db8
File tree
9 files changed
+265
-273
lines changed- pkg
- provider
- bitbucketdatacenter
- github
- gitlab
- metrics
- reconciler
- test/metrics
9 files changed
+265
-273
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
381 | 372 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | 373 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
394 | 389 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
399 | 397 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
| 398 | + | |
407 | 399 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
416 | 408 | | |
417 | | - | |
418 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
419 | 424 | | |
420 | | - | |
421 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
422 | 428 | | |
423 | | - | |
424 | 429 | | |
425 | | - | |
426 | | - | |
| 430 | + | |
427 | 431 | | |
428 | | - | |
429 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
430 | 435 | | |
431 | | - | |
432 | 436 | | |
433 | | - | |
| 437 | + | |
434 | 438 | | |
435 | 439 | | |
436 | 440 | | |
| |||
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
709 | 712 | | |
710 | 713 | | |
711 | 714 | | |
| 715 | + | |
712 | 716 | | |
713 | 717 | | |
714 | 718 | | |
| |||
734 | 738 | | |
735 | 739 | | |
736 | 740 | | |
737 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
738 | 746 | | |
739 | 747 | | |
740 | 748 | | |
741 | | - | |
| 749 | + | |
| 750 | + | |
742 | 751 | | |
743 | | - | |
744 | 752 | | |
745 | 753 | | |
746 | 754 | | |
| |||
757 | 765 | | |
758 | 766 | | |
759 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
760 | 779 | | |
761 | 780 | | |
762 | 781 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
503 | | - | |
| 504 | + | |
504 | 505 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
511 | 543 | | |
512 | 544 | | |
513 | 545 | | |
514 | 546 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
519 | 551 | | |
520 | | - | |
521 | | - | |
| 552 | + | |
| 553 | + | |
522 | 554 | | |
523 | | - | |
524 | | - | |
| 555 | + | |
| 556 | + | |
525 | 557 | | |
526 | | - | |
527 | | - | |
| 558 | + | |
| 559 | + | |
528 | 560 | | |
529 | 561 | | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
560 | 565 | | |
561 | | - | |
562 | 566 | | |
563 | | - | |
| 567 | + | |
564 | 568 | | |
565 | 569 | | |
566 | 570 | | |
| |||
0 commit comments