apache / incubator-heron

Apache Heron (Incubating) is a realtime, distributed, fault-tolerant stream processing engine from Twitter
https://heron.apache.org/
Apache License 2.0
3.65k stars 597 forks source link

Heron Tracker crashes when running topologies with Zookeeper state manager #3850

Closed nicknezis closed 1 year ago

nicknezis commented 1 year ago

With our major rewrite to Python 3, we introduced a bug which wasn't noticed until now. When storing the SchedulerLocation Protobuf message in the state manager repo, such as Zookeeper, we are storing job_page_link as a repeated string which produces a Python List and not a str. (Protobuf field).

When running the Heron Tracker, we experience crashes at this point in the codebase.

This is because Python 3 is now using the new type hint system. The returned TopologyInfoSchedulerLocation is expecting job_page_link to be a str.

A simple fix would be to extract the first string from the Protobuf RepeatedScalarFieldContainer.