Skip to content

Commit 77df752

Browse files
Merge branch 'dapr:main' into main
2 parents f73aef6 + 1d759c9 commit 77df752

File tree

127 files changed

+5119
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+5119
-476
lines changed

.build-tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
)
1313

1414
require (
15-
github.com/dapr/kit v0.15.3-0.20250717140748-8b780b4d81c5 // indirect
15+
github.com/dapr/kit v0.16.1 // indirect
1616
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
1717
github.com/gogo/protobuf v1.3.2 // indirect
1818
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect

.build-tools/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
2-
github.com/dapr/kit v0.15.3-0.20250717140748-8b780b4d81c5 h1:Q26gmPxs6WnnBYoudOlznPHsmrbTawcYEpHg4VoB7v8=
3-
github.com/dapr/kit v0.15.3-0.20250717140748-8b780b4d81c5/go.mod h1:40ZWs5P6xfYf7O59XgwqZkIyDldTIXlhTQhGop8QoSM=
2+
github.com/dapr/kit v0.16.1 h1:MqLAhHVg8trPy2WJChMZFU7ToeondvxcNHYVvMDiVf4=
3+
github.com/dapr/kit v0.16.1/go.mod h1:40ZWs5P6xfYf7O59XgwqZkIyDldTIXlhTQhGop8QoSM=
44
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
55
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
66
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

.build-tools/pkg/metadataschema/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type ComponentMetadata struct {
2020
// Version of the component metadata schema.
2121
SchemaVersion string `json:"schemaVersion" yaml:"schemaVersion" jsonschema:"enum=v1"`
2222
// Component type, of one of the allowed values.
23-
Type string `json:"type" yaml:"type" jsonschema:"enum=bindings,enum=state,enum=secretstores,enum=pubsub,enum=workflows,enum=configuration,enum=lock,enum=middleware,enum=crypto,enum=conversation"`
23+
Type string `json:"type" yaml:"type" jsonschema:"enum=bindings,enum=state,enum=secretstores,enum=pubsub,enum=workflows,enum=configuration,enum=lock,enum=middleware,enum=crypto,enum=nameresolution,enum=conversation"`
2424
// Name of the component (without the inital type, e.g. "http" instead of "bindings.http").
2525
Name string `json:"name" yaml:"name"`
2626
// Version of the component, with the leading "v", e.g. "v1".

.github/infrastructure/docker-compose-cassandra.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '2'
22

33
services:
44
cassandra:
5-
image: docker.io/bitnami/cassandra:4.0.1
5+
image: docker.io/bitnamilegacy/cassandra:4.1
66
ports:
77
- '7000:7000'
88
- '9042:9042'

.github/scripts/dapr_bot.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,18 @@
11
// list of owner who can control dapr-bot workflow
22
// TODO: Read owners from OWNERS file.
33
const owners = [
4-
'addjuarez',
5-
'amuluyavarote',
6-
'artursouza',
4+
'acroca',
75
'berndverst',
6+
'cicoyle',
87
'daixiang0',
9-
'DeepanshuA',
10-
'elena-kolevska',
11-
'halspang',
12-
'ItalyPaleAle',
8+
'javier-aliaga',
139
'jjcollinge',
1410
'joshvanl',
1511
'mikeee',
1612
'msfussell',
17-
'mukundansundar',
18-
'pkedy',
19-
'pravinpushkar',
20-
'robertojrojas',
21-
'RyanLettieri',
22-
'shivamkm07',
23-
'shubham1172',
13+
'nelson-parente',
2414
'sicoyle',
25-
'skyao',
26-
'Taction',
27-
'tmacam',
2815
'yaron2',
29-
'yash-nisar',
3016
]
3117

3218
const docsIssueBodyTpl = (

.github/scripts/test-info.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,23 @@ const components = {
795795
requiredSecrets: ['AzureSqlServerConnectionString'],
796796
sourcePkg: ['state/sqlserver', 'common/component/sql'],
797797
},
798+
'state.sqlserver.v2': {
799+
conformance: true,
800+
certification: true,
801+
conformanceSetup: 'docker-compose.sh sqlserver',
802+
requiredSecrets: ['AzureSqlServerConnectionString'],
803+
sourcePkg: ['state/sqlserver/v2', 'common/component/sql'],
804+
},
805+
'state.sqlserver.docker': {
806+
conformance: true,
807+
conformanceSetup: 'docker-compose.sh sqlserver',
808+
sourcePkg: ['state/sqlserver', 'common/component/sql'],
809+
},
810+
'state.sqlserver.v2.docker': {
811+
conformance: true,
812+
conformanceSetup: 'docker-compose.sh sqlserver',
813+
sourcePkg: ['state/sqlserver/v2', 'common/component/sql'],
814+
},
798815
// 'state.gcp.firestore.docker': {
799816
// conformance: true,
800817
// requireDocker: true,

bindings/apns/metadata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ authenticationProfiles:
3333
description: "The APNS private key (P8 file content)"
3434
metadata:
3535
- name: development
36-
type: boolean
36+
type: bool
3737
required: false
3838
description: "The APNS environment is development or not"
39-
example: true
40-
default: false
39+
example: "true"
40+
default: "false"

bindings/gcp/bucket/bucket.go

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ const (
4747
metadataEncodeBase64 = "encodeBase64"
4848
metadataSignTTL = "signTTL"
4949

50-
metadataKey = "key"
51-
maxResults = 1000
50+
metadataContentType = "contentType"
51+
metadataKey = "key"
52+
maxResults = 1000
5253

5354
metadataKeyBC = "name"
5455
signOperation = "sign"
@@ -77,6 +78,7 @@ type gcpMetadata struct {
7778
TokenURI string `json:"token_uri" mapstructure:"tokenURI" mdignore:"true" mapstructurealiases:"token_uri"`
7879
AuthProviderCertURL string `json:"auth_provider_x509_cert_url" mapstructure:"authProviderX509CertURL" mdignore:"true" mapstructurealiases:"auth_provider_x509_cert_url"`
7980
ClientCertURL string `json:"client_x509_cert_url" mapstructure:"clientX509CertURL" mdignore:"true" mapstructurealiases:"client_x509_cert_url"`
81+
ContentType string `json:"contentType,omitempty" mapstructure:"contentType"`
8082

8183
Bucket string `json:"bucket" mapstructure:"bucket"`
8284
DecodeBase64 bool `json:"decodeBase64,string" mapstructure:"decodeBase64"`
@@ -233,6 +235,12 @@ func (g *GCPStorage) create(ctx context.Context, req *bindings.InvokeRequest) (*
233235
}
234236

235237
h := g.client.Bucket(g.metadata.Bucket).Object(name).NewWriter(ctx)
238+
239+
// Set content type if provided
240+
if metadata.ContentType != "" {
241+
h.ContentType = metadata.ContentType
242+
}
243+
236244
// Cannot do `defer h.Close()` as Close() will flush the bytes and need to have error handling.
237245
if _, err = io.Copy(h, r); err != nil {
238246
cerr := h.Close()
@@ -378,9 +386,15 @@ func (metadata gcpMetadata) mergeWithRequestMetadata(req *bindings.InvokeRequest
378386
if val, ok := req.Metadata[metadataEncodeBase64]; ok && val != "" {
379387
merged.EncodeBase64 = strings.IsTruthy(val)
380388
}
389+
381390
if val, ok := req.Metadata[metadataSignTTL]; ok && val != "" {
382391
merged.SignTTL = val
383392
}
393+
394+
if val, ok := req.Metadata[metadataContentType]; ok && val != "" {
395+
merged.ContentType = val
396+
}
397+
384398
return merged, nil
385399
}
386400

bindings/gcp/bucket/bucket_test.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,42 @@ func TestMergeWithRequestMetadata(t *testing.T) {
233233
assert.NotNil(t, mergedMeta)
234234
assert.False(t, mergedMeta.EncodeBase64)
235235
})
236+
237+
t.Run("Has merged contentType metadata", func(t *testing.T) {
238+
m := bindings.Metadata{}
239+
m.Properties = map[string]string{
240+
"bucket": "my_bucket",
241+
"projectID": "my_project_id",
242+
"contentType": "text/plain",
243+
}
244+
gs := GCPStorage{logger: logger.NewLogger("test")}
245+
meta, err := gs.parseMetadata(m)
246+
require.NoError(t, err)
247+
assert.Equal(t, "text/plain", meta.ContentType)
248+
249+
// Empty request doesn't override
250+
request := bindings.InvokeRequest{}
251+
request.Metadata = map[string]string{}
252+
mergedMeta, err := meta.mergeWithRequestMetadata(&request)
253+
require.NoError(t, err)
254+
assert.Equal(t, "text/plain", mergedMeta.ContentType)
255+
256+
// Request overrides component
257+
request.Metadata = map[string]string{
258+
"contentType": "text/csv",
259+
}
260+
mergedMeta, err = meta.mergeWithRequestMetadata(&request)
261+
require.NoError(t, err)
262+
assert.Equal(t, "text/csv", mergedMeta.ContentType)
263+
264+
// Empty string doesn't override
265+
request.Metadata = map[string]string{
266+
"contentType": "",
267+
}
268+
mergedMeta, err = meta.mergeWithRequestMetadata(&request)
269+
require.NoError(t, err)
270+
assert.Equal(t, "text/plain", mergedMeta.ContentType)
271+
})
236272
}
237273

238274
func TestInit(t *testing.T) {

bindings/gcp/bucket/metadata.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,12 @@ metadata:
4444
description: |
4545
Configuration to encode base64 file content before return the content.
4646
(In case of saving a file with binary content).
47-
example: '"true, false"'
47+
example: '"true, false"'
48+
- name: contentType
49+
type: string
50+
required: false
51+
description: |
52+
The MIME type of the object being stored. If not specified, GCS will attempt to
53+
auto-detect the type, which may default to application/octet-stream or text/plain.
54+
Common values include text/csv, application/json, image/png, etc.
55+
example: '"text/csv", "application/json"'

0 commit comments

Comments
 (0)