-
Notifications
You must be signed in to change notification settings - Fork 180
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 check for large for loops #361
Conversation
@@ -18,6 +18,7 @@ namespace Microsoft.Health.Fhir.Liquid.Converter.Processors | |||
public abstract class BaseProcessor : IFhirConverter | |||
{ | |||
private readonly ProcessorSettings _settings; | |||
private const int _maxIterations = 100000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you help doc this limitation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ginalee-dotcom, could you please help create a PR to update the document about this change? The maximum iteration of for-loop in liquid templates is now set to 100,000. Previously there's no limitation about this. If the limitation is reached, an exception will be thrown with detailed message. This is to help make sure our engine returns a result in time.
…fer/pgcritiques-merge * 'main' of github.com:microsoft/FHIR-Converter: Global Readiness Manifest file GeoPol.xml Update version (microsoft#375) Remove blank lines (microsoft#374) Update Doc for Filters (microsoft#365) Switch FormatAsDateTime timezone handling to preserve to maintain consistency (microsoft#358) Revert "reset to local (microsoft#368)" reset to local (microsoft#368) Phase -2, Milestone-3 Mapping (microsoft#366) Change Default Time Zone Handling (microsoft#363) Turn on mac functional test check (microsoft#367) Fix warnings (microsoft#364) Fix Time Zone Bug (microsoft#353) Phase2 - Milestone 1&2 Mapping (microsoft#354) Add check for large for loops (microsoft#361) Updated the logic of checking the number of default templates Update pipeline win host version (microsoft#359)
By offline discussion, we are going to limit the number of the list in the for loop by the
maxIterations
parameter provided by dotliquid. Currently the value is set to 100000.