Skip to content

Commit d610523

Browse files
committed
various post-sql-merge cleanups
* Remove pinned connector images and switch back to :dev tags. * Update some comments, and regenerate protobuf types. * Remove labels.PortConfig in favor of the canonical pf.NetworkPort. * Remove re-exports from ops => labels. * Clean up a shuffle package test, written before SQLite derivations were available, but which depends on read-only tranforms. * Remove extra wait time for airbyte-to-flow, since resolved. * Clean up after catalog tests, and ensure we keep the tree clean. * Regenerate flow.schema.json No behavior changes.
1 parent 313c7f2 commit d610523

File tree

34 files changed

+326
-884
lines changed

34 files changed

+326
-884
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,13 @@ jobs:
6565
path: ~/go/pkg/mod
6666
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
6767

68-
# Build and test all the things.
6968
- run: make install-tools
7069
- run: go mod download
7170
- run: make rust-gnu-test
7271
- run: make linux-gnu-binaries
7372

74-
- name: Ensure that generated files are unchanged.
75-
run: |
76-
git clean --force -d
77-
git diff
78-
[[ -z "$(git status --porcelain)" ]] || exit 1
73+
- name: Ensure that we didn't dirty the tree.
74+
run: git clean --force -d && git diff --exit-code || exit 1
7975

8076
- name: Upload Binaries
8177
uses: actions/upload-artifact@v2
@@ -112,7 +108,6 @@ jobs:
112108

113109
- uses: Swatinem/rust-cache@v2
114110

115-
# Build and test all the things.
116111
- run: go mod download
117112
- run: make rust-musl-test
118113
- run: make linux-musl-binaries
@@ -155,7 +150,6 @@ jobs:
155150
with:
156151
repo-token: ${{ secrets.GITHUB_TOKEN }}
157152

158-
# We require a minimal Go version of 1.17.
159153
- uses: actions/setup-go@v2
160154
with:
161155
go-version: "1.19"
@@ -212,9 +206,6 @@ jobs:
212206
- name: Add PKGDIR/bin to PATH
213207
run: echo "$GITHUB_WORKSPACE/.build/package/bin" >> $GITHUB_PATH
214208

215-
# Use make's `-o` flag to mark the binary artifacts they depend on as
216-
# "very old", which prevents Make from attempting to rebuild them from
217-
# scratch. This prevents us from recompiling them again here.
218209
- name: make catalog-test
219210
run: |
220211
make catalog-test SKIP_BUILD=true
@@ -231,7 +222,9 @@ jobs:
231222
run: |
232223
make /home/runner/work/flow/flow/.build/package/flow-x86-linux.tar.gz
233224
234-
# Package and push images.
225+
- name: Ensure that we didn't dirty the tree.
226+
run: git clean --force -d && git diff --exit-code || exit 1
227+
235228
- run: make docker-image
236229

237230
- run: make docker-push
@@ -250,17 +243,3 @@ jobs:
250243
tag_name: dev
251244
generate_release_notes: false
252245
files: .build/package/flow-x86-linux.tar.gz
253-
254-
# TODO remove me when merged.
255-
- if: ${{ github.ref == 'refs/pull/985/merge' }}
256-
name: Upload release assets (dev-sql)
257-
uses: softprops/action-gh-release@v1
258-
with:
259-
body: |
260-
This is the latest development build of the sql branch, which gets updated on every successful build of its branch.
261-
target_commitish: ${{ github.sha }}
262-
draft: false
263-
prerelease: true
264-
tag_name: dev-sql
265-
generate_release_notes: false
266-
files: .build/package/flow-x86-linux.tar.gz

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,9 @@ endif
337337
.PHONY: catalog-test
338338
catalog-test: data-plane-test-setup
339339
${PKGDIR}/bin/flowctl-go test --source examples/flow.yaml $(ARGS)
340+
# Cleanup generated SQLite DB.
341+
# TODO(johnny): Remove with in-process SQLite.
342+
rm examples/examples.db*
340343

341344
.PHONY: end-to-end-test
342345
end-to-end-test: data-plane-test-setup

