Add logging for realization status page - #14089
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds user-interaction logging to the experiment status UI (realization details selection and forward-model step output/error opening), and introduces unit tests to ensure the logging is emitted only once and only for user-initiated actions.
Changes:
- Log the first user click that opens realization details in the experiment status view.
- Log the first opening of forward-model step stdout/stderr files and error-message dialogs in the experiment status view.
- Add GUI unit tests verifying that these log messages are emitted only once (and not during programmatic selection/refresh).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/ert/unit_tests/gui/experiments/test_run_dialog.py | Adds tests asserting the new “log once” behavior for realization selection and FM step output/error opening. |
| src/ert/gui/experiments/view/realization.py | Adds a one-time logging hook on the realization list “clicked” signal to track opening realization details. |
| src/ert/gui/experiments/run_dialog.py | Adds one-time logging for opening stdout/stderr dialogs and error-message dialogs in FMStepOverview. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14089 +/- ##
==========================================
+ Coverage 91.89% 91.92% +0.03%
==========================================
Files 479 479
Lines 33397 33409 +12
==========================================
+ Hits 30689 30712 +23
+ Misses 2708 2697 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f001c19 to
6361149
Compare
The experiment status page has no usage data, so it is unknown whether users inspect individual realizations or open forward model step output. Log the first time each is opened, once per dialog, to keep the log readable.
6361149 to
958dd49
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
tests/ert/unit_tests/gui/experiments/test_run_dialog.py:1290
- Using
close()on aQDialogis less explicit thanreject()/accept()and can make it harder to guarantee thatfinished/cleanup handlers run in tests. Since this dialog is being closed as part of the test flow, preferreject()here to deterministically emitfinished(and trigger any connected cleanup).
file_dialog.close()
tests/ert/unit_tests/gui/experiments/test_run_dialog.py:1265
- Monkeypatching
FileDialog._init_threadto a no-op bypasses the normal cleanup wiring (self.finished.connect(self._quit_thread)), so the file opened inFileDialog.__init__is never closed during the test. This can leak file descriptors across the suite.
Consider replacing the no-op with a lightweight test stub that still sets up _thread and connects _quit_thread, without starting the worker thread.
This issue also appears on line 1290 of the same file.
monkeypatch.setattr(FileDialog, "_init_thread", lambda self: None)
Issue
Resolves #14094
Approach
Log the first time a user opens realization details or a forward model step's stdout/stderr/error, once per dialog, so usage of these views can be measured.
Two mechanisms, depending on whether a suitable signal already exists: RealizationWidget reuses _real_view.clicked via a new log_once helper in utils.py. FMStepOverview logs inline from its click handler, which already branches on column, guarded by a set of logged names.
git rebase -i main --exec 'just rapid-tests')When applicable
merge screenshot-PR in ert-testdata before merging this PR.