Skip to content

Hotfix: call to_dict before adding created_at field

Hongtao Yang requested to merge revert-979a184b into main

What does this merge request do and why?

This MR finishes the work left in !340 (merged) and fixes all pipelines because MR !340 (merged) should be still be in draft (my bad, forgot to put it in draft). As a result, the pipelines are broken.

The main thing is that we need to call .to_dict function before adding created_at field

...
            results
            | beam.Map(lambda r: r.to_dict())
            | "Add timestamp"
            >> beam.Map(lambda element: {**element, "created_at": datetime.now(timezone.utc)})
...

Ref: #198 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request checklist

  • I've ran the affected pipeline(s) to validate that nothing is broken.
  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Hongtao Yang

Merge request reports