Skip to content

Commit

Permalink
close out a number of TODOs which have been resolved
Browse files Browse the repository at this point in the history
* deploy-agent-api, deploy-data-plane-controller, and derive-typescript are merged.

* Continue to clear the `internal` field in flow-connector-init.
  There's no use case for sending it into connectors.

* No current plan to implement a Destroy data-plane-controller message.

* Current UI is generating tokens via /authorize/user/task
  • Loading branch information
jgraettinger committed Dec 8, 2024
1 parent cfcad03 commit 5719b8e
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/deploy-agent-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Deploy agent-api

on:
workflow_dispatch: {}
# TODO(johnny): Remove after merging.
push:
branches: [johnny/dpc-cd]

env:
CARGO_INCREMENTAL: 0 # Faster from-scratch builds.
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/deploy-data-plane-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Deploy data-plane-controller

on:
workflow_dispatch: {}
# TODO(johnny): Remove after merging.
push:
branches: [johnny/dpc-cd]

env:
CARGO_INCREMENTAL: 0 # Faster from-scratch builds.
Expand Down
2 changes: 1 addition & 1 deletion crates/connector-init/src/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl proto_grpc::capture::connector_server::Connector for Proxy {
rpc::new_command(&self.entrypoint),
self.codec,
request.into_inner().map_ok(|mut request| {
request.internal.clear(); // TODO(johnny): Temporarily remove $internal.
request.internal.clear();
request
}),
ops::stderr_log_handler,
Expand Down
2 changes: 1 addition & 1 deletion crates/connector-init/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl proto_grpc::derive::connector_server::Connector for Proxy {
rpc::new_command(&self.entrypoint),
self.codec,
request.into_inner().map_ok(|mut request| {
request.internal.clear(); // TODO(johnny): Temporarily remove $internal.
request.internal.clear();
request
}),
ops::stderr_log_handler,
Expand Down
2 changes: 1 addition & 1 deletion crates/connector-init/src/materialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl proto_grpc::materialize::connector_server::Connector for Proxy {
rpc::new_command(&self.entrypoint),
self.codec,
request.into_inner().map_ok(|mut request| {
request.internal.clear(); // TODO(johnny): Temporarily remove $internal.
request.internal.clear();
request
}),
ops::stderr_log_handler,
Expand Down
1 change: 0 additions & 1 deletion crates/data-plane-controller/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub enum Message {
Preview,
Refresh,
Converge,
// TODO(johnny): `Destroy` variant for managed tear-down.
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
Expand Down
7 changes: 3 additions & 4 deletions go/network/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"net/http"
"net/url"

"github.com/estuary/flow/go/labels"
pf "github.com/estuary/flow/go/protocols/flow"
pb "go.gazette.dev/core/broker/protocol"
"google.golang.org/grpc/metadata"
)
Expand All @@ -27,21 +29,18 @@ func verifyAuthorization(req *http.Request, verifier pb.Verifier, taskName strin
req.Context(),
metadata.Pairs("authorization", bearer),
),
0, // TODO(johnny): Should be pf.Capability_NETWORK_PROXY.
pf.Capability_NETWORK_PROXY,
)
if err != nil {
return err
}
cancel() // We don't use the returned context.

/* TODO(johnny): Inspect claims once UI is updated to use /authorize/user/task API.
if !claims.Selector.Matches(pb.MustLabelSet(
labels.TaskName, taskName,
)) {
return fmt.Errorf("invalid authorization for task %s (%s)", taskName, bearer)
}
*/
_ = claims

return nil
}
Expand Down

0 comments on commit 5719b8e

Please sign in to comment.