From 2509f9b575186d29fae60d59a4e045d050017df6 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Tue, 29 Nov 2022 15:31:44 -0500 Subject: [PATCH 1/2] update CODEOWNERS to sig-core and update MM notifications --- .github/CODEOWNERS | 3 +- .github/workflows/mattermost-webhook.yml | 27 +++++++++++++++++ ...k.yml => mm-dev-notifications-webhook.yml} | 0 controller/env/appenv.go | 2 +- controller/env/trace.go | 2 +- controller/handler_edge_ctrl/common_tunnel.go | 19 +++++------- controller/model/api_session_heartbeats.go | 2 +- controller/model/authenticator_mod_cert.go | 2 +- controller/model/authenticator_mod_ext_jwt.go | 2 +- controller/model/authenticator_mod_updb.go | 2 +- controller/model/identity_manager.go | 2 +- controller/model/posture_response_model.go | 4 +-- controller/persistence/eventual_eventer.go | 2 +- controller/sync_strats/rtx.go | 2 +- go.mod | 19 ++++++------ go.sum | 29 ++++++++++--------- router/fabric/manager.go | 8 ++--- router/xgress_edge_tunnel/fabric.go | 4 +-- router/xgress_edge_tunnel/servicepoll.go | 4 +-- router/xgress_edge_tunnel/tunneler.go | 2 +- tunnel/dns/refcount.go | 2 +- tunnel/intercept/tproxy/tproxy_linux.go | 2 +- 22 files changed, 84 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/mattermost-webhook.yml rename .github/workflows/{mattermost-ziti-webhook.yml => mm-dev-notifications-webhook.yml} (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 31c103425..ef14d8022 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,4 @@ # see: # https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners -* @openziti/maintainers +* @openziti/sig-core + diff --git a/.github/workflows/mattermost-webhook.yml b/.github/workflows/mattermost-webhook.yml new file mode 100644 index 000000000..e048ec00f --- /dev/null +++ b/.github/workflows/mattermost-webhook.yml @@ -0,0 +1,27 @@ +name: mattermost-ziti-webhook +on: + create: + delete: + issues: + issue_comment: + pull_request_review: + pull_request_review_comment: + pull_request: + push: + fork: + release: + +jobs: + mattermost-ziti-webhook: + runs-on: ubuntu-latest + name: POST Webhook + env: + ZITI_LOG: 99 + ZITI_NODEJS_LOG: 99 + steps: + - uses: openziti/ziti-webhook-action@main + with: + ziti-id: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} + webhook-url: ${{ secrets.ZITI_MATTERMOST_WEBHOOK_URL }} + webhook-secret: ${{ secrets.ZITI_MATTERMOSTI_WEBHOOK_SECRET }} + diff --git a/.github/workflows/mattermost-ziti-webhook.yml b/.github/workflows/mm-dev-notifications-webhook.yml similarity index 100% rename from .github/workflows/mattermost-ziti-webhook.yml rename to .github/workflows/mm-dev-notifications-webhook.yml diff --git a/controller/env/appenv.go b/controller/env/appenv.go index 34a504d26..d6273a6cf 100644 --- a/controller/env/appenv.go +++ b/controller/env/appenv.go @@ -82,7 +82,7 @@ type AppEnv struct { HostController HostController ManagementApi *managementOperations.ZitiEdgeManagementAPI ClientApi *clientOperations.ZitiEdgeClientAPI - IdentityRefreshMap cmap.ConcurrentMap[time.Time] + IdentityRefreshMap cmap.ConcurrentMap[string, time.Time] identityRefreshMeter metrics.Meter StartupTime time.Time InstanceId string diff --git a/controller/env/trace.go b/controller/env/trace.go index 083038a9c..57c025df4 100644 --- a/controller/env/trace.go +++ b/controller/env/trace.go @@ -26,7 +26,7 @@ func (self *TraceSpec) String() string { } type TraceManager struct { - traceIdentities cmap.ConcurrentMap[*TraceSpec] + traceIdentities cmap.ConcurrentMap[string, *TraceSpec] shutdownNotify <-chan struct{} } diff --git a/controller/handler_edge_ctrl/common_tunnel.go b/controller/handler_edge_ctrl/common_tunnel.go index 0658574d3..4029146ae 100644 --- a/controller/handler_edge_ctrl/common_tunnel.go +++ b/controller/handler_edge_ctrl/common_tunnel.go @@ -4,20 +4,20 @@ import ( "bytes" "encoding/json" "github.com/google/uuid" - lru "github.com/hashicorp/golang-lru" + lru "github.com/hashicorp/golang-lru/v2" "github.com/openziti/edge/controller/model" "github.com/openziti/edge/controller/persistence" "github.com/openziti/edge/pb/edge_ctrl_pb" "github.com/openziti/fabric/logcontext" + "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/storage/boltz" "github.com/sirupsen/logrus" "sync" - "sync/atomic" "time" ) func NewTunnelState() *TunnelState { - sessionCache, _ := lru.New(256) + sessionCache, _ := lru.New[string, string](256) return &TunnelState{ sessionCache: sessionCache, } @@ -25,17 +25,13 @@ func NewTunnelState() *TunnelState { type TunnelState struct { configTypes []string - currentApiSessionId atomic.Value + currentApiSessionId concurrenz.AtomicValue[string] createApiSessionLock sync.Mutex - sessionCache *lru.Cache + sessionCache *lru.Cache[string, string] } func (self *TunnelState) getCurrentApiSessionId() string { - val := self.currentApiSessionId.Load() - if val != nil { - return val.(string) - } - return "" + return self.currentApiSessionId.Load() } func (self *TunnelState) clearCurrentApiSessionId() { @@ -230,8 +226,7 @@ func (self *baseTunnelRequestContext) ensureSessionForService(sessionId, session cacheKey := self.service.Id + "." + sessionType - if val, found := self.getTunnelState().sessionCache.Get(cacheKey); found { - sessionId = val.(string) + if sessionId, found := self.getTunnelState().sessionCache.Get(cacheKey); found { if self.isSessionValid(sessionId, sessionType) { logger.WithField("sessionId", sessionId).Debug("found valid cached session") self.newSession = true diff --git a/controller/model/api_session_heartbeats.go b/controller/model/api_session_heartbeats.go index cd8cd9196..326fa3248 100644 --- a/controller/model/api_session_heartbeats.go +++ b/controller/model/api_session_heartbeats.go @@ -26,7 +26,7 @@ import ( ) type HeartbeatCollector struct { - apiSessionLastAccessedAtMap cmap.ConcurrentMap[*HeartbeatStatus] + apiSessionLastAccessedAtMap cmap.ConcurrentMap[string, *HeartbeatStatus] updateInterval time.Duration closeNotify chan struct{} isFlushing atomic.Bool diff --git a/controller/model/authenticator_mod_cert.go b/controller/model/authenticator_mod_cert.go index 4eb8de5e9..fcb88e7fa 100644 --- a/controller/model/authenticator_mod_cert.go +++ b/controller/model/authenticator_mod_cert.go @@ -45,7 +45,7 @@ type AuthModuleCert struct { method string fingerprintGenerator cert.FingerprintGenerator staticCaCerts []*x509.Certificate - dynamicCaCache cmap.ConcurrentMap[[]*x509.Certificate] + dynamicCaCache cmap.ConcurrentMap[string, []*x509.Certificate] } func NewAuthModuleCert(env Env, caChain []byte) *AuthModuleCert { diff --git a/controller/model/authenticator_mod_ext_jwt.go b/controller/model/authenticator_mod_ext_jwt.go index a9259ff76..a57a1985f 100644 --- a/controller/model/authenticator_mod_ext_jwt.go +++ b/controller/model/authenticator_mod_ext_jwt.go @@ -45,7 +45,7 @@ const ( type AuthModuleExtJwt struct { env Env method string - signers cmap.ConcurrentMap[*signerRecord] + signers cmap.ConcurrentMap[string, *signerRecord] } func NewAuthModuleExtJwt(env Env) *AuthModuleExtJwt { diff --git a/controller/model/authenticator_mod_updb.go b/controller/model/authenticator_mod_updb.go index a3c123f30..f9d5896f3 100644 --- a/controller/model/authenticator_mod_updb.go +++ b/controller/model/authenticator_mod_updb.go @@ -32,7 +32,7 @@ var _ AuthProcessor = &AuthModuleUpdb{} type AuthModuleUpdb struct { env Env method string - attemptsByAuthenticatorId cmap.ConcurrentMap[int64] + attemptsByAuthenticatorId cmap.ConcurrentMap[string, int64] } func NewAuthModuleUpdb(env Env) *AuthModuleUpdb { diff --git a/controller/model/identity_manager.go b/controller/model/identity_manager.go index 7b351d628..b1e009b52 100644 --- a/controller/model/identity_manager.go +++ b/controller/model/identity_manager.go @@ -745,7 +745,7 @@ func (self *CreateIdentityWithEnrollmentsCmd) Decode(env Env, msg *edge_cmd_pb.C } type identityStatusMap struct { - identityIdToStatus cmap.ConcurrentMap[*status] + identityIdToStatus cmap.ConcurrentMap[string, *status] initOnce sync.Once activeDuration time.Duration } diff --git a/controller/model/posture_response_model.go b/controller/model/posture_response_model.go index 6acc44bb2..6a54cb606 100644 --- a/controller/model/posture_response_model.go +++ b/controller/model/posture_response_model.go @@ -37,8 +37,8 @@ const ( ) type PostureCache struct { - identityToPostureData cmap.ConcurrentMap[*PostureData] - apiSessionIdToIdentityId cmap.ConcurrentMap[string] + identityToPostureData cmap.ConcurrentMap[string, *PostureData] + apiSessionIdToIdentityId cmap.ConcurrentMap[string, string] ticker *time.Ticker isRunning atomic.Bool events.EventEmmiter diff --git a/controller/persistence/eventual_eventer.go b/controller/persistence/eventual_eventer.go index 9b96898cd..b33388b1f 100644 --- a/controller/persistence/eventual_eventer.go +++ b/controller/persistence/eventual_eventer.go @@ -277,7 +277,7 @@ const ( // data - []byte - a string array of arguments type EventualEventerBbolt struct { events.EventEmmiter - handlerMap cmap.ConcurrentMap[[]EventListenerFunc] //eventName -> handlers + handlerMap cmap.ConcurrentMap[string, []EventListenerFunc] //eventName -> handlers Interval time.Duration closeNotify <-chan struct{} stopNotify chan struct{} diff --git a/controller/sync_strats/rtx.go b/controller/sync_strats/rtx.go index 7f3fd26cc..403ac835b 100644 --- a/controller/sync_strats/rtx.go +++ b/controller/sync_strats/rtx.go @@ -116,7 +116,7 @@ func (rtx *RouterSender) Send(msg *channel.Message) error { // Map used make working with internal RouterSender easier as sync.Map accepts and returns interface{} type routerTxMap struct { - internalMap cmap.ConcurrentMap[*RouterSender] //id -> RouterSender + internalMap cmap.ConcurrentMap[string, *RouterSender] //id -> RouterSender } func (m *routerTxMap) Add(id string, routerMessageTxer *RouterSender) { diff --git a/go.mod b/go.mod index acd090114..fed479b37 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openziti/edge -go 1.18 +go 1.19 require ( github.com/AppsFlyer/go-sundheit v0.5.0 @@ -22,7 +22,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/gopacket v1.1.19 github.com/google/uuid v1.3.0 - github.com/hashicorp/golang-lru v0.5.4 + github.com/hashicorp/golang-lru/v2 v2.0.1 github.com/jessevdk/go-flags v1.5.0 github.com/jinzhu/copier v0.3.5 github.com/kataras/go-events v0.0.3-0.20201007151548-c411dc70c0a6 @@ -33,17 +33,17 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/netfoundry/secretstream v0.1.2 github.com/openziti/channel/v2 v2.0.19 - github.com/openziti/fabric v0.21.26 + github.com/openziti/fabric v0.21.27 github.com/openziti/foundation/v2 v2.0.8 github.com/openziti/identity v1.0.25 github.com/openziti/jwks v1.0.2 - github.com/openziti/metrics v1.1.7 - github.com/openziti/sdk-golang v0.18.4 + github.com/openziti/metrics v1.2.0 + github.com/openziti/sdk-golang v0.18.8 github.com/openziti/storage v0.1.28 github.com/openziti/transport/v2 v2.0.44 github.com/openziti/x509-claims v1.0.3 github.com/openziti/xweb/v2 v2.0.2 - github.com/orcaman/concurrent-map/v2 v2.0.0 + github.com/orcaman/concurrent-map/v2 v2.0.1 github.com/pkg/errors v0.9.1 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/sirupsen/logrus v1.9.0 @@ -91,6 +91,7 @@ require ( github.com/hashicorp/go-hclog v1.3.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/raft v1.3.11 // indirect github.com/hashicorp/raft-boltdb v0.0.0-20220329195025-15018e9b97e0 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect @@ -112,8 +113,8 @@ require ( github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/shirou/gopsutil/v3 v3.22.10 // indirect github.com/speps/go-hashids v2.0.0+incompatible // indirect - github.com/tklauser/go-sysconf v0.3.10 // indirect - github.com/tklauser/numcpus v0.5.0 // indirect + github.com/tklauser/go-sysconf v0.3.11 // indirect + github.com/tklauser/numcpus v0.6.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect @@ -121,7 +122,7 @@ require ( go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect go.opentelemetry.io/otel v1.11.1 // indirect go.opentelemetry.io/otel/trace v1.11.1 // indirect - golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect + golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 // indirect golang.org/x/mod v0.6.0 // indirect golang.org/x/term v0.2.0 // indirect golang.org/x/tools v0.2.0 // indirect diff --git a/go.sum b/go.sum index d5925a0b1..02b758dc0 100644 --- a/go.sum +++ b/go.sum @@ -317,6 +317,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.1 h1:5pv5N1lT1fjLg2VQ5KWc7kmucp2x/kvFOnxuVTqZ6x4= +github.com/hashicorp/golang-lru/v2 v2.0.1/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -448,18 +450,18 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openziti/channel/v2 v2.0.19 h1:WbkBmk0ZJoeLAutvpdHyDSdFBstX5yEWTTpYRYBiDzQ= github.com/openziti/channel/v2 v2.0.19/go.mod h1:WQBhxsbW1IybggaXKDHjT94Bzf4AatPPoxLLKoek4mo= -github.com/openziti/fabric v0.21.26 h1:TmspSoYmap4Je5vTObEx37afdO9CWQ7SeRNq3lyI8dI= -github.com/openziti/fabric v0.21.26/go.mod h1:0nk1LWcvJvcmkIXk7Yq3pC6Fa/x9fCeBvoeNTd9UOvE= +github.com/openziti/fabric v0.21.27 h1:oB9iELm/s/IzX9oGE1GCy1thoBDUtXp8N7Ruq3021uA= +github.com/openziti/fabric v0.21.27/go.mod h1:MHK/9Ysr5pNpTaeyBWBvFSV2EhpHSevPhor66eYGMDk= github.com/openziti/foundation/v2 v2.0.8 h1:0Y7GG7C+84yC7OxfqnRJjZGQaVqtkRKuCWzCrfFQts4= github.com/openziti/foundation/v2 v2.0.8/go.mod h1:Z0gnQsGJb/H/B+pixLtmCIpw1dBllD4QoT6LeD35WzA= github.com/openziti/identity v1.0.25 h1:29cNzDJMH14nIQmxfKxj6NdU0Oy6yIvCpKHuKTaaAy8= github.com/openziti/identity v1.0.25/go.mod h1:b/fapA3IvFcMa69IsIRODDHiezi/DaYm+jKqFKNn1vM= github.com/openziti/jwks v1.0.2 h1:32BGXIAnefS+v7uXKPb1x8/cQ7srek6Ai06dsrMTY4E= github.com/openziti/jwks v1.0.2/go.mod h1:KwO0x9FBG0aoJS5f6nH5xeHoplyR1H143SMI9kF0mC8= -github.com/openziti/metrics v1.1.7 h1:YUfRhbTxU7loAqoOEhTAuYrBaeTX36Ra8GORnq5pN1I= -github.com/openziti/metrics v1.1.7/go.mod h1:rKqoPs6di6QmQA1Sy0O0T1JtuMKP1vlluEZJR1HeY4E= -github.com/openziti/sdk-golang v0.18.4 h1:SQMruQlcIRl4QubPDEiPsJgp1LIpv5oauXAmZOXVo0s= -github.com/openziti/sdk-golang v0.18.4/go.mod h1:kSlaUera3i4sJqTYspFRjnlTeMX4A2Lk4G2hZWgMjeU= +github.com/openziti/metrics v1.2.0 h1:s/LUPdCaX1i8ZPRgEQNhg4ekUeID0P2I1TVFa4NpQuE= +github.com/openziti/metrics v1.2.0/go.mod h1:ZGAUFO3Q89j2U4zAxNraZfepwMpP4lkMepEnh2zO+lA= +github.com/openziti/sdk-golang v0.18.8 h1:L3RVD5N2bT3BzbzlPjPEOjrUBqByBmHHu6nOZzUvwkU= +github.com/openziti/sdk-golang v0.18.8/go.mod h1:4AmH+xCVSfoJpgjS6p+hHNPoTBehZl7LYYeTIdCRaqQ= github.com/openziti/storage v0.1.28 h1:h9TlQHdjRZQ+GfZ66D8y4kNRvHnMNcmB7BiysuHJAy8= github.com/openziti/storage v0.1.28/go.mod h1:eo3uH/2yOmesRRposgSZgVYKRZhmvHWx0/EdWb1c5v4= github.com/openziti/transport/v2 v2.0.44 h1:aoaz9fGfAH+habqSRS31nwVdtNKzzpY4gLT0cr5umfA= @@ -468,8 +470,8 @@ github.com/openziti/x509-claims v1.0.3 h1:HNdQ8Nf1agB3lBs1gahcO6zfkeS4S5xoQ2/PkY github.com/openziti/x509-claims v1.0.3/go.mod h1:Z0WIpBm6c4ecrpRKrou6Gk2wrLWxJO/+tuUwKh8VewE= github.com/openziti/xweb/v2 v2.0.2 h1:XYlVFriTq/U1wcUrc+XPnWJGhXh9NJPhtQ7+r3aC0cU= github.com/openziti/xweb/v2 v2.0.2/go.mod h1:KQOOlnJk08EZT3TWkvDj/pbIUEVbgG0IrrNzl8gsi40= -github.com/orcaman/concurrent-map/v2 v2.0.0 h1:iSMwuBQvQ1nX5i9gYuGMiSy0fjWHmazdjF+NdSO9JzI= -github.com/orcaman/concurrent-map/v2 v2.0.0/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM= +github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/6lP/L/zp6c= +github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM= github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 h1:mOvehYivJ4Aqu2CPe3D3lv8jhqOI9/1o0THxJHBE0qw= github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9/go.mod h1:gLH27qo/dvMhLTVVyMELpe3Tut7sOfkiDg7ZpeqKwsw= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -562,11 +564,12 @@ github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 h1:3SNcvBmEPE1YlB github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= -github.com/tklauser/numcpus v0.5.0 h1:ooe7gN0fg6myJ0EKoTAf5hebTZrH52px3New/D9iJ+A= -github.com/tklauser/numcpus v0.5.0/go.mod h1:OGzpTxpcIMNGYQdit2BYL1pvk/dSOaJWjKoflh+RQjo= +github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= @@ -638,8 +641,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE= -golang.org/x/exp v0.0.0-20221031165847-c99f073a8326/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 h1:yZNXmy+j/JpX19vZkVktWqAo7Gny4PBWYYK3zskGpx4= +golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/router/fabric/manager.go b/router/fabric/manager.go index e89e48969..ee85aaeb5 100644 --- a/router/fabric/manager.go +++ b/router/fabric/manager.go @@ -72,10 +72,10 @@ type StateManager interface { } type StateManagerImpl struct { - apiSessionsByToken cmap.ConcurrentMap[*edge_ctrl_pb.ApiSession] - activeApiSessions cmap.ConcurrentMap[*MapWithMutex] - sessions cmap.ConcurrentMap[uint32] - recentlyRemovedSessions cmap.ConcurrentMap[time.Time] + apiSessionsByToken cmap.ConcurrentMap[string, *edge_ctrl_pb.ApiSession] + activeApiSessions cmap.ConcurrentMap[string, *MapWithMutex] + sessions cmap.ConcurrentMap[string, uint32] + recentlyRemovedSessions cmap.ConcurrentMap[string, time.Time] Hostname string ControllerAddr string diff --git a/router/xgress_edge_tunnel/fabric.go b/router/xgress_edge_tunnel/fabric.go index 49573c0ac..d5e1c488f 100644 --- a/router/xgress_edge_tunnel/fabric.go +++ b/router/xgress_edge_tunnel/fabric.go @@ -63,8 +63,8 @@ type fabricProvider struct { apiSessionTokens map[string]string currentIdentity *edge.CurrentIdentity - dialSessions cmap.ConcurrentMap[string] - bindSessions cmap.ConcurrentMap[string] + dialSessions cmap.ConcurrentMap[string, string] + bindSessions cmap.ConcurrentMap[string, string] } func (self *fabricProvider) getDialSession(serviceName string) string { diff --git a/router/xgress_edge_tunnel/servicepoll.go b/router/xgress_edge_tunnel/servicepoll.go index bf373961f..8d248a41c 100644 --- a/router/xgress_edge_tunnel/servicepoll.go +++ b/router/xgress_edge_tunnel/servicepoll.go @@ -39,9 +39,9 @@ func newServicePoller(fabricProvider *fabricProvider) *servicePoller { } type servicePoller struct { - services cmap.ConcurrentMap[*edge.Service] + services cmap.ConcurrentMap[string, *edge.Service] serviceListener *intercept.ServiceListener - servicesLastUpdateToken cmap.ConcurrentMap[[]byte] + servicesLastUpdateToken cmap.ConcurrentMap[string, []byte] serviceListenerLock sync.Mutex fabricProvider *fabricProvider diff --git a/router/xgress_edge_tunnel/tunneler.go b/router/xgress_edge_tunnel/tunneler.go index 1961f35d7..59dc1a037 100644 --- a/router/xgress_edge_tunnel/tunneler.go +++ b/router/xgress_edge_tunnel/tunneler.go @@ -40,7 +40,7 @@ type tunneler struct { interceptor intercept.Interceptor servicePoller *servicePoller fabricProvider *fabricProvider - terminators cmap.ConcurrentMap[*tunnelTerminator] + terminators cmap.ConcurrentMap[string, *tunnelTerminator] } func newTunneler(factory *Factory, stateManager fabric.StateManager) *tunneler { diff --git a/tunnel/dns/refcount.go b/tunnel/dns/refcount.go index b801a53f6..7a0cdc1d7 100644 --- a/tunnel/dns/refcount.go +++ b/tunnel/dns/refcount.go @@ -13,7 +13,7 @@ func NewRefCountingResolver(resolver Resolver) Resolver { } type RefCountingResolver struct { - names cmap.ConcurrentMap[int] + names cmap.ConcurrentMap[string, int] wrapped Resolver } diff --git a/tunnel/intercept/tproxy/tproxy_linux.go b/tunnel/intercept/tproxy/tproxy_linux.go index 2dfbf3c7d..8f25ae3e8 100644 --- a/tunnel/intercept/tproxy/tproxy_linux.go +++ b/tunnel/intercept/tproxy/tproxy_linux.go @@ -91,7 +91,7 @@ func (a alwaysRemoveAddressTracker) RemoveAddress(string) bool { type interceptor struct { lanIf string - serviceProxies cmap.ConcurrentMap[*tProxy] + serviceProxies cmap.ConcurrentMap[string, *tProxy] ipt *iptables.IPTables } From 99466d8d8fc6e4a5787e89f3adba2fa5f8eefb88 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Wed, 30 Nov 2022 11:50:37 -0500 Subject: [PATCH 2/2] Add push to github-sig-core channel --- .../workflows/mattermost-channel-posts.yml | 44 +++++++++++++++++++ .../mm-dev-notifications-webhook.yml | 32 -------------- 2 files changed, 44 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/mattermost-channel-posts.yml delete mode 100644 .github/workflows/mm-dev-notifications-webhook.yml diff --git a/.github/workflows/mattermost-channel-posts.yml b/.github/workflows/mattermost-channel-posts.yml new file mode 100644 index 000000000..0ab6351b6 --- /dev/null +++ b/.github/workflows/mattermost-channel-posts.yml @@ -0,0 +1,44 @@ +name: mattermost-ziti-webhook +on: + issues: + issue_comment: + pull_request_review: + types: [ submitted ] + pull_request_review_comment: + pull_request: + types: [ opened, reopened, ready_for_review, closed ] + fork: + release: + types: [ released ] + workflow_dispatch: + +jobs: + send-notifications: + runs-on: ubuntu-latest + name: POST Webhook + if: github.actor != 'dependabot[bot]' + steps: + - uses: openziti/ziti-mattermost-action-py@main + if: | + github.repository_owner == 'openziti' + && ((github.event_name != 'pull_request_review') + || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')) + with: + zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} + webhookUrl: ${{ secrets.ZHOOK_URL }} + eventJson: ${{ toJson(github.event) }} + senderUsername: "GitHubZ" + destChannel: "dev-notifications" + + - uses: openziti/ziti-mattermost-action-py@main + if: | + github.repository_owner == 'openziti' + && ((github.event_name != 'pull_request_review') + || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')) + with: + zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} + webhookUrl: ${{ secrets.ZHOOK_URL }} + eventJson: ${{ toJson(github.event) }} + senderUsername: "GitHubZ" + destChannel: "github-sig-core" + diff --git a/.github/workflows/mm-dev-notifications-webhook.yml b/.github/workflows/mm-dev-notifications-webhook.yml deleted file mode 100644 index 403d28fcd..000000000 --- a/.github/workflows/mm-dev-notifications-webhook.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: mattermost-ziti-webhook -on: - issues: - issue_comment: - pull_request_review: - types: [submitted] - pull_request_review_comment: - pull_request: - push: - fork: - release: - types: [released] - workflow_dispatch: - -jobs: - mattermost-ziti-webhook: - runs-on: ubuntu-latest - name: POST Webhook - if: github.actor != 'dependabot[bot]' - steps: - - uses: openziti/ziti-mattermost-action-py@main - if: | - github.repository_owner == 'openziti' - && ((github.event_name != 'pull_request_review') - || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')) - with: - zitiId: ${{ secrets.ZITI_MATTERMOST_IDENTITY }} - webhookUrl: ${{ secrets.ZHOOK_URL }} - eventJson: ${{ toJson(github.event) }} - senderUsername: "GitHubZ" - destChannel: "dev-notifications" -