goa v1.2.0

Announcing goa v1.2.0


Today I am very pleased to announce the release of goa v1.2.0! This release contains all the changes made in the v1 branch of goa for the past 4 months - since the release of v1.1.0.

New Team Members!

While not directly related to this release this seems like a good opportunity to officially announce that Taichi Sasaki and Michael Boke have both joined to goa team!

Taichi was one of the first contributors to goa, his contributions are always of the highest quality. Apart from fixing many bugs and contributing actively to goa v2, Taichi also helped translate the entire https://goa.design/ja website into Japanese.

Michael is a long time user of goa and has already contributed some of the most intricate code generation algorithms to goa v2 including the server-side HTTP transport.

Both Taichi and Michael have already made a big impact on the development of v2 and I’m looking forward to collaborating with them on the next set of features!

New Features

The main new features that come with v1.2.0 are:

  • The use of the stdlib context package instead of golang.org/x/net/context. While technically a breaking change not a single user voted against that change in the poll issue (actually most people really wanted it). [#1177]

  • The entire goa.design website is now translated into Japanese thanks to the Herculean work of Taichi Sasaki and @ikawaha !!.

  • The generic tracer middleware makes it possible to load tracing headers in the request context. The xray package takes advantage of that to report traces to AWS X-Ray. Checkout the blog post for more details. Dominic Metzger fixed a number of issues in the initial implementation and added the ability to trace at the transport level. [#1004] [#1005] [#1026] [#1028] [#1129] [#1175] [#1185]

  • The JWT middleware now supports the ECDSA signing methods thanks to the excellent work of Tony Spataro. [#1014]

  • The new goagen controller command makes it possible to re-generate the scaffold for a single controller thanks to the work of Hector Fernandez. [#1049] [#1122]

Minor Additions

There were a few niceties added to goa v1.2 as well:

  • Scott Messier made is possible to set the request ID in the client request context. [#981]

  • Otto Giron refactored all the generators with nice constructor methods making it more convenient to use code generation programmatically. [#993] [#1001]

  • Bryce Reitano added the ability for goagen to generate the code that initializes the query string parameters with the default values defined in the design. [#1024]

  • The generated code include headers that match the Go standard for generated code as described in the corresponding Go issue.

  • It is now possible to use DSL when defining Hash attributes. The function takes two DSLs, the first applies to the hash keys and the second to the values. This makes it possible to attach validations and metadata to the hash keys and values. [#1172]

Bug Fixes

As always this release also comes with a number of bug fixes, in particular:

  • Peter Dulačka fixed the rendering of DateTime values in request paths. [#970]

  • Peter also fixed the rendering of parameters in client requests paths. [#977].

  • Bryce Reitano fixed the detection of custom encoder packages. [#974]

  • Bryce also made sure that the generated client includes a proper header comment. [#980]

  • Bryce also found a missing error handling in the controller code generation algorithm which would cause confusing errors. [#1118]

  • @ikawaha fixed a potential panic during DSL execution. [#979]

  • Dave Anderson reported another potential panic caused by invalid DSL. [#990]

  • Alexander Else fixed grammar issues with some of the generated error messages. [#996]

  • The generated client commands now properly handle missing required flags. [#1008]

  • Luna Duclos made sure that errors created with the https://github.com/pkg/errors package that occur during test execution would have their backtrace logged. [#1011]

  • @wardn made sure that the output directory gets created by goagen if needed when running the main command. [#1023]

  • Robbie McKinstry reported another potential DSL engine panic. [#1037]

  • Taichi Sasaki fixed another potential panic when generating client code for websocket endpoints. [#1052]

  • Hector Fernandez made the generated client tool flag use “kebab” case. [#1043]

  • Tony Spataro added proper escaping to the generated CORS paths. [#1068]

  • Tony also fixed the error handler so that it would not report any 5xx response status code as an internal error. [#1071]

  • Taichi Sasaki fixed a potential panic in the generated code that handles loading user types. [#1073]

  • Taichi also fixed the generated test helper code so that the names of local variable would not clash with the names of parameters. [#1084]

  • Juraj Sottnik fixed the definition of the error data structure so it would match the error media type. [#1089]

  • Yoshinori Sugiyama reported an issue with the Reference DSL function. [#1095]

  • @zandorz reported an issue where the generated Swagger would not always correctly set the Produces field on responses. [#1111]

  • Matteo Suppo fixed the generated test helper code for resources that define headers. [#1127]

  • Brian Lockwood reported an issue with the handling of parameters coming from parent resources. [#1145]

  • Jumpei added build tags so that goa services would compile properly under appengine. [#1145]

  • @deadcheat fixed the generation of default values for float values. [#1182]

  • Robert Henry reported an issue with validation error messages for range validations that apply to float values. [#1187]

As you can see a lot of work went into this release, many thanks to all the contributors!!

Looking forward I’m hoping the next release will be v2! v1 will stay around for a while though so I expect a v1.3.0 release 4 months from now.