Skip to content

Commit

Permalink
[Document Intelligence] Live tests - Update to tme resource (#32464)
Browse files Browse the repository at this point in the history
### Packages impacted by this PR
`@azure-rest/ai-document-intelligence`

### Issues associated with this PR
Live test deployment failing
-
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4442040&view=logs&j=efd63400-1b36-5c22-495f-5e04b5698008&t=ed5e5767-be8d-5b92-6162-cc5a5ec88290

Updates to the resource fixes the pipeline

### Updates to the bicep file

1. Changed `blobStorageAccount` parameter from `'azuresdktrainingdata'`
to `'azuresdktrainingdatatme'`.
2. `batchTrainingDataResultContainer` parameter for batch training data
result container, `batchTrainingResultSasProperties` parameter with
associated properties. New var
`DOCUMENT_INTELLIGENCE_BATCH_TRAINING_DATA_RESULT_CONTAINER_SAS_URL`

3. **API Version Updates:**
   - Updated `apiVersion` from `'2024-04-01-preview'` to `'2024-10-01'`.
- Updated the resource definition for `cognitiveServicesAccount` to use
the new API version.
HarshaNalluru authored Jan 9, 2025
1 parent 8b31480 commit ced505e
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions sdk/documentintelligence/test-resources.bicep
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
param baseName string = resourceGroup().name
param location string = 'eastus'
param blobStorageAccount string = 'azuresdktrainingdata'
param blobStorageAccount string = 'azuresdktrainingdatatme'
param trainingDataContainer string = 'trainingdata-v3'
param batchTrainingDataContainer string = 'trainingdata-batch'
param selectionMarkTrainingDataContainer string = 'selectionmark-v3'
param blobResourceId string = resourceId('2cd617ea-1866-46b1-90e3-fffb087ebf9b', 'TrainingData', 'Microsoft.Storage/storageAccounts', blobStorageAccount)
param blobResourceId string = resourceId('4d042dc6-fe17-4698-a23f-ec6a8d1e98f4', 'static-test-resources', 'Microsoft.Storage/storageAccounts', blobStorageAccount)
param trainingDataSasProperties object = {
canonicalizedResource: '/blob/${blobStorageAccount}/${trainingDataContainer}'
signedExpiry: dateTimeAdd(utcNow('u'), 'P2M')
@@ -17,6 +17,13 @@ param batchTrainingSasProperties object = {
signedPermission: 'rwl'
signedResource: 'c'
}
param batchTrainingDataResultContainer string = 'trainingdata-batch-result'
param batchTrainingResultSasProperties object = {
canonicalizedResource: '/blob/${blobStorageAccount}/${batchTrainingDataResultContainer}'
signedExpiry: dateTimeAdd(utcNow('u'), 'P2M')
signedPermission: 'rwl'
signedResource: 'c'
}
param selectionMarkTrainingDataSasProperties object = {
canonicalizedResource: '/blob/${blobStorageAccount}/${selectionMarkTrainingDataContainer}'
signedExpiry: dateTimeAdd(utcNow('u'), 'P2M')
@@ -45,19 +52,14 @@ param classifierTrainingSasProperties object = {
signedResource: 'c'
}

var apiVersion = '2024-04-01-preview'
var apiVersion = '2024-10-01'
var storageApiVersion = '2023-05-01'

resource cognitiveServicesAccount 'Microsoft.CognitiveServices/accounts@2024-04-01-preview' = {
resource cognitiveServicesAccount 'Microsoft.CognitiveServices/accounts@2024-10-01' = {
name: baseName
location: location
sku: {
name: 'S0'
}
kind: 'FormRecognizer'
properties: {
customSubDomainName: baseName
}
sku: { name: 'S0' }
properties: { customSubDomainName: baseName }
}

output DOCUMENT_INTELLIGENCE_ENDPOINT string = cognitiveServicesAccount.properties.endpoint
@@ -67,6 +69,7 @@ output DOCUMENT_INTELLIGENCE_TESTING_CONTAINER_SAS_URL string = '${reference(blo
output DOCUMENT_INTELLIGENCE_SELECTION_MARK_STORAGE_CONTAINER_SAS_URL string = '${reference(blobResourceId, storageApiVersion).primaryEndpoints.blob}${selectionMarkTrainingDataContainer}?${listServiceSas(blobResourceId, storageApiVersion, selectionMarkTrainingDataSasProperties).serviceSasToken}'
output DOCUMENT_INTELLIGENCE_CLASSIFIER_TRAINING_DATA_CONTAINER_SAS_URL string = '${reference(blobResourceId, storageApiVersion).primaryEndpoints.blob}${classifierTrainingDataContainer}?${listServiceSas(blobResourceId, storageApiVersion, classifierTrainingSasProperties).serviceSasToken}'
output DOCUMENT_INTELLIGENCE_BATCH_TRAINING_DATA_CONTAINER_SAS_URL string = '${reference(blobResourceId, storageApiVersion).primaryEndpoints.blob}${batchTrainingDataContainer}?${listServiceSas(blobResourceId, storageApiVersion, batchTrainingSasProperties).serviceSasToken}'
output DOCUMENT_INTELLIGENCE_BATCH_TRAINING_DATA_RESULT_CONTAINER_SAS_URL string = '${reference(blobResourceId, storageApiVersion).primaryEndpoints.blob}${batchTrainingDataResultContainer}?${listServiceSas(blobResourceId, storageApiVersion, batchTrainingResultSasProperties).serviceSasToken}'
output DOCUMENT_INTELLIGENCE_MULTIPAGE_TRAINING_DATA_CONTAINER_SAS_URL string = '${reference(blobResourceId, storageApiVersion).primaryEndpoints.blob}${multiPageTestingDataContainer}?${listServiceSas(blobResourceId, storageApiVersion, multiPageTestingDataSasProperties).serviceSasToken}'
output DOCUMENT_INTELLIGENCE_TARGET_RESOURCE_REGION string = location
output DOCUMENT_INTELLIGENCE_TARGET_RESOURCE_ID string = cognitiveServicesAccount.id

0 comments on commit ced505e

Please sign in to comment.