crates/proto-flow/src/flow.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,8 @@ pub mod materialization_spec {
677677
#[allow(clippy::derive_partial_eq_without_eq)]
678678
#[derive(Clone, PartialEq, ::prost::Message)]
679679
pub struct DeprecatedShuffle {
680+
#[prost(string, tag = "1")]
681+
pub group_name: ::prost::alloc::string::String,
680682
#[prost(message, optional, tag = "3")]
681683
pub partition_selector: ::core::option::Option<
682684
::proto_gazette::broker::LabelSelector,

crates/proto-flow/src/flow.serde.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4350,10 +4350,16 @@ impl serde::Serialize for materialization_spec::binding::DeprecatedShuffle {
43504350
{
43514351
use serde::ser::SerializeStruct;
43524352
let mut len = 0;
4353+
if !self.group_name.is_empty() {
4354+
len += 1;
4355+
}
43534356
if self.partition_selector.is_some() {
43544357
len += 1;
43554358
}
43564359
let mut struct_ser = serializer.serialize_struct("flow.MaterializationSpec.Binding.DeprecatedShuffle", len)?;
4360+
if !self.group_name.is_empty() {
4361+
struct_ser.serialize_field("groupName", &self.group_name)?;
4362+
}
43574363
if let Some(v) = self.partition_selector.as_ref() {
43584364
struct_ser.serialize_field("partitionSelector", v)?;
43594365
}
@@ -4367,12 +4373,15 @@ impl<'de> serde::Deserialize<'de> for materialization_spec::binding::DeprecatedS
43674373
D: serde::Deserializer<'de>,
43684374
{
43694375
const FIELDS: &[&str] = &[
4376+
"group_name",
4377+
"groupName",
43704378
"partition_selector",
43714379
"partitionSelector",
43724380
];
43734381

43744382
#[allow(clippy::enum_variant_names)]
43754383
enum GeneratedField {
4384+
GroupName,
43764385
PartitionSelector,
43774386
}
43784387
impl<'de> serde::Deserialize<'de> for GeneratedField {
@@ -4395,6 +4404,7 @@ impl<'de> serde::Deserialize<'de> for materialization_spec::binding::DeprecatedS
43954404
E: serde::de::Error,
43964405
{
43974406
match value {
4407+
"groupName" | "group_name" => Ok(GeneratedField::GroupName),
43984408
"partitionSelector" | "partition_selector" => Ok(GeneratedField::PartitionSelector),
43994409
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
44004410
}
@@ -4415,9 +4425,16 @@ impl<'de> serde::Deserialize<'de> for materialization_spec::binding::DeprecatedS
44154425
where
44164426
V: serde::de::MapAccess<'de>,
44174427
{
4428+
let mut group_name__ = None;
44184429
let mut partition_selector__ = None;
44194430
while let Some(k) = map.next_key()? {
44204431
match k {
4432+
GeneratedField::GroupName => {
4433+
if group_name__.is_some() {
4434+
return Err(serde::de::Error::duplicate_field("groupName"));
4435+
}
4436+
group_name__ = Some(map.next_value()?);
4437+
}
44214438
GeneratedField::PartitionSelector => {
44224439
if partition_selector__.is_some() {
44234440
return Err(serde::de::Error::duplicate_field("partitionSelector"));
@@ -4427,6 +4444,7 @@ impl<'de> serde::Deserialize<'de> for materialization_spec::binding::DeprecatedS
44274444
}
44284445
}
44294446
Ok(materialization_spec::binding::DeprecatedShuffle {
4447+
group_name: group_name__.unwrap_or_default(),
44304448
partition_selector: partition_selector__,
44314449
})
44324450
}

crates/proto-flow/src/ops.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub struct Meta {
2222
#[prost(string, tag = "1")]
2323
pub uuid: ::prost::alloc::string::String,
2424
}
25+
/// Log is Flow's unified representation of task logs.
2526
#[allow(clippy::derive_partial_eq_without_eq)]
2627
#[derive(Clone, PartialEq, ::prost::Message)]
2728
pub struct Log {
@@ -103,6 +104,8 @@ pub mod log {
103104
}
104105
}
105106
}
107+
/// Stats is Flow's unified representation of task metrics and statistics.
108+
///
106109
/// TODO(johnny): We should evolve this into a consolidated message
107110
/// having a serde serialization corresponding to the ops/stats
108111
/// collection.

crates/proto-grpc/src/ops.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub struct Meta {
2222
#[prost(string, tag = "1")]
2323
pub uuid: ::prost::alloc::string::String,
2424
}
25+
/// Log is Flow's unified representation of task logs.
2526
#[allow(clippy::derive_partial_eq_without_eq)]
2627
#[derive(Clone, PartialEq, ::prost::Message)]
2728
pub struct Log {
@@ -103,6 +104,8 @@ pub mod log {
103104
}
104105
}
105106
}
107+
/// Stats is Flow's unified representation of task metrics and statistics.
108+
///
106109
/// TODO(johnny): We should evolve this into a consolidated message
107110
/// having a serde serialization corresponding to the ops/stats
108111
/// collection.

examples/citi-bike/csv-rides.flow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ captures:
77
examples/citi-bike/rides-from-s3:
88
endpoint:
99
connector:
10-
image: ghcr.io/estuary/source-s3:8952e37
10+
image: ghcr.io/estuary/source-s3:dev
1111
config: rides.config.yaml
1212
bindings:
1313
- resource:

0 commit comments

Comments
 (0)