Skip to content

Commit

Permalink
Merge branch 'master' into comp-bindings-aws-s3-2568
Browse files Browse the repository at this point in the history
  • Loading branch information
robertojrojas authored Jul 14, 2023
2 parents c516ad2 + 95045c4 commit 216ebe1
Show file tree
Hide file tree
Showing 46 changed files with 1,263 additions and 528 deletions.
12 changes: 12 additions & 0 deletions .github/infrastructure/conformance/azure/setup-azure-conf-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ SQL_SERVER_DB_NAME_VAR_NAME="AzureSqlServerDbName"
SQL_SERVER_CONNECTION_STRING_VAR_NAME="AzureSqlServerConnectionString"

AZURE_DB_POSTGRES_CONNSTRING_VAR_NAME="AzureDBPostgresConnectionString"
AZURE_DB_POSTGRES_CLIENT_ID_VAR_NAME="AzureDBPostgresClientId"
AZURE_DB_POSTGRES_CLIENT_SECRET_VAR_NAME="AzureDBPostgresClientSecret"
AZURE_DB_POSTGRES_TENANT_ID_VAR_NAME="AzureDBPostgresTenantId"

STORAGE_ACCESS_KEY_VAR_NAME="AzureBlobStorageAccessKey"
STORAGE_ACCOUNT_VAR_NAME="AzureBlobStorageAccount"
Expand Down Expand Up @@ -693,6 +696,15 @@ AZURE_DB_POSTGRES_CONNSTRING="host=${PREFIX}-conf-test-pg.postgres.database.azur
echo export ${AZURE_DB_POSTGRES_CONNSTRING_VAR_NAME}=\"${AZURE_DB_POSTGRES_CONNSTRING}\" >> "${ENV_CONFIG_FILENAME}"
az keyvault secret set --name "${AZURE_DB_POSTGRES_CONNSTRING_VAR_NAME}" --vault-name "${KEYVAULT_NAME}" --value "${AZURE_DB_POSTGRES_CONNSTRING}"

echo export ${AZURE_DB_POSTGRES_CLIENT_ID_VAR_NAME}=\"${SDK_AUTH_SP_APPID}\" >> "${ENV_CONFIG_FILENAME}"
az keyvault secret set --name "${AZURE_DB_POSTGRES_CLIENT_ID_VAR_NAME}" --vault-name "${KEYVAULT_NAME}" --value "${SDK_AUTH_SP_APPID}"

echo export ${AZURE_DB_POSTGRES_CLIENT_SECRET_VAR_NAME}=\"${SDK_AUTH_SP_CLIENT_SECRET}\" >> "${ENV_CONFIG_FILENAME}"
az keyvault secret set --name "${AZURE_DB_POSTGRES_CLIENT_SECRET_VAR_NAME}" --vault-name "${KEYVAULT_NAME}" --value "${SDK_AUTH_SP_CLIENT_SECRET}"

echo export ${AZURE_DB_POSTGRES_TENANT_ID_VAR_NAME}=\"${TENANT_ID}\" >> "${ENV_CONFIG_FILENAME}"
az keyvault secret set --name "${AZURE_DB_POSTGRES_TENANT_ID_VAR_NAME}" --vault-name "${KEYVAULT_NAME}" --value "${TENANT_ID}"

# ----------------------------------
# Populate Event Hubs test settings
# ----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/infrastructure/docker-compose-postgresql.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
db:
image: postgres:15
image: postgres:15-alpine
restart: always
ports:
- "5432:5432"
Expand Down
56 changes: 53 additions & 3 deletions .github/scripts/test-info.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,28 @@ const components = {
sourcePkg: ['bindings/mqtt3'],
},
'bindings.postgres': {
conformance: true,
certification: true,
},
'bindings.postgresql.docker': {
conformance: true,
conformanceSetup: 'docker-compose.sh postgresql',
sourcePkg: [
'bindings/postgresql',
'internal/authentication/postgresql',
],
},
'bindings.postgresql.azure': {
conformance: true,
requiredSecrets: [
'AzureDBPostgresConnectionString',
'AzureDBPostgresClientId',
'AzureDBPostgresClientSecret',
'AzureDBPostgresTenantId',
],
sourcePkg: [
'bindings/postgresql',
'internal/authentication/postgresql',
],
},
'bindings.rabbitmq': {
conformance: true,
Expand All @@ -191,9 +210,32 @@ const components = {
sourcePkg: ['bindings/redis', 'internal/component/redis'],
},
'configuration.postgres': {
conformance: true,
certification: true,
sourcePkg: [
'configuration/postgresql',
'internal/authentication/postgresql',
],
},
'configuration.postgresql.docker': {
conformance: true,
conformanceSetup: 'docker-compose.sh postgresql',
sourcePkg: [
'configuration/postgresql',
'internal/authentication/postgresql',
],
},
'configuration.postgresql.azure': {
conformance: true,
requiredSecrets: [
'AzureDBPostgresConnectionString',
'AzureDBPostgresClientId',
'AzureDBPostgresClientSecret',
'AzureDBPostgresTenantId',
],
sourcePkg: [
'configuration/postgresql',
'internal/authentication/postgresql',
],
},
'configuration.redis.v6': {
conformance: true,
Expand Down Expand Up @@ -585,6 +627,7 @@ const components = {
certification: true,
sourcePkg: [
'state/postgresql',
'internal/authentication/postgresql',
'internal/component/postgresql',
'internal/component/sql',
],
Expand All @@ -594,15 +637,22 @@ const components = {
conformanceSetup: 'docker-compose.sh postgresql',
sourcePkg: [
'state/postgresql',
'internal/authentication/postgresql',
'internal/component/postgresql',
'internal/component/sql',
],
},
'state.postgresql.azure': {
conformance: true,
requiredSecrets: ['AzureDBPostgresConnectionString'],
requiredSecrets: [
'AzureDBPostgresConnectionString',
'AzureDBPostgresClientId',
'AzureDBPostgresClientSecret',
'AzureDBPostgresTenantId',
],
sourcePkg: [
'state/postgresql',
'internal/authentication/postgresql',
'internal/component/postgresql',
'internal/component/sql',
],
Expand Down
38 changes: 38 additions & 0 deletions bindings/azure/openai/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# yaml-language-server: $schema=../../../component-metadata-schema.json
schemaVersion: v1
type: bindings
name: azure.openai
version: v1
status: alpha
title: "Azure OpenAI"
urls:
- title: Reference
url: https://docs.dapr.io/reference/components-reference/supported-bindings/azure-openai/
binding:
output: true
input: false
operations:
- name: completion
description: "Text completion"
- name: chat-completion
description: "Chat completion"
builtinAuthenticationProfiles:
- name: "azuread"
authenticationProfiles:
- title: "API Key"
description: "Authenticate using an API key"
metadata:
- name: apiKey
required: true
sensitive: true
description: "API Key"
example: '"1234567890abcdef"'
metadata:
- name: endpoint
required: true
description: "Endpoint of the Azure OpenAI service"
example: '"https://myopenai.openai.azure.com"'
- name: deploymentID
required: true
description: "ID of the model deployment in the Azure OpenAI service"
example: '"my-model"'
Loading

0 comments on commit 216ebe1

Please sign in to comment.