Skip to content
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

Prepare Centrifugo v5.3.0 #781

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.21.6]
go-version: [1.22.1]
steps:
- name: Install Go
uses: actions/setup-go@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
Expand All @@ -23,7 +23,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
go-version: [1.21.6]
go-version: [1.22.1]
tarantool-version: [2.7.2]
steps:
- name: Install Go
Expand Down
4 changes: 2 additions & 2 deletions internal/apiproto/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/apiproto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,11 @@ message PushLimitStrategy {
message PushTimeLimitStrategy {
string send_after_time = 1; // HH:MM:SS
string send_before_time = 2; // HH:MM:SS
bool no_tz_send_now = 3; // If device timezone is not set - send push now.
bool no_tz_send_now = 3; // If device timezone is not set - send push now, by default will be dropped.
}

message PushRateLimitStrategy {
string key = 1; // key for rate limit policy, supports variables (user_id, device_id).
string key = 1; // optional key for rate limit policy, supports variables.
repeated RateLimitPolicy policies = 2;
bool drop_if_rate_limited = 3;
}
Expand Down
5 changes: 5 additions & 0 deletions internal/consuming/postgresql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"context"
"fmt"
"strings"
"sync"
"testing"
"time"

Expand Down Expand Up @@ -313,8 +314,12 @@ func TestPostgresConsumer_DifferentPartitions(t *testing.T) {

numEvents := 0

var dispatchMu sync.Mutex

consumer, err := NewPostgresConsumer("test", &MockLogger{}, &MockDispatcher{
onDispatch: func(ctx context.Context, method string, data []byte) error {
dispatchMu.Lock()
defer dispatchMu.Unlock()
require.Equal(t, testMethod, method)
require.Equal(t, testPayload, data)
numEvents++
Expand Down
19 changes: 17 additions & 2 deletions misc/release/notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Centrifugo is an open-source scalable real-time messaging server. Centrifugo can instantly deliver messages to application online users connected over supported transports (WebSocket, HTTP-streaming, SSE/EventSource, GRPC, SockJS, WebTransport). Centrifugo has the concept of a channel – so it's a user-facing PUB/SUB server.
Centrifugo is an open-source scalable real-time messaging server. Centrifugo can instantly deliver messages to application online users connected over supported transports (WebSocket, HTTP-streaming, SSE/EventSource, GRPC, WebTransport). Centrifugo has the concept of a channel – so it's a user-facing PUB/SUB server.

Centrifugo is language-agnostic and can be used to build chat apps, live comments, multiplayer games, real-time data visualizations, collaborative tools, etc. in combination with any backend. It is well suited for modern architectures and allows decoupling the business logic from the real-time transport layer.

Expand All @@ -8,6 +8,21 @@ For details, go to the [Centrifugo documentation site](https://centrifugal.dev).

## What's changed

This release adds validation of proper `history_ttl` and `history_meta_ttl` configuration. Adding validation means possible errors on Centrifugo start if you have improperly configured history meta TTL expiration. See more details below.

### Improvements

* Better error message for invalid connection token with channel claim, see [#776](https://github.com/centrifugal/centrifugo/issues/776)

### Fixes

* Fix nil pointer dereference upon calling presence stats – fixes the regression introduced by v5.2.1, [centrifugal/centrifuge#117fa3e](centrifugal/centrifuge/commit/117fa3e02289f193afa16d8b4e90e0cc4376d6a0)
* ❗Add validation on Centrifugo start for `history_meta_ttl` option to be greater than or equal to `history_ttl` option. Without this validation your history streams may eventually return error `The ID specified in XADD is equal or smaller than the target stream top item` during publish operation. See [#768](https://github.com/centrifugal/centrifugo/issues/768) for the details. This change won't affect you if you don't have `history_ttl` more than 30 days. Also, documentation about `history_meta_ttl` option was fixed since it contained different default values in different parts of the doc (the default changed in v5 together with [history meta ttl refactoring](https://centrifugal.dev/blog/2023/06/29/centrifugo-v5-released#history_meta_ttl-refactoring), but the doc was not properly updated).
* Web UI: redirect to the login screen in case of unauthorized errors from server, this fixes a regression introduced by Centrifugo v5.2.1
* Fix setting custom TTL in `gensubtoken` cli, see [#769](https://github.com/centrifugal/centrifugo/pull/769)

### Misc

* Release is built with Go 1.22.1
* All dependencies were updated to latest versions
* Built-in integration with Heroku was removed [#779](https://github.com/centrifugal/centrifugo/pull/779)
* ❗If you use SockJS – pay attention to [#765](https://github.com/centrifugal/centrifugo/issues/765) – in Centrifugo v6 SockJS support will be removed
Loading