Skip to content

Commit

Permalink
2.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
splittingred committed Jul 8, 2022
1 parent d81cbd4 commit 619a894
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ Changelog for the gruf gem. This includes internal history before the gem was ma

### Pending release

### 2.15.1

- Fix issue where GRPC_SERVER_POOL_KEEP_ALIVE and GRPC_SERVER_POLL_PERIOD when set via ENV are not cast to int

### 2.15.0

- NOTE: This changes the way that gruf controllers are autoloaded. See [UPGRADING.md] for more details.
- Autoload Gruf Controllers with zeitwerk, allowing for code reloading in development environments
- Add `GRUF_CONTROLLERS_PATH` ENV to allow ENV-based runtime configuration of path to gruf controller files
- Move `ServiceBinder` from instance to static class for performance improvements
Expand Down
16 changes: 15 additions & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
This document guides on how to upgrade between significant versions of Gruf.

## Upgrading to 2.15.x

In 2.15.x, autoloading of Gruf controllers via Zeitwerk was added. This, however, means that if you had Gruf controllers
in your controllers path (default of app/rpc) that did not follow the standard autoloading structure, you will get
loading errors on instantiation of gruf. A common example of this is naming the class a different name than the file
(when underscored). It is recommended to follow [Zeitwerk's naming structure](https://github.com/fxn/zeitwerk#the-idea-file-paths-match-constant-paths)
when creating controller files.

For example, the following Gruf controller named `::MyService::Rpc::ProductsController` should be in the path:
`app/rpc/my_service/rpc/products_controller.rb`.

Upgrading to Gruf 2.15 when you are not in compliance with the standard Zeitwerk/Rails file and class naming structures
will require getting your service into compliance to do so properly.

## Upgrading to 2.12

Gruf 2.12.x fixes a bug in prior versions where interceptors were executed in FILO order, rather than FIFO order, which
Expand All @@ -19,7 +33,7 @@ These closely map with their `GRPC::BadStatus` counterparts, and each subclass `
fully backwards compatible with your existing client error handling code, as the original exception through is still
available via `.error` on the raised exception.

However, one change is that Gruf will now catch `StandardError` and `GRPC::Core::CallError` exceptions at the client
However, one change is that Gruf will now catch `StandardError` and `GRPC::Core::CallError` exceptions at the client
boundary, and translate them into `Gruf::Client::Errors::Internal` exceptions in the client. If you have code that
does not expect this case, you will need to adjust accordingly.

Expand Down
2 changes: 1 addition & 1 deletion lib/gruf/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
module Gruf
VERSION = '2.15.1.pre'
VERSION = '2.15.1'
end

0 comments on commit 619a894

Please sign in to comment.