use abort controller for stopping pending timers#8134
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the IAM token refresh mechanism to use AbortController and node:timers/promises for cleaner shutdown handling, binds the token refresh cleanup to the Redis client's end event, and updates the workflow shutdown sequence to quit Redis clients. A review comment correctly identifies a nested await inside Promise.all during the Redis subscriber shutdown, which prevents concurrent execution and should be removed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| logger.info('Shutdown postgres connection successful.'); | ||
| logger.info('Shutdown redis connection.'); | ||
| redis.disconnect(false); | ||
| await Promise.all([redis.quit(), await redisSubscriber.quit()]); |
There was a problem hiding this comment.
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/apollo |
0.48.1-alpha-20260610091846-3aa9ed330e372fd50d62a994cd3b5fdc4df49586 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/cli |
0.60.1-alpha-20260610091846-3aa9ed330e372fd50d62a994cd3b5fdc4df49586 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/core |
0.21.1-alpha-20260610091846-3aa9ed330e372fd50d62a994cd3b5fdc4df49586 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/envelop |
0.40.6-alpha-20260610091846-3aa9ed330e372fd50d62a994cd3b5fdc4df49586 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/yoga |
0.48.1-alpha-20260610091846-3aa9ed330e372fd50d62a994cd3b5fdc4df49586 |
npm ↗︎ unpkg ↗︎ |
hive |
11.3.0-alpha-20260610091846-3aa9ed330e372fd50d62a994cd3b5fdc4df49586 |
npm ↗︎ unpkg ↗︎ |
| logger.info('Shutdown postgres connection successful.'); | ||
| logger.info('Shutdown redis connection.'); | ||
| redis.disconnect(false); | ||
| await Promise.all([redis.quit(), redisSubscriber.quit()]); |
There was a problem hiding this comment.
unrelated the the actual changes 😓 - i just noticed we are not cleaning up the subscriber client
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
unref