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

Prevent copying mount point data when setting install_data to a non existing directory #9137

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AugustoMagalhaes
Copy link
Contributor

@AugustoMagalhaes AugustoMagalhaes commented Nov 2, 2024

Issue
Resolves #9071

Approach
Includes additional validation for source path in EverestConfig to avoid copying data from root folder ("/") when install_data template render an invalid string. I'm not sure wether to add this validation actually, I've included in check_path_exists function in validation_utils.py but in the first commit there's a glimpse of how it could be if the validation was in InstallDataConfig as a pydantic validation of the source property itself. Just let me know which one you guys think fits better (or a new one maybe) and I modify it later.

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@AugustoMagalhaes AugustoMagalhaes marked this pull request as draft November 4, 2024 04:22
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.74%. Comparing base (90d11ec) to head (edf3ce8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9137      +/-   ##
==========================================
- Coverage   90.76%   90.74%   -0.03%     
==========================================
  Files         351      351              
  Lines       21895    21895              
==========================================
- Hits        19874    19868       -6     
- Misses       2021     2027       +6     
Flag Coverage Δ
cli-tests 39.23% <ø> (-0.01%) ⬇️
gui-tests 71.77% <ø> (+0.02%) ⬆️
performance-tests 49.35% <ø> (-0.02%) ⬇️
unit-tests 79.63% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@AugustoMagalhaes AugustoMagalhaes marked this pull request as ready for review November 4, 2024 20:32
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.

When setting install_data to a non existing directory, root partition is being copied instead
2 participants