-
Notifications
You must be signed in to change notification settings - Fork 63
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
Phil/discover merge #1291
Merged
Merged
Phil/discover merge #1291
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...covers/snapshots/agent__discovers__specs__tests__capture_merge_resource_paths_update.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
source: crates/agent/src/discovers/specs.rs | ||
expression: json!(out) | ||
--- | ||
[ | ||
{ | ||
"bindings": [ | ||
{ | ||
"resource": { | ||
"modified": 1, | ||
"stream": "foo" | ||
}, | ||
"target": "acmeCo/renamed" | ||
}, | ||
{ | ||
"resource": { | ||
"modified": 2, | ||
"namespace": "spacename", | ||
"stream": "foo" | ||
}, | ||
"target": "acmeCo/renamed-namepaced" | ||
}, | ||
{ | ||
"disable": true, | ||
"resource": { | ||
"modified": "yup", | ||
"stream": "disabled" | ||
}, | ||
"target": "test/collection/disabled" | ||
} | ||
], | ||
"endpoint": { | ||
"connector": { | ||
"config": { | ||
"discovered": 1 | ||
}, | ||
"image": "new/image" | ||
} | ||
}, | ||
"interval": "34s", | ||
"shards": { | ||
"maxTxnDuration": "12s" | ||
} | ||
}, | ||
[ | ||
{ | ||
"documentSchema": { | ||
"const": "discovered" | ||
}, | ||
"recommendedName": "suggested", | ||
"resourceConfig": { | ||
"modified": 0, | ||
"stream": "foo" | ||
} | ||
}, | ||
{ | ||
"documentSchema": { | ||
"const": "discovered-namepaced" | ||
}, | ||
"recommendedName": "suggested2", | ||
"resourceConfig": { | ||
"modified": 0, | ||
"namespace": "spacename", | ||
"stream": "foo" | ||
} | ||
}, | ||
{ | ||
"documentSchema": false, | ||
"recommendedName": "other", | ||
"resourceConfig": { | ||
"modified": 0, | ||
"stream": "disabled" | ||
} | ||
} | ||
] | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
FYI no action -- we've not really talked about it IIRC -- but I've been thinking / endeavoring to keep the protobuf tags and names equal so that Spec request / response can be a "universal" RPC that's applied without knowing its type a priori.
This is still pretty half baked. I think it would mean, for example, arbitrarily picking
Runtime::unary_capture
to get a spec response even though you have no idea what the actual connector type is.(And Derivation connectors do also have a Spec RPC)
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, and this code makes the problem pretty apparent. In the case of image connectors, we can know the protocol up front by inspecting the image. But for other (local) connectors, there's no way to tell ahead of time unless we store the configuration elsewhere.
I think it would be nice if we could come up with a way to make
spec
a "universal" RPC. Another idea would be to pull theprotocol
from theconnector_tags
table instead of the other way around. Basically, make whoever deploys the connector specify what type of connector it is.