Skip to content

this variable should not be required (for e3sm)#4962

Merged
jasonb5 merged 4 commits into
ESMCI:masterfrom
jedwards4b:fix/err_without_drv_restart_pointer
May 12, 2026
Merged

this variable should not be required (for e3sm)#4962
jasonb5 merged 4 commits into
ESMCI:masterfrom
jedwards4b:fix/err_without_drv_restart_pointer

Conversation

@jedwards4b
Copy link
Copy Markdown
Contributor

Description

The variable DRV_RESTART_POINTER is only provided by cmeps and should not be required for the ERR test

Checklist

  • My code follows the style guidelines of this project (black formatting)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that exercise my feature/fix and existing tests continue to pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding additions and changes to the documentation

Please confirm that this solves the issue for E3SM.

@jedwards4b jedwards4b requested a review from rljacob April 10, 2026 15:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.50%. Comparing base (28fe4b5) to head (4632016).
⚠️ Report is 42 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4962      +/-   ##
==========================================
+ Coverage   28.29%   30.50%   +2.21%     
==========================================
  Files         262      131     -131     
  Lines       38384    19258   -19126     
  Branches     8126     4075    -4051     
==========================================
- Hits        10860     5875    -4985     
+ Misses      26276    12755   -13521     
+ Partials     1248      628     -620     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jasonb5 jasonb5 self-requested a review April 15, 2026 17:08
@jasonb5
Copy link
Copy Markdown
Collaborator

jasonb5 commented Apr 15, 2026

@jedwards4b I'll check this out today. Thanks!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ERR system test to avoid requiring the DRV_RESTART_POINTER case variable (which is only present for some coupler configurations), enabling ERR to run for E3SM where this variable may be absent.

Changes:

  • Guard setting DRV_RESTART_POINTER so ERR doesn’t error when the variable is undefined.
  • Continue restoring from the archived restart directory without forcing a NUOPC-only variable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CIME/SystemTests/err.py Outdated
Comment on lines +45 to +46
if self._drv_restart_pointer:
self._case.set_value("DRV_RESTART_POINTER", "rpointer.cpl." + rest_dir)
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Consider using the existing helper self._set_drv_restart_pointer(...) here instead of duplicating the support check and calling self._case.set_value(...) directly. That keeps DRV_RESTART_POINTER handling consistent across system tests (including the log message) and centralizes the conditional behavior in one place.

Suggested change
if self._drv_restart_pointer:
self._case.set_value("DRV_RESTART_POINTER", "rpointer.cpl." + rest_dir)
self._set_drv_restart_pointer("rpointer.cpl." + rest_dir)

Copilot uses AI. Check for mistakes.
Comment thread CIME/SystemTests/err.py Outdated
Comment on lines +45 to +46
if self._drv_restart_pointer:
self._case.set_value("DRV_RESTART_POINTER", "rpointer.cpl." + rest_dir)
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

This change introduces a new conditional behavior that is important for E3SM (skipping DRV_RESTART_POINTER when the variable is not provided). Please add a unit test that constructs an ERR test with a case mock where get_value('DRV_RESTART_POINTER') is None and asserts that set_value('DRV_RESTART_POINTER', ...) is not called during _case_two_custom_prerun_action (and that the method still restores from archive as expected).

Copilot uses AI. Check for mistakes.
@jasonb5
Copy link
Copy Markdown
Collaborator

jasonb5 commented May 11, 2026

Verified the ERR test now runs correctly for E3SM.

Copy link
Copy Markdown
Collaborator

@jasonb5 jasonb5 left a comment

Choose a reason for hiding this comment

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

LGTM

@jasonb5 jasonb5 merged commit 6e9074e into ESMCI:master May 12, 2026
@jasonb5 jasonb5 deleted the fix/err_without_drv_restart_pointer branch May 12, 2026 22:07
@rljacob
Copy link
Copy Markdown
Member

rljacob commented May 14, 2026

Thanks for taking care of this, @jedwards4b

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.

ERR doesn't work for E3SM

4 participants