Skip to content

Commit acddfa5

Browse files
Merge branch 'main' into task/add-stream-commands
2 parents 5ca635f + b750df0 commit acddfa5

21 files changed

+1954
-48
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: "🐛 Bug Report"
33
description: Report a bug
44
title: "(topic): (short issue description)"
5-
labels: [bug, needs-triage]
5+
labels: ["bug 🐞", "Untriaged user issue"]
66
assignees: []
77
body:
88
- type: textarea

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: 🚀 Feature Request
33
description: Suggest an idea for this project
44
title: "(topic): (short issue description)"
5-
labels: [feature-request, needs-triage]
5+
labels: ["Feature ✨", "Untriaged user issue"]
66
assignees: []
77
body:
88
- type: textarea

.github/ISSUE_TEMPLATE/flaky-ci-test-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Flaky CI Test Issue
22
description: Report a flaky test in the CI pipeline
33
title: "[Flaky Test] <test-name>"
4-
labels: ["bug", "flaky-test"]
4+
labels: ["Flaky-tests 🐦", "CI/CD ⚒️"]
55
assignees: []
66

77
body:

.github/ISSUE_TEMPLATE/inquiry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Inquiry
22
description: Use this template for asking questions
33
title: "[Inquiry] "
4-
labels: ["Inquiry"]
4+
labels: ["Inquiry"]
55
assignees: []
66

77
body:

.github/ISSUE_TEMPLATE/task.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Task
22
description: Create a task to manage work
33
title: "[Task]"
4-
labels: ["task"]
4+
labels: ["Task 🔧"]
55
assignees: []
66

77
body:
@@ -21,8 +21,8 @@ body:
2121
label: Checklist
2222
description: Add items to be completed
2323
value: |
24-
1.
25-
2.
24+
1.
25+
2.
2626
...
2727
2828
- type: textarea

.github/dependabot.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ updates:
1818
- "minor"
1919
labels:
2020
- "dependencies"
21-
- "npm"
21+
- "node 🐢"
2222

2323
# Enable version updates for npm (Node client)
2424
- package-ecosystem: "npm"
@@ -37,8 +37,7 @@ updates:
3737
- "minor"
3838
labels:
3939
- "dependencies"
40-
- "npm"
41-
- "node"
40+
- "node 🐢"
4241

4342
# Enable version updates for Gradle (Java)
4443
- package-ecosystem: "gradle"
@@ -57,8 +56,7 @@ updates:
5756
- "minor"
5857
labels:
5958
- "dependencies"
60-
- "gradle"
61-
- "java"
59+
- "java ☕"
6260

6361
# Enable version updates for Cargo (Rust - glide-core)
6462
- package-ecosystem: "cargo"
@@ -77,8 +75,7 @@ updates:
7775
- "minor"
7876
labels:
7977
- "dependencies"
80-
- "cargo"
81-
- "rust"
78+
- "Rust ⚙️"
8279

8380
# Enable version updates for Cargo (Rust - Java wrapper)
8481
- package-ecosystem: "cargo"
@@ -97,9 +94,8 @@ updates:
9794
- "minor"
9895
labels:
9996
- "dependencies"
100-
- "cargo"
101-
- "rust"
102-
- "java"
97+
- "Rust ⚙️"
98+
- "java ☕"
10399

104100
# Enable version updates for Cargo (Rust - Python wrapper)
105101
- package-ecosystem: "cargo"
@@ -118,9 +114,8 @@ updates:
118114
- "minor"
119115
labels:
120116
- "dependencies"
121-
- "cargo"
122-
- "rust"
123-
- "python"
117+
- "Rust ⚙️"
118+
- "python 🐍"
124119

125120
# Enable version updates for Go modules
126121
- package-ecosystem: "gomod"
@@ -139,7 +134,7 @@ updates:
139134
- "minor"
140135
labels:
141136
- "dependencies"
142-
- "go"
137+
- "go 🏃"
143138

144139
# Enable version updates for pip (Python)
145140
- package-ecosystem: "pip"
@@ -158,8 +153,7 @@ updates:
158153
- "minor"
159154
labels:
160155
- "dependencies"
161-
- "pip"
162-
- "python"
156+
- "python 🐍"
163157

