-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(redis): sentinel support #8260
Conversation
Apollo Federation Subgraph Compatibility Results
Learn more: |
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-mesh/cache-cfw-kv |
0.104.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/cache-file |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/cache-inmemory-lru |
0.0.10-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/cache-localforage |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/cache-redis |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/compose-cli |
1.3.8-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/fusion-composition |
0.7.20-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/include |
0.2.13-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/apollo-link |
0.105.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/cli |
0.98.20-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/config |
0.106.20-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/graphql |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/grpc |
0.107.5-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/json-schema |
0.108.17-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/mongoose |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/mysql |
0.104.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/neo4j |
0.105.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/odata |
0.105.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/openapi |
0.108.18-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/postgraphile |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/raml |
0.108.16-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/soap |
0.105.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/supergraph |
0.9.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/thrift |
0.105.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/tuql |
0.104.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/http |
0.105.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/merger-bare |
0.104.17-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/merger-stitching |
0.104.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/migrate-config-cli |
1.4.12-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/runtime |
0.105.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/store |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-cache |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-encapsulate |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-extend |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-federation |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-filter-schema |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-hive |
0.103.17-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-hoist-field |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-naming-convention |
0.103.16-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-prefix |
0.103.16-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-prune |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-rate-limit |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-rename |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-replace-field |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-resolvers-composition |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-transfer-schema |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transform-type-merging |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/types |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/urql-exchange |
0.105.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/utils |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/json-schema |
0.108.16-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/mysql |
0.8.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/neo4j |
0.9.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/odata |
0.1.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/openapi |
0.108.18-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/raml |
0.108.16-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/soap |
0.105.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/sqlite |
0.7.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@omnigraph/thrift |
0.8.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-deduplicate-request |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-hive |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-http-cache |
0.104.2-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-http-details-extensions |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-jit |
0.1.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-jwt-auth |
1.4.4-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-live-query |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-mock |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-newrelic |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-operation-field-permissions |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-operation-headers |
1.3.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-rate-limit |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-response-cache |
0.103.15-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-snapshot |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-statsd |
0.103.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-grpc |
0.2.4-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-mysql |
0.8.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-neo4j |
0.8.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-odata |
0.1.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-rest |
0.8.16-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-soap |
0.8.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-sqlite |
0.8.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-thrift |
0.8.14-alpha-20250211122553-3fb64ebde7eaf7cfa395a075898678d4518d149c |
npm ↗︎ unpkg ↗︎ |
💻 Website PreviewThe latest changes are available as preview in: https://994fb9cd.graphql-mesh.pages.dev |
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis pull request introduces support for Redis Sentinel configurations within the GraphQL Mesh framework. The changes modify the RedisCache constructor to prioritize sentinel options over legacy URL or individual connection parameters. Additionally, Redis configuration types have been updated across GraphQL schemas and legacy type definitions to include a union of Sentinel and single-instance setups, along with new enums and interfaces. Documentation files have also been updated to reflect these new properties and configuration options, including the addition of the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant RedisCache
participant RedisClient
Client->>RedisCache: Instantiate with options
RedisCache->>RedisCache: Check for "sentinels" option
alt Sentinel configuration provided
RedisCache->>RedisClient: Create client using sentinel options (name, sentinelPassword, sentinels, etc.)
else URL provided
RedisCache->>RedisClient: Validate URL and create client with URL settings
else
RedisCache->>RedisClient: Create client using individual connection parameters
end
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
packages/cache/redis/yaml-config.graphqlOops! Something went wrong! :( ESLint: 9.20.0 ESLint couldn't find an eslint.config.(js|mjs|cjs) file. From ESLint v9.0.0, the default configuration file is now eslint.config.js. https://eslint.org/docs/latest/use/configure/migration-guide If you still have problems after following the migration guide, please stop by 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (11)
.changeset/@graphql-mesh_grpc-8260-dependencies.md (1)
4-5
: LGTM with a minor formatting note.The patch version bump looks good. Note: The list indentation can be adjusted to align with markdown standards, but this is a minor formatting issue.
- - Updated dependency [`@omnigraph/grpc@^0.2.1` ↗︎](https://www.npmjs.com/package/@omnigraph/grpc/v/0.2.1) (from `^0.2.0`, in `dependencies`) +- Updated dependency [`@omnigraph/grpc@^0.2.1` ↗︎](https://www.npmjs.com/package/@omnigraph/grpc/v/0.2.1) (from `^0.2.0`, in `dependencies`)🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
5-5: Unordered list indentation
Expected: 0; Actual: 2(MD007, ul-indent)
packages/cache/redis/src/index.ts (2)
24-39
: Consider adding fallback/error handling for partial sentinel configuration.It might be beneficial to ensure that each sentinel config in
options.sentinels
has validhost
andport
, and to handle any missing or malformed entries. This helps avoid runtime exceptions if only some fields are provided.
81-81
: Confirm IPv6 assignment logic.Setting
family
to6
ifparsedFamily === '6'
is straightforward, but consider logging a warning or error ifparsedFamily
is invalid, to facilitate troubleshooting potential misconfigurations.packages/legacy/types/src/config.ts (2)
1836-1862
: Clarify sentinel role and environment usage.For
RedisConfigSentinel
, consider clarifying in commentary how each parameter (e.g.,sentinelPassword
,role
) interacts with environment variables or defaults. This helps users avoid misconfiguration when switching from local to production.
1875-1876
: Align family property usage between single and sentinel.For
RedisConfigSingle
, the optionalfamily
property complements the same field inRedisSentinelConfig
. Consider documenting that both accept'4'
or'6'
, and confirm consistent interpretation in the code.website/src/generated-markdown/RedisSentinelConfig.generated.md (1)
2-4
: Include example usage for new properties in docs.To help users configure Redis Sentinel more confidently, supplement this list with usage examples for
host
,port
, andfamily
(e.g., specifying numeric strings for IPv4 vs. IPv6).website/src/generated-markdown/RedisConfigSingle.generated.md (1)
3-3
: Consider usingInt
type for port.The
port
parameter is defined as aString
, but it should be anInt
since ports are numeric values. This would provide better type safety and validation.website/src/generated-markdown/RedisConfigSentinel.generated.md (1)
6-6
: Consider usingInt
type for sentinel port.The
port
parameter in sentinel configuration is defined as aString
, but it should be anInt
for better type safety and validation.website/src/generated-markdown/RedisConfig.generated.md (1)
13-13
: Add missing comma for better readability.Add a comma after "instances" in the sentence: "A list of sentinels to connect to. The list does not need to enumerate all your sentinel instances, but a few so that if one is down the client will try the next one."
🧰 Tools
🪛 LanguageTool
[uncategorized] ~13-~13: Possible missing comma found.
Context: ... instances, but a few so that if one is down the client will try the next one.: *...(AI_HYDRA_LEO_MISSING_COMMA)
packages/cache/redis/yaml-config.graphql (1)
43-43
: Consider usingInt
type for ports.The
port
fields in bothRedisSentinelConfig
andRedisConfigSingle
are defined asString
, but they should beInt
for better type safety and validation.Apply this diff:
type RedisSentinelConfig @md { host: String - port: String + port: Int family: String } type RedisConfigSingle @md { host: String - port: String + port: Int username: String password: String db: Int url: String family: String """Also applies to: 49-49
.changeset/@omnigraph_raml-8260-dependencies.md (1)
7-7
: Remove unnecessary dependency entry.The
to-json-schema
dependency entry shows no version change (0.2.5 → 0.2.5) and can be safely removed from the changeset.- - Updated dependency [`to-json-schema@^0.2.5` ↗︎](https://www.npmjs.com/package/to-json-schema/v/0.2.5) (from `0.2.5`, in `dependencies`)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
7-7: Unordered list indentation
Expected: 0; Actual: 2(MD007, ul-indent)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (21)
.changeset/@graphql-mesh_grpc-8260-dependencies.md
(1 hunks).changeset/@graphql-mesh_json-schema-8260-dependencies.md
(1 hunks).changeset/@graphql-mesh_mongoose-8260-dependencies.md
(1 hunks).changeset/@graphql-mesh_openapi-8260-dependencies.md
(1 hunks).changeset/@graphql-mesh_plugin-http-details-extensions-8260-dependencies.md
(1 hunks).changeset/@graphql-mesh_raml-8260-dependencies.md
(1 hunks).changeset/@graphql-mesh_transport-rest-8260-dependencies.md
(1 hunks).changeset/@omnigraph_grpc-8260-dependencies.md
(1 hunks).changeset/@omnigraph_json-schema-8260-dependencies.md
(1 hunks).changeset/@omnigraph_openapi-8260-dependencies.md
(1 hunks).changeset/@omnigraph_raml-8260-dependencies.md
(1 hunks).changeset/json-machete-8260-dependencies.md
(1 hunks).changeset/ten-houses-unite.md
(1 hunks)packages/cache/redis/src/index.ts
(3 hunks)packages/cache/redis/yaml-config.graphql
(1 hunks)packages/legacy/types/src/config-schema.json
(3 hunks)packages/legacy/types/src/config.ts
(2 hunks)website/src/generated-markdown/RedisConfig.generated.md
(1 hunks)website/src/generated-markdown/RedisConfigSentinel.generated.md
(1 hunks)website/src/generated-markdown/RedisConfigSingle.generated.md
(1 hunks)website/src/generated-markdown/RedisSentinelConfig.generated.md
(1 hunks)
✅ Files skipped from review due to trivial changes (9)
- .changeset/@omnigraph_grpc-8260-dependencies.md
- .changeset/@graphql-mesh_transport-rest-8260-dependencies.md
- .changeset/@graphql-mesh_raml-8260-dependencies.md
- .changeset/@graphql-mesh_mongoose-8260-dependencies.md
- .changeset/@graphql-mesh_plugin-http-details-extensions-8260-dependencies.md
- .changeset/json-machete-8260-dependencies.md
- .changeset/@graphql-mesh_json-schema-8260-dependencies.md
- .changeset/@omnigraph_json-schema-8260-dependencies.md
- .changeset/@omnigraph_openapi-8260-dependencies.md
🧰 Additional context used
🪛 LanguageTool
website/src/generated-markdown/RedisConfig.generated.md
[uncategorized] ~13-~13: Possible missing comma found.
Context: ... instances, but a few so that if one is down the client will try the next one.: *...
(AI_HYDRA_LEO_MISSING_COMMA)
🪛 markdownlint-cli2 (0.17.2)
.changeset/@graphql-mesh_grpc-8260-dependencies.md
5-5: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
.changeset/@graphql-mesh_openapi-8260-dependencies.md
5-5: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
.changeset/@omnigraph_raml-8260-dependencies.md
5-5: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
6-6: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
7-7: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: e2e / node v18
🔇 Additional comments (9)
.changeset/@graphql-mesh_grpc-8260-dependencies.md (1)
1-6
: Verify the relationship with Redis Sentinel feature.This changeset updates
@omnigraph/grpc
from^0.2.0
to^0.2.1
, but it's not immediately clear how this relates to the Redis Sentinel support feature described in the PR objectives.✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check if the version bump contains Redis-related changes # Get the changelog or release notes for @omnigraph/[email protected] curl -s https://registry.npmjs.org/@omnigraph/grpc | jq -r '."dist-tags", .versions["0.2.1"].description, .versions["0.2.1"].changelog' # Search for any Redis-related changes in the codebase that might depend on this version rg -i "redis.*@omnigraph/grpc"Length of output: 286
Dependency update and formatting note verified.
- The executed script shows no evidence linking the
@omnigraph/grpc
patch update to Redis Sentinel support.- The registry output for version 0.2.1 lacks changelog details, and the search for Redis-related mentions returned no results.
- Aside from a minor markdown list indentation issue, the dependency bump is a routine patch update.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
5-5: Unordered list indentation
Expected: 0; Actual: 2(MD007, ul-indent)
packages/cache/redis/src/index.ts (1)
69-70
: Validate or sanitize the parsed family value.Currently, the code interpolates
options.family
orREDIS_FAMILY
but does not handle invalid or empty values. Consider adding a check to make sure the finalparsedFamily
remains a valid numeric string.packages/legacy/types/src/config.ts (1)
1808-1810
: Ensure consumers are aware of the new Redis config union.The updated property
redis?: RedisConfigSentinel | RedisConfigSingle;
introduces two distinct ways to configure Redis. Update documentation or examples to clarify how to select between sentinel and single-instance setups..changeset/ten-houses-unite.md (1)
1-7
: LGTM!The version bump and documentation link are appropriate for the Redis Sentinel feature addition.
packages/cache/redis/yaml-config.graphql (1)
5-5
: LGTM!The union type design provides good flexibility for supporting both single and sentinel Redis configurations.
packages/legacy/types/src/config-schema.json (2)
17-27
: Well-structured Redis configuration schema!The Redis configuration schema elegantly supports both Sentinel and Single instance configurations using
anyOf
. The description clearly indicates the available options.
84-120
: Comprehensive Redis Sentinel configuration type!The RedisConfigSentinel type provides excellent coverage of Sentinel features:
- Required group name and sentinel list
- Optional authentication and TLS support
- Role selection for master/slave routing
- Clear descriptions for all properties
.changeset/@graphql-mesh_openapi-8260-dependencies.md (1)
1-5
: LGTM! Dependency update looks good.The patch update for
@graphql-mesh/openapi
and its dependency on@omnigraph/openapi
follows semantic versioning practices.Let's verify that the new version of
@omnigraph/openapi
is compatible with Redis Sentinel support:❌ Verification inconclusive
🏁 Script executed:
#!/bin/bash # Description: Check the changelog or release notes of @omnigraph/openapi for Redis Sentinel related changes # Check the package.json and changelog gh api repos/ardatan/graphql-mesh/contents/packages/openapi/omnigraph-openapi/CHANGELOG.md --ref $(git rev-parse HEAD) | jq -r '.content' | base64 -d | grep -A 5 "0.108.14"Length of output: 1672
Let's try a revised script that directly reads the local changelog file for the
omnigraph-openapi
package and looks for both the version update and any mention of "Redis Sentinel" support. This should help us determine if the new version is compatible. Please run the following shell script:
🏁 Script executed:
#!/bin/bash FILE="packages/openapi/omnigraph-openapi/CHANGELOG.md" if [ -f "$FILE" ]; then echo "Context around version 0.108.14:" grep -A 5 "0.108.14" "$FILE" echo "" echo "Checking for Redis Sentinel support mentions:" grep -R "Redis Sentinel" "$FILE" else echo "Changelog file not found at $FILE" fiLength of output: 276
Dependency Update Approved – Manual Verification Needed for Redis Sentinel Support
- The changeset file correctly updates
@omnigraph/openapi
from version0.108.13
to0.108.14
per semantic versioning practices.- Our automated search did not locate a changelog or any notes (e.g., "Redis Sentinel") in the
omnigraph-openapi
package, so we couldn’t automatically confirm Redis Sentinel compatibility.- Please manually verify that the changes in version
0.108.14
support Redis Sentinel as expected (e.g., by checking the upstream repository’s release notes or documentation).🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
5-5: Unordered list indentation
Expected: 0; Actual: 2(MD007, ul-indent)
.changeset/@omnigraph_raml-8260-dependencies.md (1)
5-6
: Verify dependency updates support Redis Sentinel feature.Since this PR introduces Redis Sentinel support, let's verify that these dependency updates contain the necessary changes.
✅ Verification successful
🌐 Web query:
What changes were introduced in @omnigraph/json-schema v0.108.12 and json-machete v0.97.6?
💡 Result:
The latest versions of @omnigraph/json-schema (v0.108.12) and json-machete (v0.97.6) include several updates focused on dependency management and compatibility:
@omnigraph/json-schema v0.108.12
- Dependency Update: Upgraded
graphql-compose
from v9.0.11 to v9.1.0 (January 12, 2025) [5].
This ensures compatibility with newer features or fixes in thegraphql-compose
library.json-machete v0.97.6
- Maintenance Release: Published on January 15, 2025 ([2][4]).
No specific functional changes are detailed in the provided sources, but it likely includes minor optimizations or dependency updates to align with ecosystem tools like GraphQL Mesh.
Key Context
- Both packages are part of the GraphQL Mesh ecosystem, which automates schema generation from JSON Schema/APIs.
- @omnigraph/json-schema focuses on converting JSON Schemas into GraphQL types ([3]).
- json-machete aids in processing JSON Schemas (e.g., dereferencing) during schema generation workflows ([2][4]).
No breaking changes or major feature additions are explicitly noted for these versions in the provided sources[1][2][3][4][5].
Citations:
- 1: https://docs.json-everything.net/rn-json-schema-generation/
- 2: https://www.npmjs.com/package/json-machete
- 3: https://www.npmjs.com/package/@omnigraph/json-schema
- 4: https://www.npmjs.com/package/json-machete/v/0.15.6?activeTab=code
- 5: https://github.com/ardatan/graphql-mesh/releases
- 6: https://docs.omniverse.nvidia.com/kit/docs/omni.graph.test/latest/CHANGELOG.html
Dependency Versions and Redis Sentinel Support Verification
Based on the release notes for the updated packages:
@omnigraph/json-schema v0.108.12
• The update primarily upgrades the internal dependency (graphql-compose
from v9.0.11 to v9.1.0) to ensure compatibility with the latest features and fixes, with no mention of Redis Sentinel.json-machete v0.97.6
• This is noted as a maintenance release with minor optimizations and dependency adjustments, again with no explicit changes related to Redis Sentinel.There’s no evidence from these notes that the dependency updates include new or modified behavior directly targeting Redis Sentinel support. If Redis Sentinel support is required by the new feature in this PR, its implementation is likely provided elsewhere rather than through modifications in these dependency packages.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
5-5: Unordered list indentation
Expected: 0; Actual: 2(MD007, ul-indent)
6-6: Unordered list indentation
Expected: 0; Actual: 2(MD007, ul-indent)
803e352
to
ad0272f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
packages/legacy/types/src/config.ts (1)
1860-1864
:⚠️ Potential issueMake host and port required in RedisSentinelConfig.
The
host
andport
properties inRedisSentinelConfig
should be required as they are essential for connecting to sentinel instances.Apply this diff to fix the issue:
- host?: string; - port?: string; + host: string; + port: string;
🧹 Nitpick comments (1)
packages/legacy/types/src/config-schema.json (1)
84-120
: Consider adding default value for role field.The RedisConfigSentinel type is well-defined with clear descriptions and required fields. Consider enhancing the role field description to specify the default value (typically "master").
"role": { "type": "string", "enum": ["master", "slave"], - "description": "(optional) with a value of slave will return a random slave from the Sentinel group. (Allowed values: master, slave)" + "description": "(optional) with a value of slave will return a random slave from the Sentinel group. Default: master (Allowed values: master, slave)" },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.changeset/ten-houses-unite.md
(1 hunks)packages/cache/redis/src/index.ts
(3 hunks)packages/cache/redis/yaml-config.graphql
(1 hunks)packages/legacy/types/src/config-schema.json
(3 hunks)packages/legacy/types/src/config.ts
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- .changeset/ten-houses-unite.md
- packages/cache/redis/yaml-config.graphql
⏰ Context from checks skipped due to timeout of 90000ms (14)
- GitHub Check: unit / node 22
- GitHub Check: unit / node 20
- GitHub Check: e2e / node v22
- GitHub Check: integration / node 22
- GitHub Check: unit / node 18
- GitHub Check: e2e / node v20
- GitHub Check: integration / node 20
- GitHub Check: e2e / node v18
- GitHub Check: integration / node 18
- GitHub Check: apollo-federation-compatibility
- GitHub Check: check
- GitHub Check: release / snapshot
- GitHub Check: deployment
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
packages/cache/redis/src/index.ts (2)
24-39
: LGTM! Redis Sentinel support implementation looks good.The implementation correctly:
- Checks for sentinel configuration using
'sentinels' in options
- Handles sentinel password with environment variable interpolation
- Maps sentinel configurations with proper type conversions
- Sets required Redis client options
69-70
: Verify IPv6 support across Redis configurations.The IPv6 family support has been added consistently across both single instance and sentinel configurations. However, let's verify that the Redis client properly handles IPv6 addresses in both modes.
Run the following script to check IPv6 support in the Redis client:
Also applies to: 81-81
❌ Verification inconclusive
🏁 Script executed:
#!/bin/bash # Description: Check if Redis client properly handles IPv6 addresses. # Test: Search for IPv6 address handling in Redis client. rg -A 5 'family.*6' node_modules/ioredis/lib/Length of output: 113
IPv6 Redis Client Handling: Manual Verification Required
The initial script did not produce output since the expected directory (
node_modules/ioredis/lib/
) wasn't found. This makes the automatic check inconclusive. Please manually verify that the Redis client—in both single instance and sentinel configurations—is correctly handling IPv6 addresses (i.e., that thefamily
option is being passed and respected by the client).
- Confirm that the
family
option (derived fromoptions.family?.toString()
orprocess.env.REDIS_FAMILY
) is correctly relayed to the ioredis client initialization.- Verify in your testing environment (or via localized logs) that when an IPv6 address is provided, the connection is established as expected.
packages/legacy/types/src/config.ts (3)
1804-1807
: LGTM! Redis configuration type union is well-defined.The union type correctly allows either sentinel or single instance configuration.
1832-1859
: LGTM! RedisConfigSentinel interface is comprehensive.The interface includes all necessary properties for Redis Sentinel configuration with clear documentation.
1872-1872
: LGTM! Family property added to RedisConfigSingle.The
family
property has been consistently added to support IPv6 in single instance mode.packages/legacy/types/src/config-schema.json (3)
17-27
: LGTM! Well-structured Redis configuration union type.The redis property is now properly defined to support both Sentinel and Single instance configurations using anyOf, with clear documentation.
121-136
: Add required fields for Sentinel configuration.The RedisSentinelConfig type should specify required fields for host and port as they are essential for connecting to Sentinel instances.
{ "additionalProperties": false, "type": "object", "title": "RedisSentinelConfig", "properties": { "host": { "type": "string" }, "port": { "type": "string" }, "family": { "type": "string" } }, + "required": ["host", "port"] }
137-168
: LGTM! Well-structured single instance configuration.The RedisConfigSingle type maintains backward compatibility while adding the family field for consistency with sentinel configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one comment :) thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.changeset/eleven-carpets-nail.md (1)
1-6
: Enhance the changeset description with more details.While the changeset correctly uses a patch version for this backward-compatible feature, the description could be more informative for users and maintainers.
Consider expanding the description with:
--- '@graphql-mesh/cache-redis': patch --- -Support REDIS_FAMILY to set family of the IP address +Support REDIS_FAMILY to set family of the IP address (IPv4 or IPv6). + +This enhancement allows you to explicitly specify the IP address family when connecting to Redis instances: +- 4: Force IPv4 +- 6: Force IPv6 +- 0: Automatic (default) + +This is particularly useful in network environments where specific IP protocols are required or when troubleshooting connection issues.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.changeset/eleven-carpets-nail.md
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (14)
- GitHub Check: apollo-federation-compatibility
- GitHub Check: unit / node 22
- GitHub Check: e2e / node v22
- GitHub Check: integration / node 22
- GitHub Check: unit / node 20
- GitHub Check: integration / node 20
- GitHub Check: unit / node 18
- GitHub Check: e2e / node v20
- GitHub Check: integration / node 18
- GitHub Check: release / snapshot
- GitHub Check: e2e / node v18
- GitHub Check: check
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: deployment
Support Redis Sentinels - See more
Summary by CodeRabbit
New Features
Documentation
sentinelPassword
,sentinels
, andREDIS_FAMILY
.