Skip to content

Commit

Permalink
Rename csharpscript and align host.json (#824)
Browse files Browse the repository at this point in the history
* Rename csharpscript and align host.json

* Default Trace

* Add back csx extension bundle
  • Loading branch information
Charles-Gagnon authored Apr 21, 2023
1 parent 875d4ae commit b0a3e9d
Show file tree
Hide file tree
Showing 62 changed files with 62 additions and 44 deletions.
2 changes: 1 addition & 1 deletion builds/azure-pipelines/template-steps-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ steps:
TEST_SERVER: '$(testServer)'
NODE_MODULES_PATH: '$(nodeModulesPath)'
AZUREFUNCTIONS_SQLBINDINGS_TELEMETRY_OPTOUT: '1'
LANGUAGES_TO_TEST: 'Java,JavaScript,OutOfProc,PowerShell,Python,CSharpscript'
LANGUAGES_TO_TEST: 'Java,JavaScript,OutOfProc,PowerShell,Python,Csx'
inputs:
command: test
projects: '${{ parameters.solution }}'
Expand Down
14 changes: 7 additions & 7 deletions docs/SetupGuide_DotnetCSharpScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,19 @@ The database scripts used for the following samples can be found [here](https://

#### Query String

See the [GetProducts](https://github.com/Azure/azure-functions-sql-extension/blob/main/samples/samples-csharpscript/InputBindingSamples/GetProducts) sample
See the [GetProducts](https://github.com/Azure/azure-functions-sql-extension/blob/main/samples/samples-csx/InputBindingSamples/GetProducts) sample

#### Empty Parameter Value

See the [GetProductsNameEmpty](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csharpscript/InputBindingSamples/GetProductsNameEmpty) sample
See the [GetProductsNameEmpty](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csx/InputBindingSamples/GetProductsNameEmpty) sample

#### Null Parameter Value

See the [GetProductsNameNull](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csharpscript/InputBindingSamples/GetProductsNameNull) sample
See the [GetProductsNameNull](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csx/InputBindingSamples/GetProductsNameNull) sample

#### Stored Procedure

See the [GetProductsStoredProcedure](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csharpscript/InputBindingSamples/GetProductsStoredProcedure) sample
See the [GetProductsStoredProcedure](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csx/InputBindingSamples/GetProductsStoredProcedure) sample

## Output Binding

Expand Down Expand Up @@ -218,12 +218,12 @@ Note: This tutorial requires that a SQL database is setup as shown in [Create a

#### Array

See the [AddProductsArray](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csharpscript/OutputBindingSamples/AddProductsArray) sample
See the [AddProductsArray](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csx/OutputBindingSamples/AddProductsArray) sample

#### Single Row

See the [AddProduct](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csharpscript/OutputBindingSamples/AddProduct) sample
See the [AddProduct](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csx/OutputBindingSamples/AddProduct) sample

### Sample with multiple Bindings

See the [GetAndAddProducts](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csharpscript/InputBindingSamples/GetAndAddProducts) sample
See the [GetAndAddProducts](https://github.com/Azure/azure-functions-sql-extension/tree/main/samples/samples-csx/InputBindingSamples/GetAndAddProducts) sample
24 changes: 12 additions & 12 deletions samples/samples-csharp/host.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
},
"logLevel": {
"default": "Information"
}
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
},
"logLevel": {
"default": "Trace"
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
"isEnabled": true,
"excludedTypes": "Request"
}
},
"logLevel": {
"default": "Trace"
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.*, 5.0.0)"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
"isEnabled": true,
"excludedTypes": "Request"
}
},
"logLevel": {
"default": "Trace"
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.*, 5.0.0)"
}
}
}
File renamed without changes.
8 changes: 7 additions & 1 deletion samples/samples-java/host.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
},
"logLevel": {
"default": "Information"
"default": "Trace"
}
},
"extensionBundle": {
Expand Down
2 changes: 1 addition & 1 deletion samples/samples-js/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"logLevel": {
"default": "Information"
"default": "Trace"
}
},
"extensionBundle": {
Expand Down
4 changes: 2 additions & 2 deletions samples/samples-outofproc/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"logLevel": {
"default": "Information"
"default": "Trace"
}
}
}
}
2 changes: 1 addition & 1 deletion samples/samples-powershell/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"logLevel": {
"default": "Information"
"default": "Trace"
}
},
"extensionBundle": {
Expand Down
7 changes: 5 additions & 2 deletions samples/samples-python-v2/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
"isEnabled": true,
"excludedTypes": "Request"
}
},
"logLevel": {
"default": "Trace"
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.0.0, 5.0.0)"
"version": "[4.*, 5.0.0)"
}
}
}
4 changes: 2 additions & 2 deletions samples/samples-python/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
}
},
"logLevel": {
"default": "Information"
"default": "Trace"
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.*, 5.0.0)"
}
}
}
2 changes: 1 addition & 1 deletion test-outofproc/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"logLevel": {
"default": "Information"
"default": "Trace"
}
}
}
2 changes: 1 addition & 1 deletion test/Common/SupportedLanguagesTestAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public UnsupportedLanguagesAttribute(params SupportedLanguages[] argsWithUnsuppo
public enum SupportedLanguages
{
CSharp,
CSharpscript,
Csx,
JavaScript,
PowerShell,
Java,
Expand Down
2 changes: 1 addition & 1 deletion test/Integration/SqlOutputBindingIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public void AddProductWithDifferentPropertiesTest(SupportedLanguages lang)
// Only the JavaScript function passes an empty JSON to the SQL extension.
// C#, Java, and Python throw an error while creating the Product object in the function and in PowerShell,
// the JSON would be passed as {"ProductId": null, "Name": null, "Cost": null}.
[UnsupportedLanguages(SupportedLanguages.CSharp, SupportedLanguages.Java, SupportedLanguages.OutOfProc, SupportedLanguages.PowerShell, SupportedLanguages.Python, SupportedLanguages.CSharpscript)]
[UnsupportedLanguages(SupportedLanguages.CSharp, SupportedLanguages.Java, SupportedLanguages.OutOfProc, SupportedLanguages.PowerShell, SupportedLanguages.Python, SupportedLanguages.Csx)]
public async Task NoPropertiesThrows(SupportedLanguages lang)
{
var foundExpectedMessageSource = new TaskCompletionSource<bool>();
Expand Down
9 changes: 6 additions & 3 deletions test/Integration/test-csx/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
"isEnabled": true,
"excludedTypes": "Request"
}
},
"logLevel": {
"default": "Trace"
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.*, 5.0.0)"
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.*, 5.0.0)"
}
}
}
2 changes: 1 addition & 1 deletion test/Integration/test-java/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
},
"logLevel": {
"default": "Information"
"default": "Trace"
}
},
"extensionBundle": {
Expand Down
12 changes: 6 additions & 6 deletions test/Microsoft.Azure.WebJobs.Extensions.Sql.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@
<Copy SourceFiles="@(_PythonCopyItems)" DestinationFolder="$(OutDir)\SqlExtensionSamples\Python\%(RecursiveDir)" />
<Message Text="Copied Python Samples output to $(OutDir)\SqlExtensionSamples\Python" Importance="high" />
<ItemGroup>
<_CSharpScriptCopyItems Include="..\samples\samples-csharpscript\InputBindingSamples\**\*.*" />
<_CSharpScriptCopyItems Include="..\samples\samples-csharpscript\OutputBindingSamples\**\*.*" />
<_CSharpScriptCopyItems Include="Integration\test-csx\**\*.*" />
<_CsxCopyItems Include="..\samples\samples-csx\InputBindingSamples\**\*.*" />
<_CsxCopyItems Include="..\samples\samples-csx\OutputBindingSamples\**\*.*" />
<_CsxCopyItems Include="Integration\test-csx\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(_CSharpScriptCopyItems)" DestinationFolder="$(OutDir)\SqlExtensionSamples\CSharpscript\%(RecursiveDir)" />
<Copy SourceFiles="@(_CsxCopyItems)" DestinationFolder="$(OutDir)\SqlExtensionSamples\Csx\%(RecursiveDir)" />
<ItemGroup>
<_CommonCopyItems Include="..\samples\samples-csharpscript\Common\**\*.*" />
<_CommonCopyItems Include="..\samples\samples-csx\Common\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(_CommonCopyItems)" DestinationFolder="$(OutDir)\SqlExtensionSamples\Common\%(RecursiveDir)" />
<Message Text="Copied CSX Samples output to $(OutDir)\SqlExtensionSamples\CSharpscript" Importance="high" />
<Message Text="Copied CSX Samples output to $(OutDir)\SqlExtensionSamples\Csx" Importance="high" />
</Target>
</Project>

0 comments on commit b0a3e9d

Please sign in to comment.