You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "guan404ming (via GitHub)" <gi...@apache.org> on 2025/04/24 14:57:34 UTC

[PR] AIP-38: enhance ux for RunBackfillForm [airflow]

guan404ming opened a new pull request, #49732:
URL: https://github.com/apache/airflow/pull/49732

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ## Related Issue
   
   closes #49503
   cc: @bbovenzi @pierrejeambrun @munnch
   
   ## What
   
   This PR is focus on ux wise improvement for RunBackfillForm, tasks completed in this PR:
   - [x] `Reprocess Behaviour`, `Run Backwards`, `Max Active Runs` should be populated after there is runs matching the criteria
   - [x] default date range populated when one of the two is specified (1 day span as default)
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: enhance ux for `RunBackfillForm` [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #49732:
URL: https://github.com/apache/airflow/pull/49732#issuecomment-2828092175

   Going to reject this one. I think this is a net loss in UX by hiding fields until a date is selected.
   
   I also got user feedback that might prefer not having any min/max restrictions on the date input and only show an inline warning instead.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: enhance ux for `RunBackfillForm` [airflow]

Posted by "guan404ming (via GitHub)" <gi...@apache.org>.
guan404ming commented on PR #49732:
URL: https://github.com/apache/airflow/pull/49732#issuecomment-2828210008

   > A backfill range can vary a ton depending on the dag's schedule and where any data is missing. So I am not sure we can make any safe assumptions on a default range that even satisfies 50% of use cases.
   
   Makes sense, let's leave that here.
   
   Just a note — if we were able to automatically infer and fill in a default range that guarantees at least one matching run, that might actually help UX in some cases. But I agree it would add quite a bit of implementation complexity. So I’m good with keeping things as-is for now and seeing if users continue to bring it up — happy to revisit if it becomes a recurring theme~
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: enhance ux for `RunBackfillForm` [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi closed pull request #49732: feat: enhance ux for `RunBackfillForm`
URL: https://github.com/apache/airflow/pull/49732


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: enhance ux for `RunBackfillForm` [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #49732:
URL: https://github.com/apache/airflow/pull/49732#issuecomment-2828185979

   I talked to Chris, some of his frustration was just how the datetime selectors work, but we're just using the browser datetime-local and I'd rather not try to make our own.
   
   A backfill range can vary a ton depending on the dag's schedule and where any data is missing. So I am not sure we can make any safe assumptions on a default range that even satisfies 50% of use cases.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: enhance ux for `RunBackfillForm` [airflow]

Posted by "guan404ming (via GitHub)" <gi...@apache.org>.
guan404ming commented on PR #49732:
URL: https://github.com/apache/airflow/pull/49732#issuecomment-2828127942

   I agree that hiding fields until a date is selected could negatively impact UX, I could remove that in this PR.
   
   However, what I implemented here isn't about enforcing any min/max restrictions on date input. The main goal is to assist the user by auto-filling a complementary date when only one of the two (start or end) is provided. It's handled like this:
   
   ```tsx
   useEffect(() => {
     if (dataIntervalStart && !dataIntervalEnd) {
       setValue("to_date", getComplementaryDate(dataIntervalStart, true));
     } else if (dataIntervalEnd && !dataIntervalStart) {
       setValue("from_date", getComplementaryDate(dataIntervalEnd, false));
     }
   }, [dataIntervalStart, dataIntervalEnd, setValue]);
   ```
   
   I believe this can help users better understand the expected date range and reduce friction during input. Also, there were two users mention that they found this behavior helpful. Do you think there's still room to keep or iterate on this approach?
   
   ref: https://github.com/apache/airflow/issues/49503#issue-3008550373, https://github.com/apache/airflow/issues/49541#issue-3010548123


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: enhance ux for `RunBackfillForm` [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #49732:
URL: https://github.com/apache/airflow/pull/49732#issuecomment-2828223840

   For sure. We can revisit this later. But if you want to improve backfills more, we do need: https://github.com/apache/airflow/issues/49653


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: enhance ux for `RunBackfillForm` [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #49732:
URL: https://github.com/apache/airflow/pull/49732#issuecomment-2828144249

   >  The main goal is to assist the user by auto-filling a complementary date when only one of the two (start or end) is provided


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org