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

feat: Diregapic lro #858

Merged
merged 21 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1b7ee1e
feat: enable self signed jwt for gapic clients (#794)
arithmetic1728 Aug 17, 2021
7691f4e
chore: release 2.1.0 (#827)
release-please[bot] Aug 17, 2021
fdcfe70
feat: REGAPIC initial implementation (#824)
vam-google Aug 26, 2021
445daf4
feat: REGAPIC Multitransport implementation (grpc+rest) (#833)
vam-google Sep 6, 2021
92f7c1c
fix: [bazel] fix rest transport handling in assembly rule (#835)
vam-google Sep 7, 2021
556e7dd
Portable String <--> bytes conversion (#841)
chanseokoh Sep 14, 2021
d335340
Fix development doc (#837)
chanseokoh Sep 14, 2021
8ca140c
Remove warnings (unused vars, dead code, missing annotations, missing…
chanseokoh Sep 14, 2021
a7d905e
Remove warnings for test code (#842)
chanseokoh Sep 17, 2021
6a9f329
Remove extraneous call (#844)
chanseokoh Sep 17, 2021
98b891f
Fix preserving sorted order of a collection (#845)
chanseokoh Sep 20, 2021
cb1b534
feat: Add REST AIP-151 LRO suport
vam-google Sep 21, 2021
f569c11
chore(deps): update dependency gradle to v7 (#713)
renovate-bot Sep 29, 2021
73e5a3e
chore(deps): update dependency bazel_skylib to v1.0.3 (#722)
renovate-bot Sep 29, 2021
108e93d
chore(deps): update dependency bazel_skylib to v1.1.1 (#849)
renovate-bot Oct 1, 2021
cd84efe
chore(deps): update dependency gradle to v7.2 (#848)
renovate-bot Oct 1, 2021
3f0bf5a
chore: rename default branch to main (#851)
Neenu1995 Oct 4, 2021
aba0ec0
feat: enable self signed JWT for http (#850)
arithmetic1728 Oct 6, 2021
39c7b9c
Merge remote-tracking branch 'upstream/master' into diregapic-lro
vam-google Oct 6, 2021
d029941
chore: merge changes from master
vam-google Oct 6, 2021
0cf77b5
Merge remote-tracking branch 'upstream/main' into diregapic-lro
vam-google Oct 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Portable String <--> bytes conversion (#841)
  • Loading branch information
chanseokoh authored Sep 14, 2021
commit 556e7ddfd57ebc37a775ca0d44620a526b3cfab3
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.common.base.Strings;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
Expand Down Expand Up @@ -69,7 +70,9 @@ static Optional<List<GapicBatchingSettings>> parse(String gapicYamlConfigFilePat
String fileContents = null;

try {
fileContents = new String(Files.readAllBytes(Paths.get(gapicYamlConfigFilePath)));
fileContents =
new String(
Files.readAllBytes(Paths.get(gapicYamlConfigFilePath)), StandardCharsets.UTF_8);
} catch (IOException e) {
return Optional.empty();
}
Expand Down Expand Up @@ -104,7 +107,7 @@ private static Optional<List<GapicBatchingSettings>> parseFromMap(Map<String, Ob
batchingOuterYamlConfig.containsKey(YAML_KEY_DESCRIPTOR),
String.format(
"%s key expected but not found for method %s",
YAML_KEY_DESCRIPTOR, (String) methodYamlConfig.get(YAML_KEY_NAME)));
YAML_KEY_DESCRIPTOR, methodYamlConfig.get(YAML_KEY_NAME)));

// Parse the threshold values first.
Map<String, Object> batchingYamlConfig =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.google.common.base.Strings;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Map;
Expand Down Expand Up @@ -48,7 +49,9 @@ static Optional<GapicLanguageSettings> parse(String gapicYamlConfigFilePath) {
String fileContents = null;

try {
fileContents = new String(Files.readAllBytes(Paths.get(gapicYamlConfigFilePath)));
fileContents =
new String(
Files.readAllBytes(Paths.get(gapicYamlConfigFilePath)), StandardCharsets.UTF_8);
} catch (IOException e) {
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.google.common.base.Strings;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
Expand Down Expand Up @@ -56,7 +57,9 @@ static Optional<List<GapicLroRetrySettings>> parse(String gapicYamlConfigFilePat
String fileContents = null;

try {
fileContents = new String(Files.readAllBytes(Paths.get(gapicYamlConfigFilePath)));
fileContents =
new String(
Files.readAllBytes(Paths.get(gapicYamlConfigFilePath)), StandardCharsets.UTF_8);
} catch (IOException e) {
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.google.protobuf.util.JsonFormat;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.LinkedHashMap;
Expand All @@ -37,7 +38,8 @@ public static Optional<com.google.api.Service> parse(String serviceYamlFilePath)

String fileContents = null;
try {
fileContents = new String(Files.readAllBytes(Paths.get(serviceYamlFilePath)));
fileContents =
new String(Files.readAllBytes(Paths.get(serviceYamlFilePath)), StandardCharsets.UTF_8);
} catch (IOException e) {
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse;
import com.google.protobuf.util.JsonFormat;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
Expand Down Expand Up @@ -61,7 +62,7 @@ public static CodeGeneratorResponse write(
JarEntry jarEntry = new JarEntry(String.format("%s/%s.java", path, className));
try {
jos.putNextEntry(jarEntry);
jos.write(code.getBytes());
jos.write(code.getBytes(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new GapicWriterException(
String.format(
Expand All @@ -80,7 +81,7 @@ public static CodeGeneratorResponse write(
JarEntry jarEntry = new JarEntry(String.format("%s/package-info.java", path));
try {
jos.putNextEntry(jarEntry);
jos.write(code.getBytes());
jos.write(code.getBytes(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new GapicWriterException("Could not write code for package-info.java");
}
Expand All @@ -90,7 +91,8 @@ public static CodeGeneratorResponse write(
jarEntry = new JarEntry(String.format("%s/gapic_metadata.json", path));
try {
jos.putNextEntry(jarEntry);
jos.write(JsonFormat.printer().print(context.gapicMetadata()).getBytes());
jos.write(
JsonFormat.printer().print(context.gapicMetadata()).getBytes(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new GapicWriterException("Could not write gapic_metadata.json");
}
Expand Down