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

Test provide request body #345

Merged
merged 10 commits into from
Jul 1, 2024

Conversation

colmsnowplow
Copy link
Collaborator

@colmsnowplow colmsnowplow commented Jul 1, 2024

This PR:

  • Fixes remaining tests
  • Changes failures at templating/creating a request to not return errors (which lead to retrying the data), instead we treat the data as invalid, send to bad rows and move on
  • Makes a small amendment to the templater feature to handle arrays as well
  • Adds tests for provideRequest body
  • Tweaks/Adds additional tests to cover more things

https://snplow.atlassian.net/browse/PDP-1273

provideRequestBody can't be compatible with plain strings and play nicely with our data.

This commit changes it to expect a JSON - if there is some use case for plain strings it can still be done via a transformation + a template.

templated, goodMessages, invalidMessages := target.renderBatchUsingTemplate(inputMessages)

//we get a stringified map for JSON
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can be removed? :)

@colmsnowplow colmsnowplow force-pushed the test-provide-request-body branch from 916af38 to b9f668a Compare July 1, 2024 14:59
@colmsnowplow colmsnowplow merged commit 321429f into feat/batch-templating Jul 1, 2024
1 check passed
@colmsnowplow colmsnowplow deleted the test-provide-request-body branch July 1, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants