Skip to content

centraldogma-0.23.0

Choose a tag to compare

@trustin trustin released this 09 Apr 07:35
72fb097

Client

New features

  • #141 #172 Go client library

    • See the official GoDoc for more information.
    • CLI tool has been revamped to use the client library instead of sending an HTTP request by itself.
  • #169 Reorganization of Java client library

    • We will provide three Java client libraries:

      • Legacy Armeria-based Thrift client
      • Armeria-based REST client
      • Minimal REST client without Armeria dependency
    • There is only the legacy version that uses Thrift currently. Use the artifactId centraldogma-client-armeria-legacy until we provide the others.

    • Due to the reorganization, the instantiation of CentralDogma client has been changed in a backward-incompatible way:

      // Before
      CentralDogma oldDogma1 = CentralDogma.forHost("example.com");
      CentralDogma oldDogma2 = new CentralDogmaBuilder()...build();
      // After
      CentralDogma newDogma = new LegacyCentralDogmaBuilder()...build();
  • #184 Entry and QueryResult have been merged into a single type, Entry.

    CentralDogma dogma = ...;
    // Before
    QueryResult<JsonNode> res = dogma.watchFile("myProj", "myRepo", Revision.INIT,
                                                Query.ofJsonPath("/foo.json", "$"), 60000).join();
    // After
    Entry<JsonNode> res = dogma.watchFile("myProj", "myRepo", Revision.INIT,
                                          Query.ofJson("/foo.json"), 60000).join();
  • #184 Add Query.ofJson() and Query.ofText(), deprecating Query.identity()

    CentralDogma dogma = ...;
    // Before
    Entry<Object> entry = dogma.getFile("myProj", "myRepo", Rebision.HEAD,
                                        Query.identity("/foo.json")).join();
    JsonNode content = (JsonNode) entry.content();
    // After
    Entry<JsonNode> entry = dogma.getFile("myProj", "myRepo", Revision.HEAD,
                                          Query.ofJson("/foo.json")).join();
    JsonNode content = entry.content();
  • #184 Add more convenient methods to Entry.

    Entry<JsonNode> jsonEntry = ...;
    // Use Jackson to convert JsonNode into MyValue.
    MyValue myValue = jsonEntry.contentAsJson(MyValue.class);
    // Get the prettified textual representation.
    String prettyStr = jsonEntry.contentAsPrettyText();
    // It's now easier to map a value from a JSON file.
    CentralDogma dogma = ...;
    MyValue myValue = dogma.getFile("myProj", "myRepo", Revision.HEAD,
                                    Query.ofJson("/foo.json")).join()
                           .contentAsJson(MyValue.class);
  • #191 #193 Spring Boot 2 support

    • Use centraldogma-client-spring-boot1-* to integrate with Spring Boot 1.x.

Bug fixes

  • #165 More than one CentralDogma instance can be created with Spring Boot integration.
  • #171 NoClassDefFoundError when used with Spring Data

Deprecations

  • #184 Query.identity() has been deprecated in favor of Query.ofJson() and Query.ofText().
  • #184 CentralDogma.push() that requires an Author has been deprecated in favor of push() that does not require an Author.

Breaking changes

  • #169 Due to the reorganization, the instantiation of CentralDogma client has been changed in a backward-incompatible way.
    • See the 'new features' section above for more information.
  • #184 QueryResult has been removed in favor of Entry.
    • See the 'new features' section above for more information.
  • #184 Entry.content() now throws IllegalStateException instead of returning null when the Entry is a directory.

Server

New features

  • #133 Access control

  • #146 #147 TLS support

  • #181 Ability to serve HTTP and HTTPS on the same port

    • Specify http and https in the protocols section of dogma.json:

      {
        "ports": [ {
            "localAddress": { "host": "*", "port": 443 },
            "protocols": [ "http", "https" ]
        } ]
      }
  • #164 Read-only mode, which is allowed only to administrators

  • #167 Case-insensitive login name matching

    • Set caseSensitiveLoginNames to false to match login names case-insensitively.

Improvements

  • #186 Try again silently when LDAP server fails to respond during username-password authentication.
  • #185 Use Caffeine cache for web sessions, instead of Shiro's default implementation.
  • #177 Respond with the existing token if a user logs in again before the session expiration, so that tokens are not created unnecessarily.

Bug fixes

  • #192 Git-to-CD mirroring can stop permanently when the mirroring thread pool cannot mirror fast enough.

Dependencies

  • Armeria 0.60.0 -> 0.62.0
  • Curator 2.12.0 -> 4.0.1
  • futures-extra 3.0.0 -> 3.1.1
  • Go 1.9 -> 1.10.1
  • jGit 4.10.0 -> 4.11.0