Skip to content

Commit c2cbcd0

Browse files
authored
Local file-based name resolver with SQLite + Update components-contrib to register Blob Storage v2 (dapr#7038)
* Added support for SQLite nameresolver Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Added temp replacement Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Use a strongly-typed Instance struct for name resolvers Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Removed mod replacement Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Some test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Updated pinned contrib Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Updated pinned components-contrib again Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Mod tidy Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
1 parent 90835fa commit c2cbcd0

File tree

15 files changed

+206
-141
lines changed

15 files changed

+206
-141
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//go:build allcomponents
2+
3+
/*
4+
Copyright 2023 The Dapr Authors
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
*/
15+
16+
package components
17+
18+
import (
19+
"github.com/dapr/components-contrib/nameresolution/sqlite"
20+
nrLoader "github.com/dapr/dapr/pkg/components/nameresolution"
21+
)
22+
23+
func init() {
24+
nrLoader.DefaultRegistry.RegisterComponent(sqlite.NewResolver, "sqlite")
25+
}

cmd/daprd/components/state_azure_blobstorage.go

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//go:build allcomponents || stablecomponents
22

33
/*
4-
Copyright 2021 The Dapr Authors
4+
Copyright 2023 The Dapr Authors
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
77
You may obtain a copy of the License at
@@ -16,10 +16,20 @@ limitations under the License.
1616
package components
1717

1818
import (
19-
"github.com/dapr/components-contrib/state/azure/blobstorage"
19+
v1 "github.com/dapr/components-contrib/state/azure/blobstorage/v1"
20+
v2 "github.com/dapr/components-contrib/state/azure/blobstorage/v2"
21+
"github.com/dapr/dapr/pkg/components"
2022
stateLoader "github.com/dapr/dapr/pkg/components/state"
2123
)
2224

2325
func init() {
24-
stateLoader.DefaultRegistry.RegisterComponent(blobstorage.NewAzureBlobStorageStore, "azure.blobstorage")
26+
stateLoader.DefaultRegistry.RegisterComponentWithVersions("azure.blobstorage", components.Versioning{
27+
Preferred: components.VersionConstructor{
28+
Version: "v2", Constructor: v2.NewAzureBlobStorageStore,
29+
},
30+
Deprecated: []components.VersionConstructor{
31+
{Version: "v1", Constructor: v1.NewAzureBlobStorageStore},
32+
},
33+
Default: "v1",
34+
})
2535
}

go.mod

+22-21
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/argoproj/argo-rollouts v1.4.1
1010
github.com/cenkalti/backoff/v4 v4.2.1
1111
github.com/cloudevents/sdk-go/v2 v2.14.0
12-
github.com/dapr/components-contrib v1.12.0-rc.4.0.20231009175401-9f2cc5c158bb
12+
github.com/dapr/components-contrib v1.12.1-0.20231106194303-88eb49c838c2
1313
github.com/dapr/kit v0.12.2-0.20231031211530-0e1fd37fc4b3
1414
github.com/evanphx/json-patch/v5 v5.7.0
1515
github.com/go-chi/chi/v5 v5.0.10
@@ -20,7 +20,7 @@ require (
2020
github.com/google/cel-go v0.13.0
2121
github.com/google/go-cmp v0.5.9
2222
github.com/google/gofuzz v1.2.0
23-
github.com/google/uuid v1.3.1
23+
github.com/google/uuid v1.4.0
2424
github.com/gorilla/mux v1.8.0
2525
github.com/gorilla/websocket v1.5.0
2626
github.com/grafana/k6-operator v0.0.8
@@ -33,7 +33,7 @@ require (
3333
github.com/jackc/pgx/v5 v5.4.3
3434
github.com/jhump/protoreflect v1.15.2
3535
github.com/kelseyhightower/envconfig v1.4.0
36-
github.com/lestrrat-go/jwx/v2 v2.0.15
36+
github.com/lestrrat-go/jwx/v2 v2.0.16
3737
github.com/microsoft/durabletask-go v0.3.1
3838
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4
3939
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
@@ -59,11 +59,11 @@ require (
5959
go.uber.org/ratelimit v0.3.0
6060
golang.org/x/crypto v0.14.0
6161
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
62-
golang.org/x/net v0.16.0
62+
golang.org/x/net v0.17.0
6363
golang.org/x/sync v0.4.0
64-
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5
65-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d
66-
google.golang.org/grpc v1.57.0
64+
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a
65+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405
66+
google.golang.org/grpc v1.59.0
6767
google.golang.org/protobuf v1.31.0
6868
gopkg.in/yaml.v3 v3.0.1
6969
k8s.io/api v0.26.9
@@ -76,30 +76,30 @@ require (
7676
k8s.io/metrics v0.26.3
7777
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
7878
sigs.k8s.io/controller-runtime v0.14.6
79-
sigs.k8s.io/yaml v1.3.0
79+
sigs.k8s.io/yaml v1.4.0
8080
)
8181

8282
require (
83-
cloud.google.com/go v0.110.7 // indirect
84-
cloud.google.com/go/compute v1.23.0 // indirect
83+
cloud.google.com/go v0.110.8 // indirect
84+
cloud.google.com/go/compute v1.23.1 // indirect
8585
cloud.google.com/go/compute/metadata v0.2.3 // indirect
86-
cloud.google.com/go/datastore v1.14.0 // indirect
87-
cloud.google.com/go/iam v1.1.1 // indirect
86+
cloud.google.com/go/datastore v1.15.0 // indirect
87+
cloud.google.com/go/iam v1.1.3 // indirect
8888
cloud.google.com/go/pubsub v1.33.0 // indirect
89-
cloud.google.com/go/secretmanager v1.11.1 // indirect
89+
cloud.google.com/go/secretmanager v1.11.2 // indirect
9090
cloud.google.com/go/storage v1.33.0 // indirect
9191
dubbo.apache.org/dubbo-go/v3 v3.0.3-0.20230118042253-4f159a2b38f3 // indirect
9292
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
9393
github.com/99designs/keyring v1.2.1 // indirect
9494
github.com/AthenZ/athenz v1.10.39 // indirect
9595
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
9696
github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai v0.3.0 // indirect
97-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect
98-
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect
97+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect
98+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect
9999
github.com/Azure/azure-sdk-for-go/sdk/data/azappconfig v0.6.0 // indirect
100100
github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos v0.3.6 // indirect
101101
github.com/Azure/azure-sdk-for-go/sdk/data/aztables v1.0.2 // indirect
102-
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
102+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.4.0 // indirect
103103
github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.0.1 // indirect
104104
github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.4.1 // indirect
105105
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2 v2.1.1 // indirect
@@ -292,7 +292,7 @@ require (
292292
github.com/marusama/semaphore/v2 v2.5.0 // indirect
293293
github.com/matoous/go-nanoid/v2 v2.0.0 // indirect
294294
github.com/mattn/go-colorable v0.1.13 // indirect
295-
github.com/mattn/go-isatty v0.0.19 // indirect
295+
github.com/mattn/go-isatty v0.0.20 // indirect
296296
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
297297
github.com/microsoft/go-mssqldb v1.6.0 // indirect
298298
github.com/miekg/dns v1.1.43 // indirect
@@ -329,6 +329,7 @@ require (
329329
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
330330
github.com/prometheus/procfs v0.11.0 // indirect
331331
github.com/prometheus/statsd_exporter v0.22.7 // indirect
332+
github.com/puzpuzpuz/xsync/v3 v3.0.0 // indirect
332333
github.com/rabbitmq/amqp091-go v1.8.1 // indirect
333334
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
334335
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
@@ -383,7 +384,7 @@ require (
383384
go.uber.org/zap v1.24.0 // indirect
384385
golang.org/x/arch v0.3.0 // indirect
385386
golang.org/x/mod v0.13.0 // indirect
386-
golang.org/x/oauth2 v0.12.0 // indirect
387+
golang.org/x/oauth2 v0.13.0 // indirect
387388
golang.org/x/sys v0.13.0 // indirect
388389
golang.org/x/term v0.13.0 // indirect
389390
golang.org/x/text v0.13.0 // indirect
@@ -393,7 +394,7 @@ require (
393394
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
394395
google.golang.org/api v0.138.0 // indirect
395396
google.golang.org/appengine v1.6.8 // indirect
396-
google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93 // indirect
397+
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
397398
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
398399
gopkg.in/couchbase/gocb.v1 v1.6.7 // indirect
399400
gopkg.in/couchbase/gocbcore.v7 v7.1.18 // indirect
@@ -413,11 +414,11 @@ require (
413414
lukechampine.com/uint128 v1.3.0 // indirect
414415
modernc.org/cc/v3 v3.41.0 // indirect
415416
modernc.org/ccgo/v3 v3.16.15 // indirect
416-
modernc.org/libc v1.24.1 // indirect
417+
modernc.org/libc v1.29.0 // indirect
417418
modernc.org/mathutil v1.6.0 // indirect
418419
modernc.org/memory v1.7.2 // indirect
419420
modernc.org/opt v0.1.3 // indirect
420-
modernc.org/sqlite v1.26.0 // indirect
421+
modernc.org/sqlite v1.27.0 // indirect
421422
modernc.org/strutil v1.2.0 // indirect
422423
modernc.org/token v1.1.0 // indirect
423424
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect

0 commit comments

Comments
 (0)