Skip to content

vdk-core: errors occurred and the state (handled or not) context missing - #1212

Merged
antoniivanov merged 2 commits into
mainfrom
person/aivanov/vdk-core-errors
Oct 10, 2022
Merged

vdk-core: errors occurred and the state (handled or not) context missing#1212
antoniivanov merged 2 commits into
mainfrom
person/aivanov/vdk-core-errors

Conversation

@antoniivanov

Copy link
Copy Markdown
Contributor

Re submit the change -
#1182 - again. The only difference is that I renamed _get_eception_message to get_exception_message as not to break backwords compatability. I will merge this after

--

User code may trigger a SDK feature in a way that raises a user error. In such a use case, the error could be handled by the cautious user, in runtime. The VDK platform should be aware if user errors are handled in runtime or not, so that affects the data job termination status.

The old errors.BLAMEES (experimental data structure for keeping track of responsibles for errors priorly logged) should be refactored:

  • a resolvable context abstraction introduced
  • it is memory-managed (singleton, reasoning documented)
  • populated by the 3 user-facing errors.log_*() methods - in favour of a method designed to populate ErrorMessage entries
  • keeps track if the actual exception, along with all properties like who is the actual respobsible persona (user or platform, that was free-form str before), resolved by a data job step or not, etc.

Testing Done: added a functional test covering the
simple-query-failed-handled scenario, added singleton verification
for the resolvable context; ci/cd

Signed-off-by: Antoni Ivanov aivanov@vmware.com

@antoniivanov
antoniivanov force-pushed the person/aivanov/vdk-core-errors branch 2 times, most recently from f5398ff to 16034fb Compare October 6, 2022 07:59
Comment thread projects/vdk-core/src/vdk/internal/core/errors.py
@antoniivanov
antoniivanov force-pushed the person/aivanov/vdk-core-errors branch 2 times, most recently from ad5e330 to 010c9c9 Compare October 6, 2022 10:23
Re submit the change -
#1182 - again. The only
difference is that I renamed _get_eception_message to
get_exception_message as not to break backwords compatability. I will
merge this after

--

User code may trigger a SDK feature in a way that raises a user error.
In such a use case, the error could be handled by the cautious user, in
runtime. The VDK platform should be aware if user errors are handled
in runtime or not, so that affects the data job termination status.

The old errors.BLAMEES (experimental data structure for
keeping track of responsibles for errors priorly logged) should be
refactored:
* a resolvable context abstraction introduced
* it is memory-managed (singleton, reasoning documented)
* populated by the 3 user-facing `errors.log_*()` methods - in favour of
a method designed to populate ErrorMessage entries
* keeps track if the actual exception, along with all properties like
who is the actual respobsible persona (user or platform, that was
free-form str before), resolved by a data job step or not, etc.

Testing Done: added a functional test covering the
 `simple-query-failed-handled` scenario, added singleton verification
 for the resolvable context; ci/cd

Signed-off-by: Antoni Ivanov <aivanov@vmware.com>

vdk-core: test

Signed-off-by: Antoni Ivanov <aivanov@vmware.com>
@antoniivanov
antoniivanov force-pushed the person/aivanov/vdk-core-errors branch from c96af24 to dcc674a Compare October 10, 2022 12:08
@antoniivanov
antoniivanov enabled auto-merge (squash) October 10, 2022 15:55
@antoniivanov
antoniivanov merged commit 7f6e273 into main Oct 10, 2022
@antoniivanov
antoniivanov deleted the person/aivanov/vdk-core-errors branch October 10, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants