Skip to main content

Turbine CLI bug fix release

· 3 min read

Meroxa CLI version v2.20.1 includes bug fixes for a broken link, a bug in the Notion Resource, inaccurate exit codes, and difficulty pulling in the latest release of a Golang app dependency.

After paths were updated on docs.meroxa.com, a link in the output of the meroxa apps init command for a Golang app was broken. For guidance on finishing the process of initializing the go module, the link now correctly points here.

Bug in Notion Resource support

Turbine Applications that have a Notion Resource were throwing RPC errors when trying to run locally.

$ meroxa app run
<_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "invalid ProcessCollectionRequest.Collection: embedded message failed validation | caused by: invalid Collection.Name: value length must be at least 1 runes"
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"invalid ProcessCollectionRequest.Collection: embedded message failed validation | caused by: invalid Collection.Name: value length must be at least 1 runes", grpc_status:2, created_time:"2023-05-11T13:29:22.799764807-07:00"}"
>

With this latest CLI, the behavior is restored to the following result:

$ meroxa app run
Destination s3/notion-pages-with-character-count
----------------------
index|record
----|----
0|{"payload":{"after":{"metadata":{"notion.archived":"false","notion.createdBy":"{\"object\":\"user\",\"id\":\"ee6bdc50-6db2-4805-87d0-3ca2501f7773\"}","notion.createdTime":"2022-12-23T20:32:00Z","notion.lastEditedBy":"{\"object\":\"user\",\"id\":\"ee6bdc50-6db2-4805-87d0-3ca2501f7773\"}","notion.lastEditedTime":"2022-12-23T23:55:00Z","notion.parent":"{\"type\":\"workspace\",\"workspace\":true}","notion.title":"Blog Post","notion.url":"https://www.notion.so/Blog-Post-3812a92e742340e09f75d7c6669091d7"},"plaintext":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. A iaculis at erat pellentesque adipiscing commodo. Pharetra magna ac placerat vestibulum lectus mauris ultrices. Gravida dictum fusce ut placerat orci nulla pellentesque dignissim. Aliquet enim tortor at auctor urna nunc id cursus metus. Malesuada pellentesque elit eget gravida cum sociis natoque penatibus."},"before":null,"op":"c","source":{"conduit.source.connector.id":"a032099c-031e-44c6-98bb-9ff46f88744a","opencdc.readAt":"1675734727936759010","opencdc.version":"v1"},"transaction":null,"ts_ms":1675734727936},"schema":{"fields":[{"field":"before","fields":[{"field":"plaintext","type":"string"},{"field":"metadata","fields":[{"field":"notion.createdTime","type":"string"},{"field":"notion.lastEditedBy","type":"string"},{"field":"notion.lastEditedTime","type":"string"},{"field":"notion.parent","type":"string"},{"field":"notion.title","type":"string"},{"field":"notion.url","type":"string"},{"field":"notion.archived","type":"string"},{"field":"notion.createdBy","type":"string"}],"optional":true,"type":"struct"}],"optional":true,"type":"struct"},{"field":"after","fields":[{"field":"plaintext","type":"string"},{"field":"metadata","fields":[{"field":"notion.createdBy","type":"string"},{"field":"notion.createdTime","type":"string"},{"field":"notion.lastEditedBy","type":"string"},{"field":"notion.lastEditedTime","type":"string"},{"field":"notion.parent","type":"string"},{"field":"notion.title","type":"string"},{"field":"notion.url","type":"string"},{"field":"notion.archived","type":"string"}],"optional":true,"type":"struct"}],"optional":true,"type":"struct"},{"field":"source","fields":[{"field":"conduit.source.connector.id","type":"string"},{"field":"opencdc.version","type":"string"},{"field":"opencdc.readAt","type":"string"}],"optional":true,"type":"struct"},{"field":"op","type":"string"},{"field":"ts_ms","optional":true,"type":"int64"},{"field":"transaction","fields":[{"field":"id","type":"string"},{"field":"total_order","type":"int64"},{"field":"data_collection_order","type":"int64"}],"optional":true,"type":"struct"}],"name":"resource_2_482576.Envelope","type":"struct"}}
----|----
records written|1

Inaccurate error codes

Unless there was any scripting around the apps commands, one might not have noticed the exit codes. For recently initialized Applications, one would see the exit code be 0 even when the command was not successful. It has been fixed.

$ meroxa app run
<_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "invalid ProcessCollectionRequest.Collection: embedded message failed validation | caused by: invalid Collection.Name: value length must be at least 1 runes"
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"invalid ProcessCollectionRequest.Collection: embedded message failed validation | caused by: invalid Collection.Name: value length must be at least 1 runes", grpc_status:2, created_time:"2023-05-11T13:29:22.799764807-07:00"}"
>
$ echo $?
0

Difficulty pulling in matching Golang dependency

With recent improvements to Turbine Applications, we bumped the tag of turbine-go from v1 to v2, and that requires specific handling for go mod to find the most recent tags. Some recently initialized Golang Applications may have seen an interface mismatch such that it would not compile because of pulling in an older version of turbine-go, like the following error:

$ go mod tidy
go: finding module for package github.com/meroxa/turbine-go/pkg/turbine/cmd
go: finding module for package github.com/meroxa/turbine-go/pkg/turbine
github.com/my-org/my-app imports
github.com/meroxa/turbine-go/pkg/turbine: module github.com/meroxa/turbine-go@latest found (v1.0.1), but does not contain package github.com/meroxa/turbine-go/pkg/turbine
github.com/my-org/my-app imports
github.com/meroxa/turbine-go/pkg/turbine/cmd: module github.com/meroxa/turbine-go@latest found (v1.0.1), but does not contain package github.com/meroxa/turbine-go/pkg/turbine/cmd

We have since changed the module from github.com/meroxa/turbine-go to github.com/meroxa/turbine-go/v2 and resolved the issue of pulling in an older, incompatible tag.

Enjoy! 🎉

For any questions or comments: