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

Speed up fixing-ownership when leaving breeze on Linux #45805

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Jan 20, 2025

When leaving breeze on Linux we are fixing ownership of potential new generated files to be the same as the HOST user - because files created in container will be owned by root.

This takes quite some time however, especially when you have .venv or node_modules or other folders with large amount of files.

This change skips such files from being considered in fixing ownership if the folders are already properly owned.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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 newsfragments.

When leaving breeze on Linux we are fixing ownership of potential
new generated files to be the same as the HOST user - because files
created in container will be owned by root.

This takes quite some time however, especially when you have
.venv or node_modules or other folders with large amount of files.

This change skips such files from being considered in fixing ownership
if the folders are already properly owned.
Copy link
Member

@gopidesupavan gopidesupavan left a comment

Choose a reason for hiding this comment

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

nice optimisation :)

@potiuk
Copy link
Member Author

potiuk commented Jan 20, 2025

nice optimisation :)

I got a bit annoyed with about a second and a half delay

@potiuk potiuk merged commit 24b1fe8 into apache:main Jan 20, 2025
87 checks passed
@potiuk potiuk deleted the speed-up-file-ownership-fixing branch January 20, 2025 17:15
dauinh pushed a commit to dauinh/airflow that referenced this pull request Jan 24, 2025
When leaving breeze on Linux we are fixing ownership of potential
new generated files to be the same as the HOST user - because files
created in container will be owned by root.

This takes quite some time however, especially when you have
.venv or node_modules or other folders with large amount of files.

This change skips such files from being considered in fixing ownership
if the folders are already properly owned.
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
When leaving breeze on Linux we are fixing ownership of potential
new generated files to be the same as the HOST user - because files
created in container will be owned by root.

This takes quite some time however, especially when you have
.venv or node_modules or other folders with large amount of files.

This change skips such files from being considered in fixing ownership
if the folders are already properly owned.
niklasr22 pushed a commit to niklasr22/airflow that referenced this pull request Feb 8, 2025
When leaving breeze on Linux we are fixing ownership of potential
new generated files to be the same as the HOST user - because files
created in container will be owned by root.

This takes quite some time however, especially when you have
.venv or node_modules or other folders with large amount of files.

This change skips such files from being considered in fixing ownership
if the folders are already properly owned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants