Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enrichment upload mechanism #194

Closed
jbeemster opened this issue May 27, 2019 · 2 comments
Closed

Fix enrichment upload mechanism #194

jbeemster opened this issue May 27, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@jbeemster
Copy link
Member

For some reason the upload of enrichment does not replace the whole file but rather just changes the lines in the file - in the case that the old enrichment JSON is longer than the new one you will end up with corrupted input which will break Stream Enrich.

@jbeemster jbeemster added the bug label May 27, 2019
@jbeemster
Copy link
Member Author

This function needs to delete the existing file first or at least empty it out before attempting upload:

https://github.com/snowplow/snowplow-mini/blob/master/provisioning/resources/control-plane/main.go#L98-L103

@oguzhanunlu
Copy link
Member

Just like here https://github.com/snowplow/snowplow-mini/blob/master/provisioning/resources/control-plane/main.go#L148-L155 . All config updating functions must follow this approach.

@oguzhanunlu oguzhanunlu self-assigned this May 28, 2019
@oguzhanunlu oguzhanunlu changed the title When uploading an enrichment the new JSON must be longer than the old JSON or the overwrite fails Fix enrichment upload logic May 31, 2019
@oguzhanunlu oguzhanunlu changed the title Fix enrichment upload logic Fix enrichment upload mechanism May 31, 2019
@oguzhanunlu oguzhanunlu added this to the Version 0.6.1 milestone May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants