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

Propagate SETENV to forward model validation #9479

Closed
wants to merge 2 commits into from

Conversation

berland
Copy link
Contributor

@berland berland commented Dec 6, 2024

The settings implied through SETENV can affect how forward model behave, and may also change how validation should be performed.

This is in particular true for the Eclipse forward model steps which try to validate the requested version. If a different configuration of Eclipse is set through

SETENV ECL100_SITE_CONFIG somefile.yml

(or for ECL300_SITE_CONFIG) this information must be conveyed to the validation code.

Issue
Resolves #9474

  • 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

@berland berland marked this pull request as ready for review December 6, 2024 14:29
@berland berland marked this pull request as draft December 6, 2024 15:27
@berland berland force-pushed the fix_custom_ecl_site_config branch 2 times, most recently from 8e4030e to 46a8419 Compare December 9, 2024 07:42
@berland berland added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Dec 9, 2024
@berland berland marked this pull request as ready for review December 9, 2024 07:53
@berland berland requested a review from sondreso December 9, 2024 07:54
@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.90%. Comparing base (68d01c7) to head (16bab37).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9479      +/-   ##
==========================================
+ Coverage   91.87%   91.90%   +0.02%     
==========================================
  Files         433      433              
  Lines       26752    26753       +1     
==========================================
+ Hits        24579    24587       +8     
+ Misses       2173     2166       -7     
Flag Coverage Δ
cli-tests 39.41% <81.81%> (+<0.01%) ⬆️
everest-models-test 34.72% <72.72%> (+<0.01%) ⬆️
gui-tests 72.15% <72.72%> (+<0.01%) ⬆️
integration-test 36.99% <72.72%> (+0.02%) ⬆️
performance-tests 51.98% <63.63%> (-0.01%) ⬇️
test 40.66% <72.72%> (+<0.01%) ⬆️
unit-tests 74.10% <100.00%> (+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.

The settings implied through SETENV can affect how forward
model behave, and may also change how validation should be
performed.

This is in particular true for the Eclipse forward model steps
which try to validate the requested version. If a different
configuration of Eclipse is set through

  SETENV ECL100_SITE_CONFIG somefile.yml

(or for ECL300_SITE_CONFIG) this information must be conveyed
to the validation code.
@berland berland force-pushed the fix_custom_ecl_site_config branch from 46a8419 to 16bab37 Compare December 10, 2024 12:01
@sondreso
Copy link
Collaborator

sondreso commented Dec 10, 2024

Do we want to add this complexity given that we now have #9050 and that ecl config should come through that system instead? 🤔

@berland
Copy link
Contributor Author

berland commented Dec 10, 2024

Do we want to add this complexity given that we now have #9050 and that ecl config should come through that system instead? 🤔

Only if we want to have it available for Ert 11.1 and maybe also Ert 12.0. A similar solution is being implemented in #9108

Copy link
Contributor

@eivindjahren eivindjahren left a comment

Choose a reason for hiding this comment

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

I think we should consider adding env_vars to ForwardModelStepJSON instead in order to not break any dependents.

@@ -278,13 +281,17 @@ def __init__(self) -> None:
default_mapping={"<NUM_CPU>": 1, "<OPTS>": "", "<VERSION>": "version"},
)

def validate_pre_experiment(self, _: ForwardModelStepJSON) -> None:
def validate_pre_experiment(
self, _: ForwardModelStepJSON, env_vars: Dict[str, str]
Copy link
Contributor

@eivindjahren eivindjahren Dec 12, 2024

Choose a reason for hiding this comment

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

It's a bit unfortunate to break the signature of this function as it is public and used by plugins. I think it would be better to make env_vars part of ForwardModelStepJSON and be a non-required field. That way we do not break any plugins.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely agree, this has already been done in #9108

@berland
Copy link
Contributor Author

berland commented Dec 12, 2024

Closing this, will not spend time shaping this up for a backport unless needed. Underlying problem will be fixed in #9108.

@berland berland closed this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:bug-fix Automatically categorise as bug fix in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eclipse version validation blocks custom ECLX00_SITE_CONFIG
5 participants