-
Notifications
You must be signed in to change notification settings - Fork 84
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
[TT-10520] Migrating from go-redis to storage library #765
Conversation
Apply Sweep Rules to your PR?
|
API tests result - postgres15-murmur64 env: success ✅
|
API tests result - postgres15-sha256 env: success ✅
|
API tests result - mongo44-sha256 env: success ✅
|
API tests result - mongo44-murmur64 env: success ✅
|
t.Run("Default addresses", func(t *testing.T) { | ||
opts := &redis.UniversalOptions{} | ||
simpleOpts := opts.Simple() | ||
|
||
if simpleOpts.Addr != "127.0.0.1:6379" { | ||
t.Fatal("Wrong default single node address") | ||
} | ||
|
||
opts.Addrs = []string{} | ||
clusterOpts := opts.Cluster() | ||
|
||
if clusterOpts.Addrs[0] != "127.0.0.1:6379" || len(clusterOpts.Addrs) != 1 { | ||
t.Fatal("Wrong default cluster mode address") | ||
} | ||
|
||
opts.Addrs = []string{} | ||
failoverOpts := opts.Failover() | ||
|
||
if failoverOpts.SentinelAddrs[0] != "127.0.0.1:26379" || len(failoverOpts.SentinelAddrs) != 1 { | ||
t.Fatal("Wrong default sentinel mode address") | ||
} | ||
}) |
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.
This test has been removed since it was testing Redis library-specific stuff - not related to the storage library
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.
@mativm02 let's remove all the "Redis" references from structures and file names. Also double check if Redis disconnect - pump is able to handle the reconnection and monitor the number of Redis connection created ( I don't think it should be a problem with the singleton but just in case)
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.
@mativm02 please add redis TLS opts and configurations
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.
LGTM
/release to release-1.9 |
Working on it! Note that it can take a few minutes. |
* migrating from go-redis to storage library * fixing issues * linting * fixing compilation error * linting * linting part 2 * adding constructor unit test * Updating storage to v1.1.0 * Fixing GetAndDeleteSet method * Modifying errors to 'fatal' type * Running go mod tidy * improving tests * improving tests * linting * removing fatal error * linting * fixing test * adding TLS Options * linting * simplifying code * Improving code readingness * Making model.Connector global variable a singleton * Update dependencies * removing commented code * linting (cherry picked from commit 407c373)
@mativm02 Succesfully merged PR |
… library (#765) (#777) * [TT-10520] Migrating from go-redis to storage library (#765) * migrating from go-redis to storage library * fixing issues * linting * fixing compilation error * linting * linting part 2 * adding constructor unit test * Updating storage to v1.1.0 * Fixing GetAndDeleteSet method * Modifying errors to 'fatal' type * Running go mod tidy * improving tests * improving tests * linting * removing fatal error * linting * fixing test * adding TLS Options * linting * simplifying code * Improving code readingness * Making model.Connector global variable a singleton * Update dependencies * removing commented code * linting (cherry picked from commit 407c373) * Fixing conflicts --------- Co-authored-by: Matias <[email protected]>
Description
This PR migrates all the Redis usage to storage/temporal.
Related Issue
https://tyktech.atlassian.net/browse/TT-10520?atlOrigin=eyJpIjoiMmY4YzJkMDA1YTRkNDg4MDlmODA5Y2VhYmJmYjM5ZjYiLCJwIjoiaiJ9
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
fork, don't request your
master
!master
branch (left side). Also, you should startyour branch off our latest
master
.go mod tidy && go mod vendor
go fmt -s
go vet