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

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

Merged
merged 2 commits into from
Oct 10, 2022

Conversation

antoniivanov
Copy link
Collaborator

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
@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 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.

None yet

4 participants