Skip to content

Exclude unnecessary ui build artifacts from wheel#61335

Merged
potiuk merged 1 commit into
apache:mainfrom
guan404ming:fe-build
Feb 3, 2026
Merged

Exclude unnecessary ui build artifacts from wheel#61335
potiuk merged 1 commit into
apache:mainfrom
guan404ming:fe-build

Conversation

@guan404ming

@guan404ming guan404ming commented Feb 1, 2026

Copy link
Copy Markdown
Member

Related Issue

closes #59821

Why

Production wheels ship 872 unnecessary frontend dev files (package.json, pnpm-lock.yaml, TypeScript source, configs, etc.) that bloat the wheel by ~1.5MB. Only the pre-built dist/ directories are needed at runtime.

How

Replace the narrow node_modules/-only excludes in the wheel target with ** globs that exclude everything under UI folder.
The dist/ folders are preserved because hatch artifacts override exclude patterns.

Before:                                                                                                                 
5.6M  apache_airflow_core-3.2.0-py3-none-any.whl (1806 files)                                                           
                                                                                                                        
After:                                                                                                                  
4.1M  apache_airflow_core-3.2.0-py3-none-any.whl (935 files) 

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
@guan404ming guan404ming marked this pull request as ready for review February 2, 2026 04:01
@eladkal eladkal added this to the Airflow 3.1.8 milestone Feb 2, 2026
@eladkal eladkal requested a review from potiuk February 2, 2026 07:29

@tirkarthi tirkarthi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks. With Apache Airflow downloaded around 15 million times a month this will be a good improvement.

https://pypistats.org/packages/apache-airflow
https://blog.pypi.org/posts/2025-12-31-pypi-2025-in-review/

@tirkarthi

Copy link
Copy Markdown
Contributor

cc: @bbovenzi

@potiuk

potiuk commented Feb 3, 2026

Copy link
Copy Markdown
Member

Looks good to me.

I tested that only dist is available in the wheel distribution, all files - including sources - are present in sdist and I installed airflow from the distributions prepared in main and it worked properly.

@potiuk potiuk merged commit 8edb313 into apache:main Feb 3, 2026
126 of 134 checks passed
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

github-actions Bot pushed a commit that referenced this pull request Feb 3, 2026
(cherry picked from commit 8edb313)

Co-authored-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
@guan404ming guan404ming deleted the fe-build branch February 3, 2026 15:42
@guan404ming

Copy link
Copy Markdown
Member Author

LGTM. Thanks. With Apache Airflow downloaded around 15 million times a month this will be a good improvement.

Thanks for that. It would save world a lots time.

I tested that only dist is available in the wheel distribution, all files - including sources - are present in sdist and I installed airflow from the distributions prepared in main and it worked properly.

Thanks. I also verified it works!

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Amazing thanks

Alok-kumar-priyadarshi pushed a commit to Alok-kumar-priyadarshi/airflow that referenced this pull request Feb 5, 2026
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
jhgoebbert pushed a commit to jhgoebbert/airflow_Owen-CH-Leung that referenced this pull request Feb 8, 2026
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Ratasa143 pushed a commit to Ratasa143/airflow that referenced this pull request Feb 15, 2026
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
potiuk pushed a commit that referenced this pull request Feb 18, 2026
#61397)

(cherry picked from commit 8edb313)

Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Co-authored-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
choo121600 pushed a commit to choo121600/airflow that referenced this pull request Feb 22, 2026
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Mar 4, 2026
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
vatsrahul1001 pushed a commit that referenced this pull request Mar 4, 2026
#61397)

(cherry picked from commit 8edb313)

Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Co-authored-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
Ankurdeewan pushed a commit to Ankurdeewan/airflow that referenced this pull request Mar 15, 2026
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
radhwene pushed a commit to radhwene/airflow that referenced this pull request Mar 21, 2026
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
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.

Review frontend/UI build manifests (package.json, package-lock.json) present in production Python images?

5 participants