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

Rest.li V30 major release #738

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 18 additions & 1 deletion CHANGELOG.md
Expand Up @@ -14,6 +14,22 @@ and what APIs have changed, if applicable.

## [Unreleased]

## [30.0.0] - 2021-12-02
- Upgrade Avro dependency to 1.9.2. Remove Avro adapters for Avro 1.4/1.6 and related module.
- Fix build-time validation of Action methods that return custom typerefs (e.g. `CustomLong`) yet don't indicate the
corresponding typeref class (e.g. `CustomLongRef.class`) in the `@Action` annotation.
- Clearly state that the `returnTyperef` annotation element is required for custom tyeprefs.
- Catch previously-unhandled reflection exception for `ActionResult`-wrapped return types (e.g. `ActionResult<CustomLong>`).
- Remove methods `ResourceContext#shouldReturnEntity` and `ResourceContextImpl#shouldReturnEntity`,
which have been deprecated since version `27.2.0`.
- Update Gradle version compatibility in the `pegasus` Gradle plugin.
- Minimum required Gradle version is now `5.2.1`
- Minimum suggested Gradle version is now `5.3`
- Delete the mainCopyPdscSchemas Gradle task. mainCopySchemas is the replacement.
- Delete the mainDestroyStaleSchemas Gradle task. mainCopySchemas is the replacement.
- Remove unused configurations "dataTemplateGenerator", "restTools", and "avroSchemaGenerator".
- Remove Guava dependency from `data-avro` module

## [29.22.15] - 2021-11-30
- Add mock response generator factory for BATCH_FINDER methods.
- Deprecate `FileFormatDataSchemaParser#new(String, DataSchemaResolver, DataSchemaParserFactory)`.
Expand Down Expand Up @@ -5134,7 +5150,8 @@ patch operations can re-use these classes for generating patch messages.

## [0.14.1]

[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.22.15...master
[Unreleased]: https://github.com/linkedin/rest.li/compare/v30.0.0...master
[30.0.0]: https://github.com/linkedin/rest.li/compare/v29.22.15...v30.0.0
[29.22.15]: https://github.com/linkedin/rest.li/compare/v29.22.14...v29.22.15
[29.22.14]: https://github.com/linkedin/rest.li/compare/v29.22.13...v29.22.14
[29.22.13]: https://github.com/linkedin/rest.li/compare/v29.22.12...v29.22.13
Expand Down
11 changes: 5 additions & 6 deletions build.gradle
Expand Up @@ -45,8 +45,7 @@ apply from: "${buildScriptDirPath}/configBuildScript.gradle"
project.ext.externalDependency = [
'antlr': 'org.antlr:antlr4:4.5',
'antlrRuntime': 'org.antlr:antlr4-runtime:4.5',
'avro': 'org.apache.avro:avro:1.4.0',
'avro_1_6': 'org.apache.avro:avro:1.6.3',
'avro': 'org.apache.avro:avro:1.9.2',
// avro compatibility layer
'avroUtil': 'com.linkedin.avroutil1:helper-all:0.2.17',
'caffeine': 'com.github.ben-manes.caffeine:caffeine:2.7.0',
Expand All @@ -65,9 +64,9 @@ project.ext.externalDependency = [
'guava': 'com.google.guava:guava:18.0',
'httpclient': 'org.apache.httpcomponents:httpclient:4.3.1',
'httpcore': 'org.apache.httpcomponents:httpcore:4.3.1',
'jacksonCore': 'com.fasterxml.jackson.core:jackson-core:2.9.7',
'jacksonSmile': 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.9.7',
'jacksonDataBind': 'com.fasterxml.jackson.core:jackson-databind:2.9.7',
'jacksonCore': 'com.fasterxml.jackson.core:jackson-core:2.10.2',
'jacksonSmile': 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.10.2',
'jacksonDataBind': 'com.fasterxml.jackson.core:jackson-databind:2.10.2',
'jacksonCoreAsl_1_4': 'org.codehaus.jackson:jackson-core-asl:1.4.2',
'jacksonCoreAsl_1_8': 'org.codehaus.jackson:jackson-core-asl:1.8.8',
'javaparser': 'com.github.javaparser:javaparser-symbol-solver-core:3.15.11',
Expand Down Expand Up @@ -215,7 +214,7 @@ subprojects {
all*.exclude group: 'org.apache.velocity', module: 'velocity'
}

if (!(it.name in ['data-avro', 'restli-int-test'])) {
if (!(it.name in ['restli-int-test'])) {
configurations {
// Prevent Guava from creeping in to avoid incompatibilities in multiple classloader environments.
compile.resolutionStrategy {
Expand Down
32 changes: 0 additions & 32 deletions data-avro-1_6/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -16,17 +16,24 @@

package com.linkedin.data.avro.generator;

import com.linkedin.avroutil1.compatibility.AvroCompatibilityHelper;
import com.linkedin.data.DataMap;
import com.linkedin.data.TestUtil;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.avro.Schema;
import org.apache.avro.Schema.Parser;
import org.apache.commons.compress.utils.IOUtils;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
Expand Down Expand Up @@ -338,7 +345,12 @@ private void run(String[] args, Map.Entry<File, Map.Entry<String, String>> entry
Schema avroSchema;
try
{
avroSchema = Schema.parse(avroSchemaInputStream);
avroSchema = AvroCompatibilityHelper.parse(
new BufferedReader(
new InputStreamReader(avroSchemaInputStream, StandardCharsets.UTF_8))
.lines()
.collect(Collectors.joining("\n"))
);
}
finally
{
Expand Down
1 change: 0 additions & 1 deletion data-avro/build.gradle
Expand Up @@ -5,7 +5,6 @@

dependencies {
compile project(':data')
compile externalDependency.guava
compile externalDependency.jacksonCoreAsl_1_4
compile externalDependency.avro
compile externalDependency.avroUtil
Expand Down