Skip to content

Conversation

@Brend-Smits
Copy link
Contributor

@Brend-Smits Brend-Smits commented Jan 9, 2026

Cache the GitHub App ID at module level to avoid repeated SSM parameter fetches on every rate limit metric update. The value is now fetched once per Lambda execution context and reused across invocations.

Especially when multiple events are badged, repeatedly calling the SSM Parameter API feels wasteful and adds a non-negligible amount of latency to several functions in the scale-up Lambda.

@Brend-Smits Brend-Smits requested a review from a team as a code owner January 9, 2026 09:32
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Cache the GitHub App ID at module level to avoid repeated SSM
parameter fetches on every rate limit metric update. The value is
now fetched once per Lambda execution context and reused across
invocations.
@Brend-Smits Brend-Smits force-pushed the perf/cache-github-app-id branch from 7483a9d to 60eccce Compare January 12, 2026 09:19
Copy link
Contributor

@guicaulada guicaulada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation is solid and ready to merge from my perspective.

We should consider how this relates to the broader caching work in PR #4899, these may want to be coordinated.

This change is very low-risk and provides a clear performance benefit for high-volume environments. Work from #4899 can probably wait and be added later integrating this cache into the broader caching work.

There probably isn't any issues, but I will run some tests on our environment and come back to approve.

Copy link
Contributor

@guicaulada guicaulada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing showed lower number of calls to the getParameter function which resulted in lower lambda duration, from eventual timeouts to a max of 55s for 50 runners batch creation. System seemed more responsive since no orphan runners were created.

@Brend-Smits Brend-Smits merged commit 0fb6f4a into main Jan 12, 2026
11 checks passed
@Brend-Smits Brend-Smits deleted the perf/cache-github-app-id branch January 12, 2026 18:55
npalm pushed a commit that referenced this pull request Jan 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[7.3.0](v7.2.0...v7.3.0)
(2026-01-13)


### Features

* add bypass-removal tag to prevent runner scale-down
([#4995](#4995))
([c0a9766](c0a9766))


### Bug Fixes

* cache GitHub App ID to reduce SSM calls
([#4994](#4994))
([0fb6f4a](0fb6f4a))
* change runner_placement host_resource_group_arn type to be a string
instead of a number
([#4979](#4979))
([5405a04](5405a04))
* **lambda:** bump the aws group in /lambdas with 7 updates
([#4985](#4985))
([5eacb0f](5eacb0f))
* **runners:** correct regex pattern for extracting AMI ID from SSM
parameter ARN
([#4981](#4981))
([174293c](174293c)),
closes
[#4959](#4959)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
Co-authored-by: github-aws-runners-pr|bot <github-aws-runners-pr[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants