<#7378 feat(connector): look up connector by proje...
# flyte-github
a
#7378 feat(connector): look up connector by project and domain Pull request opened by pingsutw Why are the changes needed? Today the connector plugin resolves a connector for a task using only the task's domain (plus task type and version). This makes it impossible to register a connector that should only serve a specific project, or to share a single connector deployment across all projects of a domain without conflict. This change lets a connector deployment declare both
project
and
domain
so that callers can look up a connector by
(project, domain)
, while still preserving today's domain-only behavior. What changes were proposed in this pull request? • Add a
project
field to
RegistryKey
and to
connector.Deployment
config. • Change
getFinalConnector
to take both
project
and
domain
and to fall back in this order: 1. exact
(project, domain)
match 2.
("", domain)
— domain-only (existing behavior) 3.
("", "")
— connector that supports any project/domain 4. configured default connector • Thread
project
through
ResourceMetaWrapper
and the `Create`/`Get`/`Delete` paths. • Populate
project
from
connectorDeployment.Project
at the three
RegistryKey
build sites in
client.go
. The existing domain-only behavior is preserved: configs that don't set
Project
continue to work because the empty-project key path is still checked. How was this patch tested? • Unit tests in
plugin_test.go
updated for the new
getFinalConnector
signature;
getConnectorRegistry
test continues to pass because unset
project
defaults to
""
. •
go build
and
go vet
clean across the connector package. •
go test ./go/tasks/plugins/webapi/connector/...
passes. Labels • added Check all the applicable boxes • All new and existing tests passed. • All commits are signed-off. flyteorg/flyte