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 #1182

Merged
merged 14 commits into from
Sep 29, 2022

Conversation

ivakoleva
Copy link
Contributor

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: ivakoleva iva.koleva@clearcode.bg

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: ivakoleva <iva.koleva@clearcode.bg>
ivakoleva and others added 3 commits September 20, 2022 14:55
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: ivakoleva <iva.koleva@clearcode.bg>
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: ivakoleva <iva.koleva@clearcode.bg>
@antoniivanov
Copy link
Collaborator

I think it would be more efficient to have a quick talk in zoom. So schedule something or ping me on slack to sync face 2 face (or in these times zoom to zoom).

Momchil Z and others added 8 commits September 29, 2022 13:40
what: Added the ability to cancel the remaining job/template steps through the job_input interface.

why: This feature is required by users in certain cases e.g: if a data job depends on processing data from a source which has indicated no new entries since last run, then we can skip the execution.

testing: Tested locally with data job/templates and added functional tests.

Signed-off-by: Momchil Zhivkov mzhivkov@vmware.com
updates:
- [github.com/asottile/reorder_python_imports: v3.8.2 → v3.8.3](asottile/reorder-python-imports@v3.8.2...v3.8.3)
- [github.com/asottile/pyupgrade: v2.38.0 → v2.38.2](asottile/pyupgrade@v2.38.0...v2.38.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* vdk-properties-fs: new plugin for local FS properties storage

We need a simplistic plugin, that allows a developer or presenter
to quickly store secrets on the local FS during a dev/demo session,
that does not require a prerequisite of the entire Control Service
installed and running.

Added a FS properties client, that uses a customizable dir and filename
on the local file system to store the properties key-values. It does
support multiple teams and data jobs, the properties of those are nested
under a dedicated key for deduplication.
JSON format is used, enabling nested data structures.

Testing Done: added `test_fs_properties_plugin.py`, that covers multiple
data jobs using matching keys, and default/customized directory and
filename for file storage on the local FS.

Signed-off-by: ivakoleva <iva.koleva@clearcode.bg>

Signed-off-by: ivakoleva <iva.koleva@clearcode.bg>
Co-authored-by: Gabriel Georgiev <45939426+gageorgiev@users.noreply.github.com>
closes #1177.

Signed-off-by: murphp15 murphp15@tcd.ie

Signed-off-by: murphp15 murphp15@tcd.ie
what: The template arguments validator now makes use of the skip_remaining_steps() method when an empty source view is returned.

why: Users of the template requested that empty source view stopped resulting in a User Error, after a discussion it was agreed that this is the correct and desired behaviour.

testing: this change depends on #1188
Edited failing regression tests.

Signed-off-by: Momchil Zhivkov mzhivkov@vmware.com
Occasionally, vdk may indicate that a query execution took 10 or 20
minutes, even though the DB back shows that the query was actually
executes in seconds. This results in the DB backend issuing a timeout
error and a job failure. Because it happens sporadically, it is hard
to reproduce and debug locally.

This change adds a log message just before the result of a query is
fetched, and should help better understand at which step the query
execution hanged.

Testing done: Documentation change.

Signed-off-by: Andon Andonov <andonova@vmware.com>

Signed-off-by: Andon Andonov <andonova@vmware.com>
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: ivakoleva <iva.koleva@clearcode.bg>
Address review comments

Signed-off-by: Antoni Ivanov <aivanov@vmware.com>
@antoniivanov antoniivanov force-pushed the person/ikoleva/resolvable-context branch from 65e772c to 9db8381 Compare September 29, 2022 18:48
@antoniivanov antoniivanov merged commit 2463adc into main Sep 29, 2022
@antoniivanov antoniivanov deleted the person/ikoleva/resolvable-context branch September 29, 2022 19:01
antoniivanov added a commit that referenced this pull request Oct 4, 2022
antoniivanov added a commit that referenced this pull request Oct 4, 2022
antoniivanov pushed a commit that referenced this pull request Oct 4, 2022
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 pushed a commit that referenced this pull request Oct 6, 2022
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 pushed a commit that referenced this pull request Oct 6, 2022
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 pushed a commit that referenced this pull request Oct 6, 2022
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 pushed a commit that referenced this pull request Oct 10, 2022
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 added a commit that referenced this pull request Oct 10, 2022
…ing (#1212)

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

5 participants