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

release: v2023.3 #1744

Merged
merged 1 commit into from
Oct 5, 2023
Merged

release: v2023.3 #1744

merged 1 commit into from
Oct 5, 2023

Conversation

rustatian
Copy link
Member

@rustatian rustatian commented Oct 5, 2023

Reason for This PR

  • 2023.3 release.

Description of Changes

🚀 v2023.3.0 🚀

🔥 Features:

RR Core:

👀 JOBS plugin:

  • ✒️ AMQP Driver: Support for a custom routing_key in the JOBS payload: FR, (thanks @rauanmayemir)
  • ✒️ JOBS plugin: Parallel pipelines start/stop/destroy initialization. If you have much number of the pipelines,
    this feature should significantly reduce RR startup/shutdown time: FR, (thanks @Kaspiman)

👀 KV drivers (all):

  • ✒️ Support for OTEL across all KV drivers: FR

👀 App-Logger plugin:

  • ✒️ Added new methods for your logger to log with context (message + key-values array): FR, (thanks @Baiquette)

👀 Temporal plugin:

  • ✒️ Replay API support [SINCE PHP-SDK 2.6.0]: FR
  • ✒️ Add support for the Worker Versioning: FR

👀 Service plugin:

  • ✒️ Support for the user/group per-service: FR, (thanks @Kaspiman)

Configuration example:

service:
    schedule:run:
        command: "bin/console schedule:run"
        process_num: 1
        exec_timeout: 0s
        remain_after_exit: true
        service_name_in_log: false
        restart_sec: 60
        user: www-data  # <---------- [NEW]
        group: www-data # <---------- [NEW]

👀 HTTP plugin:

  • ✒️ Response streaming support FR, (thanks @roxblnfk)

Worker example:

<?php

require __DIR__ . '/vendor/autoload.php';

use Spiral\RoadRunner;

ini_set('display_errors', 'stderr');
require __DIR__ . "/vendor/autoload.php";

$worker = RoadRunner\Worker::create();
$http = new RoadRunner\Http\HttpWorker($worker);
$read = static function (): Generator {
    foreach (\file(__DIR__ . '/test.txt') as $line) {
        try {
            yield $line;
        } catch (Spiral\RoadRunner\Http\Exception\StreamStoppedException) {
            // Just stop sending data
            return;
        }
    }
};

try {
    while ($req = $http->waitRequest()) {
        $http->respond(200, $read());
    }
} catch (\Throwable $e) {
    $worker->error($e->getMessage());
}
  • ✒️ Support for the 103 Early Hints via streamed response: FR, (thanks @azjezz)

Worker example:

<?php

use Spiral\RoadRunner;

ini_set('display_errors', 'stderr');
require __DIR__ . "/vendor/autoload.php";

$worker = RoadRunner\Worker::create();
$http = new RoadRunner\Http\HttpWorker($worker);
$read = static function (): Generator {
    $limit = 10;
    foreach (\file(__DIR__ . '/test.txt') as $line) {
        foreach (explode('"', $line) as $chunk) {
            try {
                usleep(50_000);
                yield $chunk;
            } catch (Spiral\RoadRunner\Http\Exception\StreamStoppedException $e) {
                // Just stop sending data
                return;
            }
            if (--$limit === 0) {
                return;
            }
        }
    }
};


try {
    while ($req = $http->waitRequest()) {
        $http->respond(103, '', headers: ['Link' => ['</style111.css>; rel=preload; as=style'], 'X-103' => ['103']], endOfStream: false);
        $http->respond(200, $read(), headers: ['X-200' => ['200']], endOfStream: true); // your regular response
    }
} catch (\Throwable $e) {
    $worker->error($e->getMessage());
}

👀 Server plugin:

  • ✒️ RAW command support: Support for raw commands, which are not validated by RR and may contain spaces. Note that this feature is only supported via .rr.yaml configuration: FR, (thanks @nunomaduro)
    First argument should be a command (executable) and the rest of the arguments are passed to the command as arguments.
version: "3"

server:
  command: ["php", "../../php_test_files/client.php echo pipes"]
  relay: "pipes"
  relay_timeout: "20s"
version: "3"

server:
    command:
      - "php"
      - "../../php_test_files/client.php echo pipes"
    relay: "pipes"
    relay_timeout: "20s"

🩹 Fixes:

  • 🐛 RR Core: Actualize, according to the docs ./rr jobs list/stop/resume commands: PR, (thanks @gam6itko).
  • 🐛 JOBS plugin: Correctly handle OTEL span on listener error: PR, (thanks @Kaspiman).
  • 🐛 RR tests: Fix tests failures on Darwin: PR, (thanks @shyim).
  • 🐛 Streaming: Add stream timeout (will be configurable in the next release). Fix loss of the first chunk of the streamed response.

🧹 Chore:

  • 🧑‍🏭 Golang: Update Golang version to v1.21.
  • 🧑‍🏭 Dependencies: update project dependencies.

