-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update schema #13573
Update schema #13573
Conversation
…te-message-model-change
@@ -1,7 +1,3 @@ | |||
# |
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.
the changes in this file look sus. formatting / linting didn't run?
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.
Yes, I manually run the generate script and it created this changes. I have posted on the connector channel about it.
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.
they responded. sounds like you just need to run build.
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.
yeah, I managed to finished on build. it is fixed
GLOBAL means that the state should be read from `global` and means that it represents the state for all the streams. It contains one shared | ||
state and individual stream states. | ||
PER_STREAM means that the state should be read from `stream`. The state present in this field correspond to the isolated state of the | ||
associated stream description. | ||
enum: | ||
- GLOBAL | ||
- PER_STREAM |
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.
- PER_STREAM | |
- STREAM | |
- LEGACY |
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.
per @jdpgrailsdev comment let's add legacy
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.
also i thought we were just calling it STREAM
, not PER_STREAM
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.
also good to mention in the description that is the same as LEGACY.
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.
Done
airbyte-protocol/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml
Show resolved
Hide resolved
"$ref": "#/definitions/AirbyteStreamState" | ||
StreamDescriptor: | ||
type: object | ||
additionalProperties: false |
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.
is there any reason not to set this to true
? i dunno if we'll ever change how we identify a stream, but i'm not sure there's any value to locking ourselves in.
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.
I wanted to avoid having the object to generate the extra field additionalProperties where it is not needed. I set it to true for future compatibility.
state: | ||
"$ref": "#/definitions/AirbyteStateBlob" | ||
AirbyteGlobalState: | ||
type: object | ||
additionalProperties: false |
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.
any reason not to set it to true
? I thought generally in the protocol we set this to true for compatibility reasons.
required: | ||
- sharedState | ||
properties: | ||
sharedState: |
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.
snake case
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.
done
type: object | ||
additionalProperties: false | ||
required: | ||
- sharedState |
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.
snake case
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.
also i don't think this should be required. i think it is stream_states
that should be required.
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.
done
properties: | ||
sharedState: | ||
"$ref": "#/definitions/AirbyteStateBlob" | ||
streamStates: |
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.
snake case
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.
done
airbyte-protocol/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml
Show resolved
Hide resolved
description: "Stream name" | ||
type: string | ||
streamDescriptor: | ||
"$ref": "#/definitions/StreamDescriptor" | ||
state: |
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.
in the spec we called it stream_state
. any reason not to stick with that name?
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 felt like duplication (
…te-message-model-change
airbyte-protocol/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml
Show resolved
Hide resolved
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.
couple last comments!
additionalProperties: true | ||
required: | ||
- stream_descriptor | ||
- stream_state |
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.
as written this will fail validations if stream_set: null
. I think we want to be able to do that. so i think it can't be required.
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.
I guess you are speaking of stream_state
. On the DB, if the state is null we will remove it from the DB, so it won't be present in the message, that's why it is required. Is is some scenario that was not expected.
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.
yes. sorry. stream_state
.
when a connectors wants to reset the state of a stream, I expected it would look like:
type: stream
stream:
stream_descriptor:
name: accounts
stream_state: null
how were you thinking about it?
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.
I re-request a review even if there is no change at the moment.
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.
looks great! thanks, @benmoriceau
airbyte-protocol/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml
Show resolved
Hide resolved
9e27a43
to
4619cd7
Compare
wahoo!!! |
What
New modification of the schema.