Skip to content

Commit

Permalink
Merge pull request #1014 from Workiva/release_2_20_0
Browse files Browse the repository at this point in the history
INFENG-5816 Release 2.20.0
  • Loading branch information
brianshannan-wf authored Jun 27, 2018
2 parents ce0ac3a + 7652166 commit f198cff
Show file tree
Hide file tree
Showing 151 changed files with 256 additions and 216 deletions.
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM drydock-prod.workiva.net/workiva/messaging-docker-images:210905 as build

ARG GIT_SSH_KEY
ARG KNOWN_HOSTS_CONTENT
WORKDIR /go/src/github.com/Workiva/frugal/
ADD . /go/src/github.com/Workiva/frugal/

RUN mkdir /root/.ssh && \
echo "$KNOWN_HOSTS_CONTENT" > "/root/.ssh/known_hosts" && \
chmod 700 /root/.ssh/ && \
umask 0077 && echo "$GIT_SSH_KEY" >/root/.ssh/id_rsa && \
eval "$(ssh-agent -s)" && ssh-add /root/.ssh/id_rsa

ARG GOPATH=/go/
ENV PATH $GOPATH/bin:$PATH
RUN git config --global [email protected]:.insteadOf https://github.com
ENV FRUGAL_HOME=/go/src/github.com/Workiva/frugal
ENV CODECOV_TOKEN='d88d0bbe-b5f0-4dce-92ae-a110aa028ddb'
RUN echo "Starting the script section" && \
./scripts/smithy.sh && \
cat $FRUGAL_HOME/test_results/smithy_dart.sh_out.txt && \
cat $FRUGAL_HOME/test_results/smithy_go.sh_out.txt && \
cat $FRUGAL_HOME/test_results/smithy_generator.sh_out.txt && \
cat $FRUGAL_HOME/test_results/smithy_python.sh_out.txt && \
cat $FRUGAL_HOME/test_results/smithy_java.sh_out.txt && \
echo "script section completed"