Summary by CodeRabbit

Release Notes:

  • New Feature: Added support for custom routing_key in AMQP driver.
  • New Feature: Implemented sdnotify support in RR Core.
  • New Feature: Introduced parallel pipelines start/stop/destroy initialization in JOBS plugin.
  • New Feature: Added new methods for logging with context in KV drivers.
  • New Feature: Enabled replay API support and worker versioning in Temporal plugin.
  • New Feature: Added user/group per-service support in Service plugin.
  • New Feature: Implemented response streaming support in HTTP plugin.
  • New Feature: Added RAW command support in Server plugin.
  • Bug Fix: Resolved issues related to RR Core, JOBS plugin, RR tests, and streaming.
  • Chore: Updated Docker image tags in CI/CD configuration.
  • Refactor: Enhanced OpenTelemetry resources, HTTP, jobs, gRPC, TCP, and Centrifuge configurations.

Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 5, 2023

Walkthrough

This update introduces enhanced Docker image tagging in CI/CD, expands configuration options for various services in .rr.yaml, and brings a host of new features and bug fixes across multiple plugins as detailed in CHANGELOG.md. A minor comment correction is also made in container/plugins.go.

Changes

File(s) Summary
.github/workflows/release.yml Enhanced Docker image tagging in CI/CD pipeline.
.rr.yaml Expanded configuration options for OpenTelemetry resources, HTTP, jobs, gRPC, TCP, and Centrifuge.
CHANGELOG.md Detailed list of new features, enhancements, and bug fixes across multiple plugins.
container/plugins.go Minor comment correction.

🐇 "In the land of code, where logic reigns,

Updates bloom like morning rains.

Docker tags, configs anew,

Bug fixes and features too!

So hop along, let's explore this trail,

In our quest, we shall not fail!" 🎉


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

@rustatian rustatian requested a review from wolfy-j October 5, 2023 21:40
@rustatian rustatian self-assigned this Oct 5, 2023
@rustatian rustatian added C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. R-stable Release: Nominated for backporting to the RR in the stable channel. labels Oct 5, 2023
@rustatian rustatian added this to the v2023.3.0 milestone Oct 5, 2023
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Qodana for Go

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Commits Files that changed from the base of the PR and between 977c81c and ea650c9.
Files ignored due to filter (3)
  • go.mod
  • go.sum
  • schemas/config/3.0.schema.json
Files selected for processing (4)
  • .github/workflows/release.yml (1 hunks)
  • .rr.yaml (7 hunks)
  • CHANGELOG.md (5 hunks)
  • container/plugins.go (1 hunks)
Files skipped from review due to trivial changes (2)
  • .github/workflows/release.yml
  • container/plugins.go
Additional comments (Suppressed): 5
.rr.yaml (2)
  • 573-600: The new hunk introduces OpenTelemetry resource attributes for service name, version, namespace, and instance ID. Ensure that these values are correctly set as per your application's requirements. The default value for service_instance_id is a generated UUID, but it's currently set to "UUID" which might not be unique.
      # Default: Generated UUID
      service_instance_id: "UUID"
      service_instance_id: "<Generated or Unique UUID>"
  • 2164-2167: These lines introduce a new configuration option stream_timeout for stream cancellation. The comment says "Zero means 60s", but the default value is also set to 60s. If zero is intended to represent a different behavior (like no timeout), this could lead to confusion. Clarify the purpose of zero and ensure the default value aligns with the intended behavior.
CHANGELOG.md (3)
  • 3-18: The new hunk introduces the features and improvements in version v2023.3.0 of the RoadRunner server. The changes are well-documented with links to the relevant pull requests or issues, and contributors are acknowledged. No issues found.

  • 22-35: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [22-46]

This hunk continues the list of features and improvements in different plugins like JOBS plugin, Temporal plugin, Service plugin, and HTTP plugin. Each feature is linked to its corresponding feature request (FR) or issue on GitHub, providing traceability. No issues found.

  • 154-165: This hunk lists the bug fixes and chores done in this release. Each fix is linked to its corresponding pull request (PR) on GitHub, providing traceability. The chores section mentions the update of Golang version and project dependencies. No issues found.

CHANGELOG.md Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #1744 (ea650c9) into master (977c81c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1744   +/-   ##
=======================================
  Coverage   37.12%   37.12%           
=======================================
  Files          16       16           
  Lines         862      862           
=======================================
  Hits          320      320           
  Misses        516      516           
  Partials       26       26           
Files Coverage Δ
container/plugins.go 100.00% <ø> (ø)

@rustatian rustatian merged commit 90544d7 into master Oct 5, 2023
15 of 16 checks passed
@rustatian rustatian deleted the release/v2023.3.0 branch October 5, 2023 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement. Meaning improvements of current module, transport, etc.. R-stable Release: Nominated for backporting to the RR in the stable channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant