Skip to content

fix: Fix lack of error on destination close.#19178

Merged
marianogappa merged 2 commits intomainfrom
mariano/fix-no-error-on-destination-close
Sep 18, 2024
Merged

fix: Fix lack of error on destination close.#19178
marianogappa merged 2 commits intomainfrom
mariano/fix-no-error-on-destination-close

Conversation

@marianogappa
Copy link
Copy Markdown
Contributor

@marianogappa marianogappa commented Sep 18, 2024

@murarustefaan reported a new issue on syncs, where closing a destination plugin results in the sync continuing to process source records until the end (but doing nothing with them), and then finishing with an error. This only happens on certain sync configurations.

The issue is happening because of two reasons:

  • A send on a closed pipeline doesn't error (it should):
  • There's still an error when writing to the destination, but errors propagate forwards (this is expected, as io.EOF propagates forwards to finalise the sync). An error also closes the pipeline, but due to the first bullet point, it doesn't error the sync.

As a result, when the destination errors, the source happily sends all records to the ether, and when done, the sync does error.

The fix is just to error when a send is sent to a closed pipeline.

The following video reproduces the error, installs the fix and shows how it behaves correctly after:

demo-bugfix.mov

@marianogappa marianogappa requested review from a team and erezrokah and removed request for a team September 18, 2024 15:49
@marianogappa marianogappa merged commit c11ad21 into main Sep 18, 2024
@marianogappa marianogappa deleted the mariano/fix-no-error-on-destination-close branch September 18, 2024 16:41
kodiakhq bot pushed a commit that referenced this pull request Sep 19, 2024
🤖 I have created a release *beep* *boop*
---


## [6.7.1](cli-v6.7.0...cli-v6.7.1) (2024-09-19)


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.22.3 ([#19171](#19171)) ([c690a76](c690a76))
* **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.63.0 ([#19176](#19176)) ([00b2de0](00b2de0))
* Don't interleave send calls from difference Go routines ([#19209](#19209)) ([d6dc789](d6dc789))
* Fix lack of error on destination close. ([#19178](#19178)) ([c11ad21](c11ad21))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants