Skip to content

Skip DB and integration tests in CI for new UI only changes #43498

Description

@tirkarthi

Description

#42779 (comment)

This was discussed in the PR as a comment and got lost, so opening this as an issue for tracking. Currently, changes to only frontend code in airflow/ui folder still run the DB tests (takes 20 mins each) and integration tests (takes 2 mins each) which are not needed. Earlier frontend code used to be part of airflow/www. With new UI changes in separate folder that don't change DB components and use API from airflow/api_fastapi these can be skipped to reduce load on CI and also enable faster loop for frontend changes.

cc: @bbovenzi @pierrejeambrun @potiuk

Use case/motivation

Reduces CI usage for frontend only changes.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    area:CIAirflow's tests and continious integration
    area:UIRelated to UI/UX. For Frontend Developers.
    on Oct 30, 2024
  2. potiuk commented on Oct 30, 2024

    @potiuk
    Member

    Sure. That should be a simple change to selective checks.

    If you look at the #43498 output (particularly in Bulid Info/ Selective checks) : https://github.com/apache/airflow/actions/runs/11237464231/job/31239971306?pr=42779 at the output you will see this:

    image

    And then the reason why tests is that we cannot determine which tests to run in case only "new UI files change" :
    image

    We simply have no check to see if only new UI changed . Generally the approach we have is that we handled all the "known" files and depending on a file type we classify it - and if there are any change to files we have no idea about, we run "all tests" - just in case.

    It happens here:

    So the thing is ere that we should just add additional check here and if files changed match "UI files" - they should be added as "all_ui_files" and removed when we calculate remaining files. Then remaining files will be 0 and in turn only "Always" tests will run rather than all files.

    We could also add the test case here

    def test_expected_output_pull_request_main(
    to test that case.

    If anyone would like to implement it- happy to review :)

  3. tirkarthi commented on Oct 30, 2024

    @tirkarthi
    ContributorAuthor

    Thanks @potiuk for the details. I will raise a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:CIAirflow's tests and continious integrationarea:UIRelated to UI/UX. For Frontend Developers.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions