Skip to content

Commit

Permalink
refactor(pdl): Refactoring Assertion model enums out (#9191)
Browse files Browse the repository at this point in the history
Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
  • Loading branch information
jjoyce0510 and hsheth2 committed Nov 8, 2023
1 parent 70692b4 commit f87983d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,7 @@ record AssertionResult {
*/
@TimeseriesField = {}
@Searchable = {}
type: enum AssertionResultType {
/**
* The Assertion has not yet been fully evaluated
*/
INIT
/**
* The Assertion Succeeded
*/
SUCCESS
/**
* The Assertion Failed
*/
FAILURE
/**
* The Assertion encountered an Error
*/
ERROR
}
type: AssertionResultType

/**
* Number of rows for evaluated batch
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace com.linkedin.assertion

/**
* The final result of evaluating an assertion, e.g. SUCCESS, FAILURE, or ERROR.
*/
enum AssertionResultType {
/**
* The Assertion has not yet been fully evaluated
*/
INIT
/**
* The Assertion Succeeded
*/
SUCCESS
/**
* The Assertion Failed
*/
FAILURE
/**
* The Assertion encountered an Error
*/
ERROR
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ record AssertionRunEvent {
* The status of the assertion run as per this timeseries event.
*/
@TimeseriesField = {}
status: enum AssertionRunStatus {
/**
* The Assertion Run has completed
*/
COMPLETE
}
status: AssertionRunStatus

/**
* Results of assertion, present if the status is COMPLETE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace com.linkedin.assertion


/**
* The lifecycle status of an assertion run.
*/
enum AssertionRunStatus {
/**
* The Assertion Run has completed
*/
COMPLETE
}

0 comments on commit f87983d

Please sign in to comment.