164158
# Enable version updates for GitHub Actions
165159
- package-ecosystem: "github-actions"

.github/workflows/dependabot-management.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
function parseDependabotTitle(title) {
7474
const match = title.match(DEPENDABOT_TITLE_REGEX);
7575
if (!match) return null;
76-
76+
7777
const [, depName, fromVersion, toVersion] = match;
7878
return { depName, fromVersion, toVersion };
7979
}
@@ -89,27 +89,27 @@ jobs:
8989
// Helper function to determine ecosystem label from PR branch
9090
function getEcosystemLabel(pr) {
9191
const branch = pr.head.ref;
92-
92+
9393
// Extract ecosystem from dependabot branch name
9494
// Pattern: dependabot/{ecosystem}/{dependency_name}-{version}
9595
const branchMatch = branch.match(/^dependabot\/([^\/]+)\//);
9696
if (branchMatch) {
9797
const ecosystem = branchMatch[1];
98-
98+
9999
// Map dependabot ecosystem names to our label conventions
100100
const ecosystemMap = {
101-
'npm_and_yarn': 'npm',
102-
'npm': 'npm',
103-
'gradle': 'java',
104-
'cargo': 'rust',
105-
'gomod': 'go',
106-
'pip': 'python',
101+
'npm_and_yarn': 'node 🐢',
102+
'npm': 'node 🐢',
103+
'gradle': 'java',
104+
'cargo': 'Rust ⚙️',
105+
'gomod': 'go 🏃',
106+
'pip': 'python 🐍',
107107
'github_actions': 'github-actions'
108108
};
109-
109+
110110
return ecosystemMap[ecosystem] || ecosystem;
111111
}
112-
112+
113113
return null;
114114
}
115115
@@ -135,7 +135,7 @@ jobs:
135135
136136
async function processPR(pr) {
137137
console.log(`\nProcessing PR #${pr.number}: ${pr.title}`);
138-
138+
139139
// Parse the PR title to extract dependency info
140140
const parsedTitle = parseDependabotTitle(pr.title);
141141
if (!parsedTitle) {
@@ -169,7 +169,7 @@ jobs:
169169
try {
170170
const from = semver.coerce(fromVersion);
171171
const to = semver.coerce(toVersion);
172-
172+
173173
if (!from || !to) {
174174
return 'unknown';
175175
}
@@ -181,7 +181,7 @@ jobs:
181181
} else if (semver.patch(from) !== semver.patch(to)) {
182182
return 'patch';
183183
}
184-
184+
185185
return 'unknown';
186186
} catch (error) {
187187
console.log(` Error determining update type: ${error.message}`);
@@ -210,7 +210,7 @@ jobs:
210210
try {
211211
const from = semver.coerce(fromVersion);
212212
const to = semver.coerce(toVersion);
213-
213+
214214
if (from && to && (semver.major(from) === 0 || semver.major(to) === 0)) {
215215
console.log(` 0.x version detected - not auto-approving minor update`);
216216
return false;
@@ -251,9 +251,9 @@ jobs:
251251
252252
// Add basic changelog information
253253
const changelog = `## Changelog\n\nUpdated ${depName} from ${fromVersion} to ${toVersion}\n\n📋 To view detailed changes, visit the package repository or release notes.`;
254-
254+
255255
const newBody = `${body}\n\n${changelog}`;
256-
256+
257257
if (!dryRun) {
258258
await octokit.rest.pulls.update({
259259
owner,
@@ -273,7 +273,7 @@ jobs:
273273
async function applyLabels(pr, updateType) {
274274
try {
275275
const labels = ['dependencies'];
276-
276+
277277
// Add update type label
278278
if (updateType !== 'unknown') {
279279
labels.push(`dependency-${updateType}`);
@@ -311,7 +311,7 @@ jobs:
311311
});
312312
313313
// Only allow auto-approval if all checks have concluded successfully
314-
const incompleteChecks = checks.check_runs.filter(check =>
314+
const incompleteChecks = checks.check_runs.filter(check =>
315315
check.conclusion !== 'success' && check.conclusion !== 'skipped'
316316
);
317317
@@ -322,7 +322,7 @@ jobs:
322322
const pendingChecks = incompleteChecks.filter(check =>
323323
check.status === 'in_progress' || check.status === 'queued' || check.conclusion === null
324324
);
325-
325+
326326
if (failedChecks.length > 0) {
327327
console.log(` Cannot auto-approve - failed checks: ${failedChecks.map(c => c.name).join(', ')}`);
328328
} else {

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313
* Python Sync: Add dynamic PubSub methods (subscribe, psubscribe, unsubscribe, punsubscribe, ssubscribe, sunsubscribe with timeout support), get_subscriptions(), and pubsub_reconciliation_interval configuration support. Unified configuration classes with async client by importing from glide_shared ([#5270](https://github.com/valkey-io/valkey-glide/pull/5270))
1414
* Go: Add dynamic PubSub methods (Subscribe, PSubscribe, SSubscribe, Unsubscribe, PUnsubscribe, SUnsubscribe with blocking variants and timeout support), GetSubscriptions(), and helper functions (UnsubscribeAll, PUnsubscribeAll, SUnsubscribeAll). Export pubsub constants (AllChannels, AllPatterns, AllShardedChannels)
1515
* JAVA: Add ACL server management commands (ACL CAT, ACL DELUSER, ACL DRYRUN, ACL GENPASS, ACL GETUSER, ACL LIST, ACL LOAD, ACL LOG, ACL SAVE, ACL SETUSER, ACL USERS, ACL WHOAMI)
16+
* Go: Add ACL server management commands (ACL CAT, ACL DELUSER, ACL DRYRUN, ACL GENPASS, ACL GETUSER, ACL LIST, ACL LOAD, ACL LOG, ACL LOGRESET, ACL SAVE, ACL SETUSER, ACL USERS, ACL WHOAMI)
1617
* CORE: Fix typo in ACL SETUSER command mapping (AclSetSser → AclSetUser)
1718
* Python: Add inflight request limit support to sync client
1819
* Python Sync: Add OpenTelemetry support with traces and metrics configuration
1920
* Python: Move OpenTelemetry config classes to glide_shared for code reuse between async and sync clients
2021
* JAVA: Add dynamic PubSub methods (subscribe, psubscribe, unsubscribe, punsubscribe, ssubscribe, sunsubscribe), getSubscriptions() for subscription state tracking, pubsubReconciliationIntervalMs configuration option, and subscription_out_of_sync_count and subscription_last_sync_timestamp metrics ([#5267](https://github.com/valkey-io/valkey-glide/issues/5267))
2122
* Go: Add ALLOW_NON_COVERED_SLOTS flag support for cluster scan ([#4895](https://github.com/valkey-io/valkey-glide/issues/4895))
23+
* CORE: Track HELLO and AUTH state for reconnection ([#5145](https://github.com/valkey-io/valkey-glide/issues/5145))
2224

2325
#### Fixes
26+
* CORE: Fix empty hostname in CLUSTER SLOTS metadata causing AllConnectionsUnavailable ([#5367](https://github.com/valkey-io/valkey-glide/issues/5367)). AWS ElastiCache (plaintext, cluster mode) returns `hostname: ""` in node metadata, which was used as the connection address instead of falling back to the IP.
2427
* Node: Fix to handle non-string types in toBuffersArray ([#4842](https://github.com/valkey-io/valkey-glide/issues/4842))
2528
* CORE: Enforce connection_timeout for initial standalone connection failures ([#4991](https://github.com/valkey-io/valkey-glide/issues/4991))
2629
* Node: Fixed `Failed to convert napi value Undefined into rust type u32` error ([#5128](https://github.com/valkey-io/valkey-glide/pull/5128))

glide-core/redis-rs/redis/src/client.rs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::{
77
connection::{connect, Connection, ConnectionInfo, ConnectionLike, IntoConnectionInfo},
88
push_manager::PushInfo,
99
retry_strategies::RetryStrategy,
10-
types::{RedisResult, Value},
10+
types::{ProtocolVersion, RedisResult, Value},
1111
};
1212
#[cfg(feature = "aio")]
1313
use std::net::IpAddr;
@@ -602,6 +602,34 @@ impl Client {
602602
pub fn update_client_name(&mut self, client_name: Option<String>) {
603603
self.connection_info.redis.client_name = client_name;
604604
}
605+
606+
/// Updates the username in connection_info.
607+
///
608+
/// This method updates the username field in the connection information,
609+
/// which will be used for subsequent connections and reconnections.
610+
/// Typically updated when AUTH command is used with a username.
611+
///
612+
/// # Arguments
613+
///
614+
/// * `username` - The username to use for authentication (None to clear)
615+
///
616+
pub fn update_username(&mut self, username: Option<String>) {
617+
self.connection_info.redis.username = username;
618+
}
619+
620+
/// Updates the protocol version in connection_info.
621+
///
622+
/// This method updates the protocol field in the connection information,
623+
/// which will be used for subsequent connections and reconnections.
624+
/// Typically updated when HELLO command is used to change protocol version.
625+
///
626+
/// # Arguments
627+
///
628+
/// * `protocol` - The protocol version to use (RESP2 or RESP3)
629+
///
630+
pub fn update_protocol(&mut self, protocol: ProtocolVersion) {
631+
self.connection_info.redis.protocol = protocol;
632+
}
605633
}
606634

607635
#[cfg(feature = "aio")]

glide-core/redis-rs/redis/src/cluster_async/mod.rs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ use crate::{
8585
self, MultipleNodeRoutingInfo, Redirect, ResponsePolicy, Route, SingleNodeRoutingInfo,
8686
},
8787
push_manager::PushInfo,
88+
types::ProtocolVersion,
8889
Cmd, ConnectionInfo, ErrorKind, IntoConnectionInfo, RedisError, RedisFuture, RedisResult,
8990
Value,
9091
};
@@ -356,6 +357,40 @@ where
356357
.await
357358
}
358359

360+
/// Update the username used to authenticate with all cluster servers
361+
///
362+
/// This method updates the username for all cluster connections and stores it for future reconnections.
363+
/// Typically called after a successful AUTH command with a username parameter.
364+
///
365+
/// # Arguments
366+
///
367+
/// * `username` - The username to use for authentication (None to clear)
368+
///
369+
pub async fn update_connection_username(
370+
&mut self,
371+
username: Option<String>,
372+
) -> RedisResult<Value> {
373+
self.route_operation_request(Operation::UpdateConnectionUsername(username))
374+
.await
375+
}
376+
377+
/// Update the protocol version used for all cluster connections
378+
///
379+
/// This method updates the protocol version for all cluster connections and stores it for future reconnections.
380+
/// Typically called after a successful HELLO command that changes the protocol version.
381+
///
382+
/// # Arguments
383+
///
384+
/// * `protocol` - The protocol version to use (RESP2 or RESP3)
385+
///
386+
pub async fn update_connection_protocol(
387+
&mut self,
388+
protocol: ProtocolVersion,
389+
) -> RedisResult<Value> {
390+
self.route_operation_request(Operation::UpdateConnectionProtocol(protocol))
391+
.await
392+
}
393+
359394
/// Get the username used to authenticate with all cluster servers
360395
pub async fn get_username(&mut self) -> RedisResult<Value> {
361396
self.route_operation_request(Operation::GetUsername).await
@@ -683,6 +718,8 @@ enum Operation {
683718
UpdateConnectionPassword(Option<String>),
684719
UpdateConnectionDatabase(i64),
685720
UpdateConnectionClientName(Option<String>),
721+
UpdateConnectionUsername(Option<String>),
722+
UpdateConnectionProtocol(ProtocolVersion),
686723
GetUsername,
687724
}
688725

@@ -2621,6 +2658,16 @@ where
26212658
.expect(MUTEX_WRITE_ERR);
26222659
Ok(Response::Single(Value::Okay))
26232660
}
2661+
Operation::UpdateConnectionUsername(username) => {
2662+
core.set_cluster_param(|params| params.username = username)
2663+
.expect(MUTEX_WRITE_ERR);
2664+
Ok(Response::Single(Value::Okay))
2665+
}
2666+
Operation::UpdateConnectionProtocol(protocol) => {
2667+
core.set_cluster_param(|params| params.protocol = protocol)
2668+
.expect(MUTEX_WRITE_ERR);
2669+
Ok(Response::Single(Value::Okay))
2670+
}
26242671
Operation::GetUsername => {
26252672
let username = match core
26262673
.get_cluster_param(|params| params.username.clone())

0 commit comments

Comments
 (0)