-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crates/sources: fix some subtle bugs in spec indirection and merging
Merging specs into source tables and indirecting specs are transformations done by `flowctl` as part of manipulating a user's local catalog specs. It's not used in the control-plane or data-plane. As such, in my testing I found some aspects were a bit fast-and-lose. Bug 1) sources::extend_from_catalog() was not properly attaching the fragment scopes to entities merged into tables::Sources from a models::Catalog. This matters because those scopes may be used to idenfity JSON schemas to bundle when later inline-ing the schema of a collection, so they need to be correct. Update the routine to be much more pedantic about producing correct scopes. Bug 2) sources::indirect_large_files() wasn't producing tables::Imports for the resources that it chose to indirect. This *also* matters if those sources are later inlined again, because JSON schema bundling relies on correct imports to identify schemas to bundle. Fixing both of these bugs allows `flowctl catalog pull-specs` to correctly pull down, indirect, then inline, validate, and generate files for a control-plane derivation (where it was failing previously). Extend sources scenario test coverage to fully compare each fixture for equality after fully round-tripping through indirection. Bonuses, that got wrapped up in this changeset and which I'm not bothering to pull out right now: * build::Fetcher now uses a thirty-second timeout for all fetches. In combination with the connectors timeout, this means catalog builds are now guaranteed to complete in a bounded time frame. * Move flowctl::local_specs::into_catalog() => sources::merge::into_catalog(). * When running with RUST_LOG=debug, `flowctl` will now persist a SQLite build database for examination or shipping to Estuary support.
- Loading branch information
1 parent
473a6a7
commit 9a6e209
Showing
26 changed files
with
427 additions
and
358 deletions.
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
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
Oops, something went wrong.