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 marshalling of LogpushJob with no filter #937

Merged
merged 3 commits into from Jun 18, 2022

Conversation

sbfaulkner
Copy link
Contributor

Description

A LogpushJob with no filter incorrectly marshals the filter as "{\"where\":{}}" instead of omitting it.

Changing the field to a pointer allows us to test for presence and omit it entirely.

Has your change been tested?

I've added a marshalling test that initially tests the valid and not present cases.

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Warning this is technically a breaking change and will require changes in the terraform provider to use the pointer instead of the value as has been done in other updates.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented (api.cloudflare.com or developers.cloudflare.com) and stable APIs.

@jacobbednarz
Copy link
Member

thanks a bunch!

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.

None yet

2 participants