Skip to content

Commit 3e71c0f

Browse files
authored
Merge branch 'main' into address-resolver
Signed-off-by: Gustavo Maciel <gmaciel@atlassian.com>
2 parents 89cb666 + 6f96c84 commit 3e71c0f

36 files changed

+4067
-355
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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@
66
* Node: Drop support for Node.js 16.x and 18.x. Minimum supported version is now Node.js 20.x.
77

88
#### Changes
9-
109
* JAVA: Add EVAL_RO, EVALSHA_RO, and SCRIPT DEBUG commands ([#5125](https://github.com/valkey-io/valkey-glide/pull/5125))
1110
* CORE: Add client certificate and private key support for mTLS ([#5092](https://github.com/valkey-io/valkey-glide/issues/5092))
1211
* Python: Add client certificate and private key support for mTLS ([5123](https://github.com/valkey-io/valkey-glide/issues/5123))
1312
* JAVA: Add KEYS, MIGRATE and WAITAOF command support ([#5017](https://github.com/valkey-io/valkey-glide/pull/5107))
1413
* 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))
1514
* 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)
1615
* 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)
1717
* CORE: Fix typo in ACL SETUSER command mapping (AclSetSser → AclSetUser)
1818
* Python: Add inflight request limit support to sync client
1919
* Python Sync: Add OpenTelemetry support with traces and metrics configuration
2020
* Python: Move OpenTelemetry config classes to glide_shared for code reuse between async and sync clients
2121
* 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))
2222
* 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))
2324
* CORE: Support custom socket address resolution when connecting to valkey ([#4396](https://github.com/valkey-io/valkey-glide/issues/4396))
2425

2526
#### Fixes
@@ -29,6 +30,8 @@
2930
* Python: Fix Sphinx docs build failure with duplicate object warnings ([#5163](https://github.com/valkey-io/valkey-glide/issues/5163))
3031
* Java: Restore shading and relocation of protobuf ([#5031](https://github.com/valkey-io/valkey-glide/pull/5031))
3132
* CORE: Remove DEFAULT_CLIENT_CREATION_TIMEOUT and honor user-provided connection timeout by centralizing timeout logic in ConnectionRequest ([#5183](https://github.com/valkey-io/valkey-glide/issues/5183))
33+
* Java: Fix mget large binary data issue and add test case ([#5341](https://github.com/valkey-io/valkey-glide/pull/5341))
34+
* Java: Fix resource leak in integration tests where clients created via @MethodSource were never closed ([#5347](https://github.com/valkey-io/valkey-glide/issues/5347))
3235

3336
#### Operational Enhancements
3437
* Docs: Add missing references to windows-x86_64 classifier ([#5028](https://github.com/valkey-io/valkey-glide/pull/5028))

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")]

0 commit comments

Comments
 (0)