Skip to content
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

[AIRFLOW-3591] Fix start date, end date, duration for rescheduled tasks #4502

Merged
merged 1 commit into from
Jan 18, 2019
Merged

[AIRFLOW-3591] Fix start date, end date, duration for rescheduled tasks #4502

merged 1 commit into from
Jan 18, 2019

Conversation

seelmann
Copy link
Member

Jira

Description

  • Here are some details about my PR:
    • Use first start date when running a rescheduled task, this also fixes the duration. Use actual start date to record reschedule requests.
    • Simplify gantt view code now that start date and duration are correct in task_instance table

Tests

  • My PR adds test

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.
    • All the public functions and the classes in the PR contain docstrings that explain what it does

Code Quality

  • Passes flake8

@seelmann seelmann changed the title [AIRFLOW-3591] Fix start date, end date, duration for rescheduled tasks [WIP] [AIRFLOW-3591] Fix start date, end date, duration for rescheduled tasks Jan 13, 2019
@codecov-io
Copy link

codecov-io commented Jan 13, 2019

Codecov Report

Merging #4502 into master will increase coverage by 0.03%.
The diff coverage is 55.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4502      +/-   ##
==========================================
+ Coverage   74.76%   74.79%   +0.03%     
==========================================
  Files         429      429              
  Lines       29648    29638      -10     
==========================================
+ Hits        22165    22167       +2     
+ Misses       7483     7471      -12
Impacted Files Coverage Δ
airflow/models/__init__.py 92.51% <100%> (+0.01%) ⬆️
airflow/www/views.py 70.42% <33.33%> (+0.24%) ⬆️
airflow/www_rbac/views.py 75.67% <33.33%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1ebf4d...b85a6f7. Read the comment docs.

@seelmann seelmann changed the title [WIP] [AIRFLOW-3591] Fix start date, end date, duration for rescheduled tasks [AIRFLOW-3591] Fix start date, end date, duration for rescheduled tasks Jan 13, 2019
* Use first start date when running a rescheduled task, this also fixes
  the duration. Use actual start date to record reschedule requests.
* Simplify gantt view code now that start date and duration are correct
  in `task_instance` table
@feng-tao
Copy link
Member

LGTM, PTAL @ashb and see if he has any other comments.

gantt_bar_items.append((ti.task_id, ti.start_date, end_date, ti.state))
for tf in ti_fails:
end_date = tf.end_date or timezone.utcnow()
gantt_bar_items.append((tf.task_id, tf.start_date, end_date, State.FAILED))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol so much easier :D

@ashb ashb merged commit 5abd19e into apache:master Jan 18, 2019
ashb pushed a commit to ashb/airflow that referenced this pull request Mar 5, 2019
…ks (apache#4502)

* Use first start date when running a rescheduled task, this also fixes
  the duration. Use actual start date to record reschedule requests.
* Simplify gantt view code now that start date and duration are correct
  in `task_instance` table
wmorris75 pushed a commit to modmed/incubator-airflow that referenced this pull request Jul 29, 2019
…ks (apache#4502)

* Use first start date when running a rescheduled task, this also fixes
  the duration. Use actual start date to record reschedule requests.
* Simplify gantt view code now that start date and duration are correct
  in `task_instance` table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants