profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/jameskleeh/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

grails-plugins/grails-spring-security-rest 197

Grails plugin to implement token-based, RESTful authentication using Spring Security

jameskleeh/angular-confirm 154

Confirmation modal dialog for AngularJS

grails-fields-plugin/grails-fields 82

a spiritual successor to the bean-fields plugin

grails/gorm-graphql 77

An automatic GraphQL schema generator for GORM

grails/grails-views 52

Additional View Technologies for Grails

grails/gorm-hibernate5 50

GORM for Hibernate 5

grails/grails-static-website 20

Static version of the website

grails/grails-testing-support 9

Trait-based testing library for Grails framework

grails-plugins/grails-java8 8

A plugin to support Java 8 specific functionality

push eventmicronaut-projects/micronaut-core

Chernogorov Vladislav

commit sha 75cf5a203c018858a54ebd1c216e79844bfe2a5a

Jackson JSON factory feature support (#6110) * Create a spec for JsonFactory bean * Create JsonFactory bean in ObjectMapperFactory and populate it with JacksonConfiguration properties * Update licensing * Add a test for JsonFactorySetupSpec

view details

push time in a day

PR merged micronaut-projects/micronaut-core

Jackson JSON factory feature support

Support for issue #4768 (Support Jackson Configuration for JsonFactory).

+105 -2

7 comments

3 changed files

Praytic

pr closed time in a day

pull request commentmicronaut-projects/micronaut-core

Jackson JSON factory feature support

Thanks for the PR!

Praytic

comment created time in a day

pull request commentmicronaut-projects/micronaut-core

Fix support nullable inputstream / empty publisher for body

@graemerocher I would say just revert that one line for this PR and introduce another PR that targets 3.1.x if you want to introduce a new feature to the binder

graemerocher

comment created time in a day

push eventmicronaut-projects/micronaut-core

James Kleeh

commit sha 6400b67eaa14c8075efb86f7f8a373ba4e3a5418

Pr 6167 Additions (#6171) * Do not forward onComplete before all elements have been processed * Add test and offload writing of stream to the IO pool * Delay injection of the io executor Co-authored-by: yawkat <jonas.konrad@oracle.com>

view details

push time in a day

delete branch micronaut-projects/micronaut-core

delete branch : pr-6167

delete time in a day

push eventmicronaut-projects/micronaut-core

jameskleeh

commit sha 6122d5ffc4d9d673a2535d7136d66cd11dad8c97

Delay injection of the io executor

view details

push time in 2 days

pull request commentmicronaut-projects/micronaut-core

Fix support nullable inputstream / empty publisher for body

This introduces a breaking change in behavior where previously a request without a body to a method like @Body Publisher<byte[]> body would produce a bad request response:

{"message":"Bad Request","_links":{"self":{"href":"/","templated":false}},"_embedded":{"errors":[{"message":"Required Body [body] not specified","path":"/body"}]}}

But now the method is executed with an empty publisher. Because the user did not add @Nullable to the argument I think the previous behavior is more desirable because now it is up to the user to determine what should happen if no data is produced.

graemerocher

comment created time in 2 days

push eventmicronaut-projects/micronaut-core

Graeme Rocher

commit sha ab5b674488c197f81e8663eca22805829adcbc7d

Replace use of @Overrides with caching (#6168) * Replace use of @Overrides with caching. Fixes #6158 * Optimize with loop

view details

push time in 2 days

delete branch micronaut-projects/micronaut-core

delete branch : issue-6158

delete time in 2 days

PR merged micronaut-projects/micronaut-core

Reviewers
Replace use of @Overrides with caching type: bug

The root cause of #6158 is that incremental compilation doesn't work properly with source retention annotations. The reason for this is that Gradle materializes an element from compiled byte code when compiling incrementally and this element no longer has the source level annotations like @Overrides.

This is a bummer since it means that source level annotations cannot be used in general with incremental compilation. I am not sure if we should be printing warnings if incremental is enabled and any source level retention annotations are used.

Nevertheless we were relying on @Overrides to detect when to inherit annotations so when compiling incrementally these annotations disappeared from the incremental result.

The fix here replaces the reliance of @Overrides with a cache and optimizes the code to be more performant. This cache is cleared at the end of each compilation round to ensure it is not stale.

Fixes #6158

+68 -77

1 comment

3 changed files

graemerocher

pr closed time in 2 days

issue closedmicronaut-projects/micronaut-core

overlapping routes doesn't work in 3.0.1

Expected Behavior

When having two controller with overlapping routes like

  • /first/{id}
  • /first/{id}/second/{id2}

I expect that both Controller can be called by there routes

Actual Behaviour

In 3.0.1 only the second route is registered anymore. a Request to the first one will result in a 404

Steps To Reproduce

  • clone https://github.com/volkerrichert/overlappingRoutes
  • build & run
  • call http://localhost:8080/first/123 -> 404
  • call http://localhost:8080/first/123/second/456 -> 200
  • comment all the MN stuff in API2 & controller2
  • clear
  • rebuild & run
  • call http://localhost:8080/first/123 -> 202

You can also check /routes

Environment Information

  • Windows 11
  • JDK 11
  • MN 3.0.1

MN 2.5 works as expected

Example Application

https://github.com/volkerrichert/overlappingRoutes

Version

3.0.1

closed time in 2 days

volkerrichert

push eventmicronaut-projects/micronaut-core

Cédric Champeau

commit sha 612b1caedf1539cdb6bb5ae1a67b41eebe4fd4ab

Use nanoTime for durations (#6166) The previous code was using `System.currentTimeMillis()` for time measurement but this method is not guaranteed to be monotonic. For duration measurements on a single VM, the `nanoTime()` method should be used instead.

view details

push time in 2 days

delete branch micronaut-projects/micronaut-core

delete branch : cc/elapsed-time

delete time in 2 days

PR merged micronaut-projects/micronaut-core

Use nanoTime for durations type: improvement

The previous code was using System.currentTimeMillis() for time measurement but this method is not guaranteed to be monotonic. For duration measurements on a single VM, the nanoTime() method should be used instead.

+9 -7

0 comment

1 changed file

melix

pr closed time in 2 days

PR closed micronaut-projects/micronaut-core

Do not forward onComplete before all elements have been processed

This fixes another issue that I believe to be a bug with SingleThreadedBufferingSubscriber: Even if onComplete arrives before all data has been requested by the downstream (i.e. when we're buffering), the onComplete would be forwarded immediately and the buffered elements would be dropped (processDemand does nothing in state DONE).

This patch delays the doOnComplete call until all elements have been flushed.

Unlike #6147, which was clearly a bug, this patch is technically a behavior change. But it seems like the behavior implementors would expect.

+63 -3

1 comment

2 changed files

yawkat

pr closed time in 2 days

pull request commentmicronaut-projects/micronaut-core

Do not forward onComplete before all elements have been processed

Superseded by #6171

yawkat

comment created time in 2 days

create barnchmicronaut-projects/micronaut-core

branch : pr-6167

created branch time in 2 days

issue closedmicronaut-projects/micronaut-core

ExecuteOn with a fixed thread pool doesn't increase concurrency beyond 1

Expected Behavior

I expected that my server would be able to process 2 requests in parallel.

Actual Behaviour

The server was only able to process one request at a time. I had a Thread.sleep(5000); line in my controller method and invoked the URL twice at about the same time in my web browser. It took about 5 seconds for the first response to come back and about 10 seconds for the second response to come back.

Steps To Reproduce

  1. Use Micronaut Launch to create a new app with every setting at default except changing Java 11 to Java 16.
  2. Open the project in an IDE edit the source code.
  3. Follow the latest 3.0.1 Micronaut documentation under "Reactive HTTP Request Processing" (https://docs.micronaut.io/latest/guide/).
  4. Edit the application.yml file according to the documentation to set the IO thread pool to a fixed pool of size 75. The finished config file looks like:
micronaut:
  application:
    name: micronautTest
  executors:
    io:
      type: fixed
      nThreads: 75
  1. Continuing to follow the documentation, annotate your controller method with @ExecuteOn(ExecutorsService.IO). The finished controller looks like:
package com.mattwelke;

import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import io.micronaut.scheduling.TaskExecutors;
import io.micronaut.scheduling.annotation.ExecuteOn;

@Controller("/")
@ExecuteOn(TaskExecutors.IO)
public class UsersController {
    @Get("/{id}")
    String getUser(String id) {
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
            return "could not get user: " + e.getMessage();
        }
        return "User with ID: " + id;
    }
}

  1. Run with ./gradlew run.
  2. Open two web browser tabs and load http://localhost:8080/abc in each at the same time.
  3. Observe that it takes about 10 seconds for the second tab to get its response, inferring that the server was only able to process one request at a time.

Environment Information

  • Windows 10 Pro
  • Oracle OpenJDK 16

Example Application

https://github.com/mattwelke/micronaut-bug-report-sep-13

Version

3.0.1

closed time in 4 days

mattwelke

push eventmicronaut-projects/micronaut-core

Graeme Rocher

commit sha 9f60f5fd9c1fc4ecd6683324b6215823c1be408a

Support an API to start multiple netty servers (#6152) * Support an API to start multiple netty servers * Fix checkstyle * Add documentation * address feedback * fix checkstyle * fix tests * Rollback possible breaking change * fix kotlin test * fix compilation error

view details

push time in 4 days

delete branch micronaut-projects/micronaut-core

delete branch : multiple-netty-servers

delete time in 4 days

PR merged micronaut-projects/micronaut-core

Reviewers
Support an API to start multiple netty servers type: enhancement
  • Refactor NettyHttpServer and introduce NettyEmbeddedServices since the number of constructor parameters had started to make the code a bit of a cluster
  • Deprecate netty.responses.file config since it made no sense that this wasn't grouped under micronaut.server.netty
  • Reduce the number of beans since internal APIs like NettyCustomizableResponseTypeHandlerRegistry don't need to be beans since they are not extension points for the framework
  • Introduce NettyEmbeddedServerFactory which allows building an instance of NettyEmbeddedServer programmatically if a user wants to build one or more additional servers
+1550 -345

0 comment

46 changed files

graemerocher

pr closed time in 4 days

issue commentmicronaut-projects/micronaut-core

ExecuteOn with a fixed thread pool doesn't increase concurrency beyond 1

@mattwelke Are you observing this in an environment with limited CPUs?

mattwelke

comment created time in 4 days

push eventmicronaut-projects/micronaut-core

Iván López

commit sha ce2f2dadda2a1166b6da3668d30e4d574217e22e

Fix docs publish to 'latest'

view details

James Kleeh

commit sha 8da7f725d6b750d9a48dc3b0e2a5678763a1040b

Don't emit response if the argument is void. Fixes #6095 (#6115)

view details

micronaut-build

commit sha 5266c3700c04ccb99ac77813e2a18a240085313e

Bump micronaut-openapi to 3.0.3 (#6123)

view details

Cédric Champeau

commit sha de34e4d418b7b7d0ede3ee118fceead2ab5d4b73

Initial work to modernize the Gradle build (#6067) * Remove unused variables * Introduce a version catalog This commit replaces the "dependencyVersion" and "dependencyModuleVersion" calls with Gradle's version catalogs. In the process, I tried to clarify what belongs to the BOM (as "managed" dependencies") vs what is not. Currently this breaks BOM verification module, this will be fixed in another commit. It will also probably break the automatic upgrading of dependencies. However, the result is much cleaner: there are no duplicate coordinates anymore in build files. * Publish a version catalog alongside the BOM This commit introduces a new artifact published alongside the BOM: a Gradle _version catalog_. A version catalog is not a replacement for a BOM. It can be seen as an alternative, or a complement to a BOM file. For example, a user can import the Micronaut version catalog in their settings file by doing: ```gradle dependencyResolutionManagement { versionCatalogs { create("mn") { from("io.micronaut:micronaut-bom:3.0.1-SNAPSHOT") } } } ``` Gradle will then generate _version accessors_, which allows replacing dependency notations from: ```gradle implementation "ch.qos.logback:logback-classic" ``` to: ```gradle implementation mn.logback ``` Those accessors are _type safe_. Version catalogs should really be seen as "recommendations". Without applying a BOM in addition, the versions declared in a catalog have _no impact_ on dependency resolution. Therefore, it is often recommended to apply both the BOM _and_ use catalogs to declare dependencies. It comes with an advantage, which is that versions declared in the BOM can be overridden by the user: ```gradle dependencyResolutionManagement { versionCatalogs { create("mn") { from("io.micronaut:micronaut-bom:3.0.1-SNAPSHOT") version("snakeyaml") { strictly("1.28") } } } } ``` * Workaround JSON ordering issue under JDK 15 on CI * Integrate Jackson to the BOM It looks like it was a mistake that it wasn't present in the BOM already.

view details

Cédric Champeau

commit sha 084a5058d156e6c6a08b9b738f1108ee4b3ed5d6

Fix packaging of the BOM (#6131) Works around https://github.com/gradle/gradle/issues/18245 Fixes #6129

view details

Iván López

commit sha 8e19f0d32ece2bee5b2c86d104b93db4403a6fb5

Add missing libraries to the BOM (#6132) Fixes #6130

view details

Cédric Champeau

commit sha 3b31252241ceaec6d407851c25e82796d1300d02

Add a sanity check to make sure that the catalog is valid (#6135) In case a managed library references a non managed version, the build used to fail with a weird message (either string index out of bounds error, or a truncated version name). The build will now fail with a proper message explaining that you have to use a managed version too.

view details

Graeme Rocher

commit sha 9de5f7bc2b9b3ec9924b48755e3eb897b10119c2

Don't block the event loop when reading inputstream. (#6120) * Don't block the event loop when reading inputstream. Fixes #6100 * Use only publishOn * add issue link * synchronize access to input stream * Lazily init processor * Skip offloading to IO Co-authored-by: jameskleeh <james.kleeh@gmail.com>

view details

dependabot[bot]

commit sha bc6268f204d3205b4403fc13af1eba5c30c523db

Bump micronaut-gradle-plugins from 4.0.1 to 4.1.1 (#6133) Bumps [micronaut-gradle-plugins](https://github.com/micronaut-projects/micronaut-build) from 4.0.1 to 4.1.1. - [Release notes](https://github.com/micronaut-projects/micronaut-build/releases) - [Commits](https://github.com/micronaut-projects/micronaut-build/compare/v4.0.1...v4.1.1) --- updated-dependencies: - dependency-name: io.micronaut.build.internal:micronaut-gradle-plugins dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

dependabot[bot]

commit sha 1dc32b2d98e646d04b9b8bf5a67e22d51e7e598c

Bump me.champeau.jmh from 0.6.4 to 0.6.6 (#6134) Bumps me.champeau.jmh from 0.6.4 to 0.6.6. --- updated-dependencies: - dependency-name: me.champeau.jmh dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

Joel Mongård

commit sha 252e3464a710663a4f73caf8b0215c265b508a74

fix: DefaultHttpHostResolver should not return port -1 when missing HOST header (#6139) (#6140)

view details

Sergio del Amo

commit sha a17acc713d6cb6b5f51354be8a5415797a85d64a

test: ClientFilter reactor ctx has req in flatMap (#6127) * test: ClientFilter reactor ctx has req in flatMap #6126 This contains a test annotated with @PendingFeature with /four path which fails. * Make test less brittle and fix loss of the context * Fix test Co-authored-by: jameskleeh <james.kleeh@gmail.com>

view details

Iván López

commit sha 297cbdc72e938deca5089968961cbb2576d5180b

Upgrade Micronaut Elasticsearch to 3.0.1 (#6148)

view details

jameskleeh

commit sha fb109714d62c099d05b67a9c1ad081fe51472732

Fix tests

view details

Iván López

commit sha 6ab7053b37394e586e21755e0ef3f174612a33c9

Upgrade to Netty 4.1.68 and Tcnative 2.0.42 (#6151)

view details

Jonas Konrad

commit sha 1b537c2450d64eab34708d26e9849613f2d5a4f1

Fix infinite loop when requesting demand in SingleThreadedBufferingSubscriber (#6147)

view details

Iván López

commit sha e48d97c61b8822bb4e349da5beefb16d514b6fe5

Upgrade Micronaut Test to 3.0.1 (#6156)

view details

Graeme Rocher

commit sha bfd1725b3c8bdaf38317b0b287eaa3083e544ee3

Correctly handle absence of request. Fixes #6096 (#6122)

view details

jameskleeh

commit sha 6548c874962c3386a2739fb4f8dbc9bc8199b9a3

Merge branch '3.0.x' into 3.1.x

view details

push time in 4 days

issue commentmicronaut-projects/micronaut-core

overlapping routes doesn't work in 3.0.1

I can't reproduce

overlappingRoutes main $ curl localhost:8080/first/3
first: 3overlappingRoutes main $ curl localhost:8080/first/3/second/4
second: 3/4overlappingRoutes main $ 
volkerrichert

comment created time in 4 days

push eventmicronaut-projects/micronaut-core

Jonas Konrad

commit sha 1b537c2450d64eab34708d26e9849613f2d5a4f1

Fix infinite loop when requesting demand in SingleThreadedBufferingSubscriber (#6147)

view details

push time in 4 days

PR merged micronaut-projects/micronaut-core

Fix infinite loop when requesting demand in SingleThreadedBufferingSubscriber

I found this issue when debugging #6100. It is definitely a bug, but I am not sure yet how important it is to that issue.

Before this patch, requesting data from a SingleThreadedBufferingSubscriber when it is in BUFFERING state would cause an infinite loop.

request first registers the new demand, and then calls flushBuffer to fulfill some of the new demand using currently buffered data. If there was no previous demand, this happens in BUFFERING state. flushBuffer then tries to remove data from the buffer and submit it using onNext, until the buffer is empty or there is no more demand. However, in BUFFERING state, onNext simply readds the data to the buffer and does not touch the demand, so this is an infinite loop.

This fix extracts the "forwarding logic" in onNext to its own method, that does not consider the current state. flushBuffer now uses that method instead of onNext.

+74 -14

0 comment

2 changed files

yawkat

pr closed time in 4 days

push eventmicronaut-projects/micronaut-core

Iván López

commit sha 6ab7053b37394e586e21755e0ef3f174612a33c9

Upgrade to Netty 4.1.68 and Tcnative 2.0.42 (#6151)

view details

push time in 4 days