ARG BUILD_ARTIFACTS_RELEASE=/go/src/github.com/Workiva/frugal/frugal
ARG BUILD_ARTIFACTS_BUILD=/go/src/github.com/Workiva/frugal/python2_pip_deps.txt:/go/src/github.com/Workiva/frugal/python3_pip_deps.txt
ARG BUILD_ARTIFACTS_GO_LIBRARY=/go/src/github.com/Workiva/frugal/goLib.tar.gz
ARG BUILD_ARTIFACTS_PYPI=/go/src/github.com/Workiva/frugal/frugal-*.tar.gz
ARG BUILD_ARTIFACTS_ARTIFACTORY=/go/src/github.com/Workiva/frugal/frugal-*.jar
ARG BUILD_ARTIFACTS_PUB=/go/src/github.com/Workiva/frugal/frugal.pub.tgz
ARG BUILD_ARTIFACTS_TEST_RESULTS=/go/src/github.com/Workiva/frugal/test_results/*

FROM scratch
COPY --from=build /go/src/github.com/Workiva/frugal/frugal /bin/frugal
ENTRYPOINT ["frugal"]
2 changes: 1 addition & 1 deletion compiler/generator/dartlang/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ func (g *Generator) generateRead(s *parser.Struct) string {
if field.Modifier == parser.Required && g.isDartPrimitive(field.Type) {
fName := toFieldName(field.Name)
contents += fmt.Sprintf(tabtab+"if(!__isset_%s) {\n", fName)
contents += fmt.Sprintf(tabtabtab+"throw new thrift.TProtocolError(thrift.TProtocolErrorType.UNKNOWN, \"Required field '%s' was not present in struct %s\");\n", fName, s.Name)
contents += fmt.Sprintf(tabtabtab+"throw new thrift.TProtocolError(thrift.TProtocolErrorType.UNKNOWN, \"Required field '%s' is not present in struct '%s'\");\n", fName, s.Name)
contents += tabtab + "}\n"
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/generator/golang/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func (g *Generator) generateRead(s *parser.Struct, sName string) string {
if field.Modifier == parser.Required {
fName := snakeToCamel(field.Name)
contents += fmt.Sprintf("\tif !isset%s {\n", fName)
errorMessage := fmt.Sprintf("Required field %s is not set", fName)
errorMessage := fmt.Sprintf("Required field '%s' is not present in struct '%s'", fName, s.Name)
contents += fmt.Sprintf("\t\treturn thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf(\"%s\"))\n", errorMessage)
contents += "\t}\n"
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/generator/java/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ func (g *Generator) generateValidate(s *parser.Struct, indent string) string {
for _, field := range s.Fields {
if field.Modifier == parser.Required && !g.isJavaPrimitive(field.Type) {
contents += indent + tab + fmt.Sprintf("if (%s == null) {\n", field.Name)
contents += indent + tabtab + fmt.Sprintf("throw new org.apache.thrift.protocol.TProtocolException(\"Required field '%s' was not present for struct type '%s'\");\n",
contents += indent + tabtab + fmt.Sprintf("throw new org.apache.thrift.protocol.TProtocolException(\"Required field '%s' is not present in struct '%s'\");\n",
field.Name, s.Name)
contents += indent + tab + "}\n"
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/generator/python/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func (g *Generator) generateValidate(s *parser.Struct) string {
for _, field := range s.Fields {
if field.Modifier == parser.Required {
contents += fmt.Sprintf(tabtab+"if self.%s is None:\n", field.Name)
contents += fmt.Sprintf(tabtabtab+"raise TProtocol.TProtocolException(type=TProtocol.TProtocolException.INVALID_DATA, message='Required field %s is unset!')\n", field.Name)
contents += fmt.Sprintf(tabtabtab+"raise TProtocol.TProtocolException(type=TProtocol.TProtocolException.INVALID_DATA, message='Required field \\'%s\\' is not present in struct \\'%s\\'')\n", field.Name, s.Name)
}
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion compiler/globals/globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

// Version of the Frugal compiler.
const Version = "2.19.0"
const Version = "2.20.0"

// Global variables.
var (
Expand Down
2 changes: 1 addition & 1 deletion examples/dart/gen-dart/v1_music/lib/src/f_album.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

import 'dart:typed_data' show Uint8List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

class PerfRightsOrg {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

import 'dart:typed_data' show Uint8List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING


Expand Down
2 changes: 1 addition & 1 deletion examples/dart/gen-dart/v1_music/lib/src/f_track.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

import 'dart:typed_data' show Uint8List;
Expand Down
2 changes: 1 addition & 1 deletion examples/dart/gen-dart/v1_music/lib/v1_music.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

library v1_music;
Expand Down
4 changes: 2 additions & 2 deletions examples/dart/gen-dart/v1_music/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: v1_music
version: 2.19.0
version: 2.20.0
description: Autogenerated by the frugal compiler
environment:
sdk: ^1.13.0
Expand All @@ -8,7 +8,7 @@ dependencies:
hosted:
name: frugal
url: https://pub.workiva.org
version: ^2.19.0
version: ^2.20.0
logging: ^0.11.2
thrift:
hosted:
Expand Down
2 changes: 1 addition & 1 deletion examples/dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies:
hosted:
name: frugal
url: https://pub.workiva.org
version: ^2.19.0
version: ^2.20.0
logging: ^0.11.2
thrift:
hosted:
Expand Down
2 changes: 1 addition & 1 deletion examples/go/gen-go/v1/music/f_albumwinners_scope.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

package music
Expand Down
2 changes: 1 addition & 1 deletion examples/go/gen-go/v1/music/f_store_service.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

package music
Expand Down
2 changes: 1 addition & 1 deletion examples/go/gen-go/v1/music/f_types.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated by Frugal Compiler (2.19.0)
// Autogenerated by Frugal Compiler (2.20.0)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING

package music
Expand Down
2 changes: 1 addition & 1 deletion examples/go/glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import:
- package: github.com/Workiva/frugal
subpackages:
- lib/go
version: 2.19.0
version: 2.20.0
- package: github.com/nats-io/go-nats
version: 6b6bf392d34d01f57cc563ae123f00c13778bd57
- package: github.com/rs/cors
Expand Down
6 changes: 3 additions & 3 deletions examples/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

<groupId>com.workiva.frugal</groupId>
<artifactId>examples</artifactId>
<version>2.19.0</version>
<version>2.20.0</version>

<repositories>
<repository>
<id>workiva-release</id>
<name>workiva-release</name>
<url>http://artifactory.workiva.org/artifactory/workiva-release/</url>
<url>https://artifactory.workiva.org/artifactory/workiva-release/</url>
</repository>
</repositories>

Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.workiva</groupId>
<artifactId>frugal</artifactId>
<version>2.19.0</version>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
Expand Down
4 changes: 2 additions & 2 deletions examples/java/src/main/java/v1/music/Album.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autogenerated by Frugal Compiler (2.19.0)
* Autogenerated by Frugal Compiler (2.20.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
Expand Down Expand Up @@ -37,7 +37,7 @@
* The IDL provides set, list, and map types for representing collections
* of data. Our Album struct contains a list of Tracks.
*/
@Generated(value = "Autogenerated by Frugal Compiler (2.19.0)")
@Generated(value = "Autogenerated by Frugal Compiler (2.20.0)")
public class Album implements org.apache.thrift.TBase<Album, Album._Fields>, java.io.Serializable, Cloneable, Comparable<Album> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Album");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autogenerated by Frugal Compiler (2.19.0)
* Autogenerated by Frugal Compiler (2.20.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
Expand Down Expand Up @@ -42,7 +42,7 @@



@Generated(value = "Autogenerated by Frugal Compiler (2.19.0)")
@Generated(value = "Autogenerated by Frugal Compiler (2.20.0)")
public class AlbumWinnersPublisher {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autogenerated by Frugal Compiler (2.19.0)
* Autogenerated by Frugal Compiler (2.20.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
Expand Down Expand Up @@ -42,7 +42,7 @@



@Generated(value = "Autogenerated by Frugal Compiler (2.19.0)")
@Generated(value = "Autogenerated by Frugal Compiler (2.20.0)")
public class AlbumWinnersSubscriber {

/**
Expand Down
4 changes: 2 additions & 2 deletions examples/java/src/main/java/v1/music/FStore.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autogenerated by Frugal Compiler (2.19.0)
* Autogenerated by Frugal Compiler (2.20.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
Expand Down Expand Up @@ -57,7 +57,7 @@
import java.util.concurrent.*;


@Generated(value = "Autogenerated by Frugal Compiler (2.19.0)")
@Generated(value = "Autogenerated by Frugal Compiler (2.20.0)")
public class FStore {

private static final Logger logger = LoggerFactory.getLogger(FStore.class);
Expand Down
2 changes: 1 addition & 1 deletion examples/java/src/main/java/v1/music/PerfRightsOrg.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autogenerated by Frugal Compiler (2.19.0)
* Autogenerated by Frugal Compiler (2.20.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
Expand Down
4 changes: 2 additions & 2 deletions examples/java/src/main/java/v1/music/PurchasingError.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autogenerated by Frugal Compiler (2.19.0)
* Autogenerated by Frugal Compiler (2.20.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
Expand Down Expand Up @@ -37,7 +37,7 @@
* Exceptions are converted to the native format for each compiled
* language.
*/
@Generated(value = "Autogenerated by Frugal Compiler (2.19.0)")
@Generated(value = "Autogenerated by Frugal Compiler (2.20.0)")
public class PurchasingError extends TException implements org.apache.thrift.TBase<PurchasingError, PurchasingError._Fields>, java.io.Serializable, Cloneable, Comparable<PurchasingError> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PurchasingError");

Expand Down
4 changes: 2 additions & 2 deletions examples/java/src/main/java/v1/music/Track.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autogenerated by Frugal Compiler (2.19.0)
* Autogenerated by Frugal Compiler (2.20.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
Expand Down Expand Up @@ -36,7 +36,7 @@
/**
* Comments (with an @ symbol) will be added to generated code.
*/
@Generated(value = "Autogenerated by Frugal Compiler (2.19.0)")
@Generated(value = "Autogenerated by Frugal Compiler (2.20.0)")
public class Track implements org.apache.thrift.TBase<Track, Track._Fields>, java.io.Serializable, Cloneable, Comparable<Track> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Track");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion examples/python.asyncio/gen-py.asyncio/v1/music/f_Store.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion examples/python.asyncio/gen-py.asyncio/v1/music/ttypes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion examples/python.tornado/gen-py.tornado/v1/music/f_Store.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion examples/python.tornado/gen-py.tornado/v1/music/ttypes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
2 changes: 1 addition & 1 deletion examples/python/gen-py/v1/music/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Autogenerated by Frugal Compiler (2.19.0)
# Autogenerated by Frugal Compiler (2.20.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
Expand Down
Loading

0 comments on commit f198cff

Please sign in to comment.