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

Allow to specify global build directory #6276

Merged
merged 5 commits into from Feb 25, 2024

Conversation

werwolfby
Copy link
Contributor

Note

Reopen after rebase of #5387

What does this implement/fix?

Default implementation use .esphome/build folder to store build artifacts. This folder can be relatively big. I run esphome container in kubernetes and all /config folder is mounted as remote storage. This is fine for small pregenerated json and idedata. But this is not best option for build temporary files. Instead I can use local storage for .esphome/build folders.

This PR allows to specify ESPHOME_BUILD_PATH environment variable that will be used as default build folder path. This build path still can be overridden by individual components over build_path option (as described in doc), but introduce default folder that can be specified.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other
    Related issue or feature (if applicable):

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3183

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 53.56%. Comparing base (4d8b5ed) to head (6c64f86).
Report is 24 commits behind head on dev.

Files Patch % Lines
esphome/core/config.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6276      +/-   ##
==========================================
- Coverage   53.70%   53.56%   -0.15%     
==========================================
  Files          50       50              
  Lines        9408     9438      +30     
  Branches     1654     1661       +7     
==========================================
+ Hits         5053     5055       +2     
- Misses       4056     4079      +23     
- Partials      299      304       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

esphome/core/config.py Outdated Show resolved Hide resolved
@esphome esphome bot marked this pull request as draft February 25, 2024 18:32
@esphome
Copy link

esphome bot commented Feb 25, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@werwolfby werwolfby marked this pull request as ready for review February 25, 2024 19:46
@esphome esphome bot requested a review from jesserockz February 25, 2024 19:46
@jesserockz jesserockz merged commit a8ab745 into esphome:dev Feb 25, 2024
64 checks passed
@werwolfby werwolfby deleted the feature/build-path-env branch February 25, 2024 23:23
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants