-
Notifications
You must be signed in to change notification settings - Fork 16.4k
fix: Type mismatch for DateInterval in latest only operator #53541
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
Conversation
… original problem, and I need some help. See apache#50911 (comment)
|
I've tested the fix out, and it resolves the issue I've run into. However, I'm having issues reproducing it in a unit test. I've made an attempt in the PR, but need some help from someone more familiar with Tagging @gopidesupavan for feedback on the PR itself and the unit test. |
|
@leakec LGTM, can you please fix the static checks and compat tests? |
|
please look at quickstart for reference https://github.com/apache/airflow/blob/main/contributing-docs/03_contributors_quick_start.rst |
@gopidesupavan Sure thing. I've added a few more commits to patch the issues, and now it passes all the tests. I do still need some help with the unit test though. The one I added passes, but the problem is it doesn't fail before the fix I implemented, i.e., it passes with both versions, so it doesn't really replicate the problem I saw when running this DAG in a normal airflow instance: from airflow import DAG
from datetime import datetime
from airflow.providers.standard.operators.bash import BashOperator
from airflow.providers.standard.operators.latest_only import LatestOnlyOperator
with DAG(
"test_job",
description="Job to test latest only operator.",
schedule="* * * * *",
start_date=datetime(2024, 12, 11),
catchup=False,
):
# latest only operator
task1 = LatestOnlyOperator(task_id="latest_only")
task2 = BashOperator(bash_command="echo test", task_id="task2")
task1 >> task2I think there is likely a mistake I'm making when setting up or running tasks in the unit test, but I'm not familiar enough with the airflow testing system to know where. I'll continue reading up on it some more in my free time, but if you see anything obviously amiss, please let me know. |
the test is fine i just triggered same one , it looks fine, it failed in my case.
|
providers/standard/tests/unit/standard/operators/test_latest_only_operator.py
Outdated
Show resolved
Hide resolved
|
cool , @leakec good work thanks for fixing this. |
Co-authored-by: GPK <gopidesupavan@gmail.com>
|
Failures are not related merging it now. |
|
Of course, thanks for all the help with the review and PR! |
…3541) * Fixing latest_only_operator. See apache#50911 * Making an attempt at a reg test. However, this does not reproduce the original problem, and I need some help. See apache#50911 (comment) * Updating to fix static checks and compat. * Fixing start date. * This was already failing for godpidespuavan, so good to go. Co-authored-by: GPK <gopidesupavan@gmail.com> --------- Co-authored-by: leake <carl.leake@karanadyn.com> Co-authored-by: GPK <gopidesupavan@gmail.com>
…3541) * Fixing latest_only_operator. See apache#50911 * Making an attempt at a reg test. However, this does not reproduce the original problem, and I need some help. See apache#50911 (comment) * Updating to fix static checks and compat. * Fixing start date. * This was already failing for godpidespuavan, so good to go. Co-authored-by: GPK <gopidesupavan@gmail.com> --------- Co-authored-by: leake <carl.leake@karanadyn.com> Co-authored-by: GPK <gopidesupavan@gmail.com>

The call to
DateIntervalinlatest_only_opeartoris currently passing in adatetimewhere it should be passing in aDateTime. This PR fixes that issue.closes: #50911