darkag commented on issue #42215:
URL: https://github.com/apache/airflow/issues/42215#issuecomment-2508040192
The closed pull request above should solve the problem but since I don't
understand what to do the validation error message...
basically this part of the airflow/www/static/js/dag/details/gantt/index.tsx
file
```
// Reset state when the dagrun changes
useEffect(() => {
if (startDate !== dagRun?.queuedAt && startDate !== dagRun?.startDate) {
setStartDate(dagRun?.queuedAt || dagRun?.startDate);
}
if (!endDate || endDate !== dagRun?.endDate) {
// @ts-ignore
setEndDate(dagRun?.endDate ?? moment().add(1, "s").toString());
}
}, [
dagRun?.queuedAt,
dagRun?.startDate,
dagRun?.endDate,
startDate,
endDate,
]);
```
is triggered when startDate/endDate and set dagRun?.queuedAt ||
dagRun?.startDate as start date but doing so it seems to trigger a redraw of
the graph which call setGanttDuration for each task instance that could lead to
a change of the startDate/endDate entering in an infinite loop of date changes.
my pull request tried to solve the issue by removing the startDate/endDate
in the "reset" declaration, it works if I rebuild javascript on my local
airflow instance, but doesn't pass the github validation process. It seems that
just removing startDate/endDate make the file inconsistent and since my
knowledge in reactjs is almost 0, I will let someone with a better
understanding fix this error
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]