Go Redis Redis Versions Save

Redis Go client

v9.5.1

1 month ago

Changes

Note: This release fixes the SETINFO issue from 9.5.0. This release restores connections to redis versions that do not have SETINFO. Thank you to our amazing community for their help with this issue

🐛 Bug Fixes

  • bug: Fix SETINFO ensuring it is set-and-forget (#2915)

🧰 Maintenance

  • docs: README update to highlight how to disable sending client identification (#2913)

Contributors

We'd like to thank all the contributors who worked on this release!

@ofekshenawa

v9.5.0

2 months ago

Changes

Note: This release implements SETINFO by default, and currently breaks with Redis versions prior to 7.2 due to the way the change was implemented. It should have failed silently, but did not. 9.5.1 will fix this. To disable this behaviour, with this release, please DisableIdentity: true in your RedisOptions struct.

🚀 New Features

  • Add object fraq command (#2844)
  • Speed up connections by sending SetInfo via a pipeline (#2880)
  • Add helpers to set libinfo without panic (#2724)

🧰 Maintenance

  • Remove unnecessary Node project definition file (#2863)
  • Add support for specifying bitcount unit as byte or bit, byte default (#2887)
  • fix ConnPool race in newConn (#2885)

📚 Documentation & Testing

  • Docs: update features (#2846)
  • Docs: add bytes in scan struct example (#2836)
  • Tests: add ut for util_test (#2840)

⚙️ Dependencies & Infrastructure

  • chore: update OpenTelemetry and Uptrace to the latest version (#2864)
  • chore(deps): bump release-drafter/release-drafter from 5 to 6 (#2883)
  • chore(deps): bump rojopolis/spellcheck-github-actions from 0.35.0 to 0.36.0 (#2889)
  • chore(deps): bump golangci/golangci-lint-action from 3 to 4 (#2890)
  • Change RE image to 7.2.4-108 (#2884)
  • Add CredentialsProvider to ClusterOptions (#2791)

Contributors

We'd like to thank all the contributors who worked on this release!

@OlegStotsky, @abusizhishen, @dependabot, @dependabot[bot], @johnduhart, @limotley, @ofekshenawa, @peczenyj, @rfyiamcool, and @vmihailenco

v9.4.0

3 months ago

Changes

Breaking Changes

  • Revert #2818 due to it be a breaking change (#2861)

🚀 New Features

  • Add Suffix support to default client set info (#2852)

🧰 Maintenance

  • return raw value instead of function calling in Result() (#2831)
  • Add Redis Enterprise tests (#2847)

Contributors

We'd like to thank all the contributors who worked on this release!

@lowang-bh and @ofekshenawa

v9.3.1

4 months ago

Updates and Enhancements

  • Documentation and examples have been updated (#2806).
  • Redis values can now be scanned into pointer fields (#2787).
  • The URL format error in the Documentation has been corrected (#2789).
  • Cmder annotation has been added (#2816).
  • The Z member type has been changed to string (#2818).

🚀 New Features

  • BITFIELD_RO Command has been introduced (#2820).
  • Monitor Command is now supported (#2830).

🐛 Bug Fixes

  • "COMMAND" command is now executed only when readonly (#2815).

🧰 Maintenance and Dependency Updates

  • The usage of TSMadd ktvSlices has been clarified in the docstring (#2827).
  • Dependencies have been updated:
    • rojopolis/spellcheck-github-actions from 0.34.0 to 0.35.0 (#2807)
    • actions/stale from 8 to 9 (#2828)
    • actions/setup-go from 4 to 5 (#2829)

Contributors

We'd like to thank all the contributors who worked on this release!

@RyoMiyashita, @dependabot, @dependabot[bot], @lzakharov, @ofekshenawa, @rfyiamcool, @rouzier, @splundid and @x1nchen

v9.3.0

5 months ago

What's new?

JSON support

We are continuing to add support for more Redis data types in Go-Redis. Today, we are happy to announce support for JSON. JSON is a Redis data structure for storing, querying, and manipulating a single JSON document.

With a JSON key in Redis, you can:

  • Use it as a versatile hierarchical data type
  • Opt for it as a sophisticated alternative to the traditional hash data structure
  • Treat it as a singular document in a document-based database

The following example demonstrate how to get started with JSON in Go-Redis:

var ctx = context.Background()
client := redis.NewClient(&redis.Options{
	Addr: "localhost:6379",
})

type Bicycle struct {
	Brand       string
	Model       string
	Price       int
}

bicycle := Bicycle{
	Brand: "Velorim",
	Model: "Jigger",
	Price: 270,
}

_, err := client.JSONSet(ctx, "bicycle:1", "$", bicycle).Result()
if err != nil {
	panic(err)
}

res, err := client.JSONGet(ctx, "bicycle:1", ".Model").Result()
if err != nil {
	panic(err)
}
fmt.Println("bicycle:1 model is", res)

Learn more about JSON support in Redis

Other notable improvements

  • Allow using pointers of simple data types as command values (#2745) (#2753)
  • Add InfoMap command (#2665)

🐛 Bug Fixes

  • Handle wrapped errors in scripter.Run (#2674)
  • BUG: BFReserveArgs - error_rate & capacity (#2763)
  • fix: free turn of connection pool when leave with error (#2658)
  • Add BitMapCmdable to Cmdable. (#2737)

🧰 Maintenance

  • Option types must propagage missing fields (#2726)
  • fix missing fields in different Options (#2757)
  • update PubSub.Channel documentation (#2761)
  • Linking to Redis learning resources (#2759)
  • Creating CODEOWNERS for documentation (#2749)
  • chore(deps): bump rojopolis/spellcheck-github-actions from 0.33.1 to 0.34.0 (#2740)
  • chore(deps): bump google.golang.org/grpc from 1.55.0 to 1.56.3 in /example/otel (#2775)
  • chore(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /example/otel (#2776)
  • Fix OpenTelemetry link in README (#2755)

Contributors

We'd like to thank all the contributors who worked on this release!

@Sovietaced, @chayim, @chenjie199234, @cyningsun, @dependabot, @dependabot[bot], @fred84, @nic-gibson, @ofekshenawa, @peczenyj, @sethrylan, @snaffi, @tzq0301 and @vmihailenco

v9.2.1

6 months ago

🧰 Maintenance

  • chore(deps): bump actions/stale from 3 to 8 (#2732)
  • Add stream interface back to Cmdable (#2725)
  • Remove redundant nil check in gears (#2728)

Contributors

We'd like to thank all the contributors who worked on this release!

@Juneezee, @dependabot, @dependabot[bot], @gabrielgio and @ofekshenawa

v9.2.0

6 months ago

What's new?

Time series support

We are happy to announce support for Time Series. This enhancement allows developers to leverage the time series data structure directly within Go-Redis, enabling efficient ingestion, querying, and storage of time-sequential data. Whether you're tracking metrics, logs, or other time-sensitive information, this feature offers a robust solution to manage time series data seamlessly. We encourage developers to explore this new capability and provide feedback for further improvements. Learn more about Redis Time Series

Better support for Redis 7.2

Go-Redis now supports WAITAOF and CLIENT SETINFO commands introduced in Redis 7.2.

Other notable improvements

  • Add the ability to set a connection growth limit with MaxActiveConns configuration setting (#2646)
  • Add support for multiple values in the bitfield cmd (#2648)

Breaking Changes

  • Changing the suffix for probablistic commands acceptings arguments to WithArgs from Args (#2701)

🧰 Maintenance

  • Making command structs digestible (#2716)
  • change interfaces probabilistic and redis gears from private to public (#2695)
  • Adding CONTRIBUTING guidelines (#2718)
  • Adding Go 1.21.x for CI coverage (#2697)
  • chore(deps): bump actions/checkout from 3 to 4 (#2702)
  • chore(deps): bump github.com/bsm/ginkgo/v2 from 2.9.5 to 2.12.0 (#2690)
  • chore(deps): bump github.com/bsm/gomega from 1.26.0 to 1.27.10 (#2689)
  • Adding stale issues workflow (#2700)
  • Updating redis binary for makefile to 7.2.1 (#2693)
  • Skip flaky tests (#2699)
  • Format code and fix go vet (#2696)
  • Use time duration calculation (#2651)

Contributors

We'd like to thank all the contributors who worked on this release!

@NikanV, @SoulPancake, @chayim, @dependabot, @dependabot[bot], @nvorobev, @ofekshenawa, @peczenyj, @taytzehao and @wzlove

v9.1.0

8 months ago

What's new?

Triggers and Functions support

Triggers and Functions allow you to execute server-side functions triggered when key values are modified or created in Redis, a stream entry arrival, or explicitly calling them. Simply put, you can replace Lua scripts with easy-to-develop JavaScript or TypeScript code. Move your business logic closer to the data to ensure a lower latency, and forget about updating dependent key values manually in your code. Try it for yourself with Quick start

Support for All Probabilistic data structures

Probabilistic data structures, like Bloom filters, offer unique advantages when dealing with large datasets, such as memory efficiency, faster operations, and scalability. Go-Redis now supports all probabilistic data structures.

🐛 Bug Fixes

  • Fix bool ToBool bug (#2626)

🧰 Maintenance

  • Bump github.com/bsm/ginkgo/v2 from 2.7.0 to 2.9.5 (#2613)
  • Adds testable examples to be automatically pulled in redis.io docs (#2601)
  • Integrating spellcheck into CI (#2666)
  • Bumping redis versions (#2662)
  • Updating the README with connection options (#2661)
  • chore: fix staticcheck (#2631)

Contributors

We'd like to thank all the contributors who worked on this release!

@chayim, @dependabot, @dependabot[bot], @elena-kolevska, @kamyab98, @ofekshenawa, @testwill and @vmihailenco

v9.0.5

10 months ago

Changes

  • chore: release v9.0.5 (release.sh) (#2614)
  • chore: update otel example to the latest versions (#2606)
  • fix the reading of the "entries-read" field in XInfoStreamFull (#2595)
  • chore(deps): Update otel/metric to stable API (#2607)
  • feat: add field protocol to setupClusterQueryParams (#2600)
  • feat: add protocol option (#2598)

🚀 New Features

  • feat: Add ACL LOG (#2536)

Contributors

We'd like to thank all the contributors who worked on this release!

@SoulPancake, @ash2k, @ljun20160606, @monkey92t and @vmihailenco

v9.0.4

11 months ago

Changes

  • chore: release v9.0.4 (release.sh) (#2572)
  • chore(deps): Updating otel/metric and fixing breaking changes (#2569)
  • docs: update doc of redis option (#2567)
  • chore: fix typo in the result.go (#2558)
  • feat: add client info command (#2483)
  • Add ZRANK, ZREVRANK WITHSCORE (#2531)
  • Maintenance : Deprecate FCallRo & add FCallRO (#2550)
  • Add support for CLUSTER MYSHARDID command (#2530)
  • feat: no longer verify HELLO error messages (#2515)
  • test: redis-version to 7.2-rc1 (#2532)
  • doc: pass ctx in BLpop example for infinite wait time (#2540)
  • actions: build on go1.20.x (#2541)
  • fix: reader float parser (#2513)

🚀 New Features

  • Add support for MODULE LOADEX command (#2490)
  • feat: read the structure to increase the judgment of the omitempty op… (#2529)

Contributors

We'd like to thank all the contributors who worked on this release!

@SoulPancake, @ViBiOh, @iliyanm, @ktsivkov, @monkey92t, @mstmdev, @pranitbauva1997, @rfyiamcool and @vmihailenco