-
Notifications
You must be signed in to change notification settings - Fork 630
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
Add verification of filter size #846
Comments
I'm on board with this to get earlier feedback in the change lifecycle 👍 We can use a @dersoi Are you interested in taking a pass at putting up a PR for this one? |
While making changes to filters you need to run `apply` to actually find out whether the expression is valid. This is a slow feedback cycle for developers and there is an API endpoint that allows you to validate expressions before using them so it's a no brainer to improve the validation in the schema. This updates the `ValidateFunc` for `expression` to call out to the validation API endpoint and raise those exceptions earlier in the development cycle. Fixes cloudflare#846
While making changes to filters you need to run `apply` to actually find out whether the expression is valid. This is a slow feedback cycle for developers and there is an API endpoint that allows you to validate expressions before using them so it's a no brainer to improve the validation in the schema. This updates the `ValidateFunc` for `expression` to call out to the validation API endpoint and raise those exceptions earlier in the development cycle. Fixes cloudflare#846
@jacobbednarz I see you were faster than I. Thank you! Do you know when the next release wil be ? |
Roughly monthly or when there is enough features/fixes to go out on it’s
own. We’re pretty early in the current cycle so maybe a couple of weeks
time depending on what else happens?
|
Awesome thanks! |
I've reverted #848 and this needs to wait until we API token support on that endpoint. |
This is good to go again now the endpoint supports API tokens |
While making changes to filters you need to run apply to actually find out whether the expression is valid. This is a slow feedback cycle for developers and there is an API endpoint that allows you to validate expressions before using them so it's a no brainer to improve the validation in the schema. This updates the ValidateFunc for expression to call out to the validation API endpoint and raise those exceptions earlier in the development cycle. Take 2 of #848 now that API tokens are supported in the routes. Closes #846
While making changes to filters you need to run apply to actually find out whether the expression is valid. This is a slow feedback cycle for developers and there is an API endpoint that allows you to validate expressions before using them so it's a no brainer to improve the validation in the schema. This updates the ValidateFunc for expression to call out to the validation API endpoint and raise those exceptions earlier in the development cycle. Take 2 of #848 now that API tokens are supported in the routes. Closes #846
closing this off as there isn't a great way to:
may revisit in the future if the schema method recievers change. |
Current Terraform version
Terraform v0.13.4
Description
The size of a filter is limited to 4096 chars on Cloudflare. This, however, is not checked by the plugin. This means that if you do a 4097 chars filter, it will tell you that it is OK, and proceed to crash at the apply stage.
Use-cases
If you have an automated CI/Pipeline on Git, it is likely that as long as you are not on the master branch, you only do a fmt, validate, and plan. These results are then used to determine if the new modifications can be merged to the master branch. If the filter is more than 4096 (which is frankly difficult to see with the naked eye), it passes all the tests.
to the original issue to help the community and maintainers prioritize this request
request, please leave a comment
The text was updated successfully, but these errors were encountered: