-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add AirbyteTraceMessage to Airbyte protocol #12458
Changes from 4 commits
d90e8be
f6fab4d
5948b31
43f8194
69a732a
1a905d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -26,6 +26,7 @@ definitions: | |||||
- SPEC | ||||||
- CONNECTION_STATUS | ||||||
- CATALOG | ||||||
- TRACE | ||||||
log: | ||||||
description: "log message: any kind of logging you want the platform to know about." | ||||||
"$ref": "#/definitions/AirbyteLogMessage" | ||||||
|
@@ -43,6 +44,9 @@ definitions: | |||||
state: | ||||||
description: "schema message: the state. Must be the last message produced. The platform uses this information" | ||||||
"$ref": "#/definitions/AirbyteStateMessage" | ||||||
trace: | ||||||
description: "trace message: a message to provide human readable information to users" | ||||||
"$ref": "#/definitions/AirbyteTraceMessage" | ||||||
AirbyteRecordMessage: | ||||||
type: object | ||||||
additionalProperties: true | ||||||
|
@@ -94,6 +98,45 @@ definitions: | |||||
message: | ||||||
description: "the log message" | ||||||
type: string | ||||||
AirbyteTraceMessage: | ||||||
type: object | ||||||
additionalProperties: true | ||||||
required: | ||||||
- type | ||||||
- emitted_at | ||||||
properties: | ||||||
type: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was going to leave a comment here suggesting that we use the json schema |
||||||
description: "the type of trace message" | ||||||
type: string | ||||||
enum: | ||||||
- ERROR | ||||||
emitted_at: | ||||||
description: "the time in ms that the message was emitted" | ||||||
type: number | ||||||
error: | ||||||
description: "error data from the sync" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Suggesting this description change to use similar wording as the AirbyteMessage's various sub-type descriptions, since we have a similar structure here |
||||||
"$ref": "#/definitions/AirbyteErrorTraceMessage" | ||||||
AirbyteErrorTraceMessage: | ||||||
type: object | ||||||
additionalProperties: true | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 on cc @pedroslopez There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. recap from discussion on the doc: this will not be the case - No further properties are expected to be included in |
||||||
required: | ||||||
- message | ||||||
properties: | ||||||
message: | ||||||
description: The human readable message that will be shown to the user in the UI | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove the mention of the UI? the protocol doesn't know anything about the UI. For the protocol changes, it is important to not mix the what the data is with how it is being used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Maybe using the wording |
||||||
type: string | ||||||
internal_message: | ||||||
description: The less human readable, more technical message showing the reason for the failure, e.g. the first line of a stack trace | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can probably remove the concept of human readability. Also, why do we need this field? The example you're giving mentions the stack grace so I assume we could just read the stack_trace field first line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with you. Evan and I discussed this in the spec - @evantahler I think you were thinking that it's not necessarily going to be the first line of a stack trace and could be some other kind of message? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the conversation again - @evantahler maybe you only wanted this field for AirbyteTraceMessages that are not errors? https://docs.google.com/document/d/1ctrj3Yh_GjtQ93aND-WH3ocqGxsmxyC3jfiarrF6NY0/edit?disco=AAAAYr7ZeRQ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this is backwards thinking, but the inspiration for the message once again comes from our (future) usage of these messages to create FailureReasons, and we've got all 3: I do think there is value for
could come from a number of different places in the code (really, any time we make an HTTP request). Analyzing these by internal message (which will always be the same) even though they come from different stack traces will be helpful. Grouping by the full stack trace without doing some extraction won't be helpful. The "message" might be decorated better to say "...check your username" vs "... check your apiKey" if we are able to do that. Also, I think the connector, using the same programming language that generated the stack trace, is the best place to "extract" the most meaningful message from the stack, rather than the platform/airbyte-worker trying to do it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on Evan's comment I think internal_message makes sense to keep, but I agree that we should remove |
||||||
type: string | ||||||
stack_trace: | ||||||
description: The full stack trace of the error | ||||||
type: string | ||||||
failure_type: | ||||||
description: The type of error | ||||||
type: string | ||||||
enum: | ||||||
- SYSTEM_ERROR | ||||||
- CONFIG_ERROR | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that these enum values and https://github.com/airbytehq/airbyte/blob/master/airbyte-config/models/src/main/resources/types/FailureReason.yaml#L20-L26 have different cases. Not sure if that matters There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we will need to convert between the POJO type generated from this json schema to the type generated by the FailureReason json schema, it should be pretty trivial to lowercase these values when performing the conversion. However, given that there are already other lowercase string enum values in this protocol file (e.g. SyncMode), we might as well make these enum values lowercase as well to have them be consistent with the FailureReason values. |
||||||
AirbyteConnectionStatus: | ||||||
description: Airbyte connection status | ||||||
type: object | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is important to not call it human readable. It is really about providing structured information about the connector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps alternative language might be:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or perhaps
I would be happy with either