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

Revert "No grid auto-refresh for backfill dag runs (#25042)" #26463

Merged
merged 2 commits into from Sep 21, 2022

Conversation

Gollum999
Copy link
Contributor

This reverts commit de6938e.

See discussion in #24844.

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Sep 18, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 18, 2022

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Copy link
Contributor

@cloventt cloventt left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for making this PR.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

LGTM - but I guess @bbovenzi's approval is needed and will be much more valuable :)

@Gollum999
Copy link
Contributor Author

Anyone have a recommendation for the best way to fix this? Typescript is not my forte.

static/js/api/useGridData.test.ts:39:7 - error TS2322: Type '{ runId: string; executionDate: string; dataIntervalStart: string; dataIntervalEnd: string; runType: string; startDate: null; endDate: null; lastSchedulingDecision: null; state: "success"; }' is not assignable to type 'DagRun'.
  Types of property 'runType' are incompatible.
    Type 'string' is not assignable to type '"backfill" | "manual" | "scheduled" | "dataset_triggered"'.

39       { state: 'success', ...commonDagRunParams },
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@bbovenzi
Copy link
Contributor

bbovenzi commented Sep 20, 2022

Anyone have a recommendation for the best way to fix this? Typescript is not my forte.

static/js/api/useGridData.test.ts:39:7 - error TS2322: Type '{ runId: string; executionDate: string; dataIntervalStart: string; dataIntervalEnd: string; runType: string; startDate: null; endDate: null; lastSchedulingDecision: null; state: "success"; }' is not assignable to type 'DagRun'.
  Types of property 'runType' are incompatible.
    Type 'string' is not assignable to type '"backfill" | "manual" | "scheduled" | "dataset_triggered"'.

39       { state: 'success', ...commonDagRunParams },
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Typescript is interpreting 'scheduled' to be a string instead of an enum. We can either do an as casting or define runType before commonDagRunParams like so:

const runType: DagRun['runType'] = 'scheduled';
const commonDagRunParams = {
  runId: 'runId',
  executionDate: '2022-01-01T10:00+00:00',
  dataIntervalStart: '2022-01-01T05:00+00:00',
  dataIntervalEnd: '2022-01-01T10:00+00:00',
  runType,
  startDate: null,
  endDate: null,
  lastSchedulingDecision: null,
};

@bbovenzi bbovenzi merged commit d0b3d59 into apache:main Sep 21, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 21, 2022

Awesome work, congrats on your first merged pull request!

@Gollum999 Gollum999 deleted the reenable-grid-auto-refresh branch September 27, 2022 20:24
@ephraimbuddy ephraimbuddy added this to the Airflow 2.4.2 milestone Oct 18, 2022
@ephraimbuddy ephraimbuddy added changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) type:bug-fix Changelog: Bug Fixes and removed changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) labels Oct 18, 2022
ephraimbuddy pushed a commit that referenced this pull request Oct 18, 2022
* Revert "No grid auto-refresh for backfill dag runs (#25042)"

This reverts commit de6938e.

* Fix Grid unit test

(cherry picked from commit d0b3d59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants