-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: dayweekinmonth-datetimebetween-tests #11953
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
base: develop
Are you sure you want to change the base?
fix: dayweekinmonth-datetimebetween-tests #11953
Conversation
Signed-off-by: Hemant M Mehta <[email protected]>
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.
The code is equivalent so I have a hard time understanding how it can fix the issue?
The problem is about how variable rendering works differently between Why this fixes the issue:
The code may look equivalent in functionality, but internally the rendering mechanism treats |
There is no functionality differences between the two, in both case the property ends up being rendered so even if the code paths are different, they are functionality equivalent so I doubt it would fix the reported issue. |
….com/hemantmm/kestra into dayweekinmonth-datetimebetween-tests
Thank you for the review! I have made changes to explicitly differentiate between:
Please confirm if this approach aligns with what you were suggesting. |
Sorry @hemantmm I didn't read carefully the original issue and in fact it was more a test failing that prevent the refactoring to our new Property v2 so your PR that changed those two properties and changed the test was the good one as long as tests passed. Can you rollback your latests changes and move back your PR to the state of this morning? |
@loicmathieu, I have reverted the changes. Could you have a look at it? |
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.
LGTM, thanks
@hemantmm the |
Signed-off-by: Hemant M Mehta <[email protected]>
….com/hemantmm/kestra into dayweekinmonth-datetimebetween-tests
@loicmathieu, I have fixed it. |
core/src/test/java/io/kestra/plugin/core/condition/DayWeekInMonthTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/io/kestra/plugin/core/trigger/ScheduleTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/io/kestra/plugin/core/trigger/ScheduleTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Hemant M Mehta <[email protected]>
@loicmathieu, I have fixed the suggestion. |
closes: #8230
What changes are being made and why?
✅ Fixed dynamic property rendering for date in
DayWeekInMonth
andDateTimeBetween
conditions.✅ Updated usage to
.render(date).as(String.class, vars).orElseThrow()
for correct value extraction.✅ Ensured tests pass after migration from
String date
toProperty<String> date
.Fix:
Updated the rendering logic for dynamic date properties in schedule conditions:
date
field fromString
toProperty<String>
in both classes.runContext.render(date, vars)
torunContext.render(date).as(String.class, vars).orElseThrow()
.