Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backend API] Implement endpoint for create event details #213 #281

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e93e518
add : Azure.Data.Tables 패키지 추가
tae0y Aug 31, 2024
b507d99
add : aspire.bicep 테이블 스토리지 추가
tae0y Aug 31, 2024
75d7042
add : 테이블 스토리지 연결, 데이터 생성 코드 준비
tae0y Aug 31, 2024
f4172b7
update : 병합 충돌 해소
tae0y Aug 31, 2024
b94bd2c
update : 테이블 스토리지 bicep 파일 분리, 별도 브랜치에서 작업
tae0y Sep 1, 2024
45b8e0c
update : events로 테이블명 변경
tae0y Sep 1, 2024
eaa6972
merge : 서비스, 레포지토리 추가 병합
tae0y Sep 1, 2024
290d971
update : 빌드오류 임시조치
tae0y Sep 1, 2024
9177a70
Merge branch 'aliencube:main' into feature/213-admin-event-create
tae0y Sep 3, 2024
9ad61bf
Merge branch 'aliencube:main' into feature/213-admin-event-create
tae0y Sep 6, 2024
b729ad0
Merge main into feature/213-admin-event-create
tae0y Sep 13, 2024
c158308
update : 작업내용 placeholder 추가
tae0y Sep 13, 2024
9b82301
update : ITableEntity 구현, TableClient 의존성 주입
tae0y Sep 14, 2024
954c43e
update : 객체 영속성 저장후 재조회
tae0y Sep 14, 2024
419a973
update : AdminEventDetails 역직렬화시 Etag 제외
tae0y Sep 14, 2024
30e911c
Merge branch 'main' into feature/213-admin-event-create
tae0y Sep 14, 2024
f17bd29
commit message 변경후 conflict 해소
tae0y Sep 14, 2024
719d973
update : null, 응답코드 처리 추가
tae0y Sep 14, 2024
a521674
add : 테스트 추가
tae0y Sep 14, 2024
ec396dd
update : repository/service 레이어별 로직 분리, 테스트 추가
tae0y Sep 15, 2024
b6f66f2
Merge branch 'main' into feature/213-admin-event-create
tae0y Sep 16, 2024
ada1f22
Merge branch 'main' into feature/213-admin-event-create
tae0y Sep 21, 2024
9385d2f
update : AdminEventDetails 불필요 ITableEntity 구현 제거
tae0y Sep 21, 2024
69f35d3
update : AdminEventService 필수값체크 및 PartitionKey 불필요 로직제거
tae0y Sep 21, 2024
17c9799
delete : 불필요 로컬 파일 제거
tae0y Sep 21, 2024
9548f5f
update : 테이블이름 하드코딩→동적조회
tae0y Sep 21, 2024
9b50e75
update : tableClient 이름변경
tae0y Sep 21, 2024
ca183e0
update : 저장후 재조회 로직 제거
tae0y Sep 21, 2024
1c6c2d6
update : 불필요 변경사항 롤백
tae0y Sep 21, 2024
9bef6ab
update : tableclient 조회 wrapper 메서드 추가
tae0y Sep 21, 2024
a836420
update : aspire.bicep 병합/변경충돌 정리
tae0y Sep 21, 2024
7a7d848
Merge branch 'main' into feature/213-admin-event-create
tae0y Sep 25, 2024
55db6d6
update : 병합후 repository 테이블 클라이언트, 파티션키 로직변경
tae0y Sep 25, 2024
473da19
update : 단위테스트 수정
tae0y Sep 25, 2024
2b466c7
update : 빌드오류 방지 임시조치
tae0y Sep 28, 2024
d77ca2c
update : OpenAIApiClient 빌드오류 임시조치 원복
tae0y Sep 28, 2024
3f4b1e1
Merge branch 'main' into feature/213-admin-event-create
tae0y Oct 2, 2024
74d9674
update : repository 불필요 각주 제거
tae0y Oct 4, 2024
9516436
update : unit test tableclient 목킹 추가
tae0y Oct 4, 2024
a083391
update : unit test AddEntityAsync 목킹 추가
tae0y Oct 4, 2024
6274ead
remote build 재시도
tae0y Oct 4, 2024
bbdbd68
update : 작업사항 목록화
tae0y Oct 12, 2024
0ff2663
Merge branch 'main' into feature/213-admin-event-create
tae0y Oct 12, 2024
f695a7c
update : Endpoint 유효성검사 필요여부 확인
tae0y Oct 12, 2024
4b5a1bd
update : RepositoryTests 예외발생 관점으로 테스트작성
tae0y Oct 12, 2024
78ffc92
update : ServiceTests 예외발생 관점으로 테스트작성, 필수값 없을 때는 payload 언마샬 실패로 테스트 불요
tae0y Oct 12, 2024
e503167
Merge branch 'main' into feature/213-admin-event-create
tae0y Oct 12, 2024
1988f7f
Merge branch 'main' into feature/213-admin-event-create
tae0y Oct 17, 2024
2587bd6
update : repo/service 반환값 검사하는 테스트로 수정
tae0y Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 98 additions & 69 deletions infra/aspire.bicep
Original file line number Diff line number Diff line change
@@ -1,69 +1,98 @@
// The main bicep module to provision Azure resources.
// For a more complete walkthrough to understand how this file works with azd,
// see https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/make-azd-compatible?pivots=azd-create

@minLength(1)
@maxLength(64)
@description('Name of the the environment which is used to generate a short unique hash used in all resources.')
param environmentName string

@minLength(1)
@description('Primary location for all resources')
param location string

// Parameters for Key Vault
param keyVaultName string = ''
param enabledForDeployment bool = true
param enabledForTemplateDeployment bool = true
param enableRbacAuthorization bool = true

var abbrs = loadJsonContent('./abbreviations.json')

// Tags that should be applied to all resources.
var tags = {
// Tag all resources with the environment name.
'azd-env-name': environmentName
}

// Generate a unique token to be used in naming resources.
// Remove linter suppression after using.
#disable-next-line no-unused-vars
// var resourceToken = toLower(uniqueString(subscription().id, environmentName, location))
var resourceToken = uniqueString(resourceGroup().id)

// Name of the service defined in azure.yaml
// A tag named azd-service-name with this value should be applied to the service host resource, such as:
// Microsoft.Web/sites for appservice, function
// Example usage:
// tags: union(tags, { 'azd-service-name': apiServiceName })
#disable-next-line no-unused-vars
// var apiServiceName = 'python-api'

// Add resources to be provisioned below.

// Provision Key Vault
module keyVault './core/security/keyvault.bicep' = {
name: 'keyVault'
params: {
name: !empty(keyVaultName) ? keyVaultName : '${abbrs.keyVaultVaults}${resourceToken}'
location: location
tags: tags
enabledForDeployment: enabledForDeployment
enabledForTemplateDeployment: enabledForTemplateDeployment
enableRbacAuthorization: enableRbacAuthorization
}
}

// Add outputs from the deployment here, if needed.
//
// This allows the outputs to be referenced by other bicep deployments in the deployment pipeline,
// or by the local machine as a way to reference created resources in Azure for local development.
// Secrets should not be added here.
//
// Outputs are automatically saved in the local azd environment .env file.
// To see these outputs, run `azd env get-values`, or `azd env get-values --output json` for json output.
output AZURE_LOCATION string = location
output AZURE_TENANT_ID string = tenant().tenantId

output AZURE_KEYVAULT_NAME string = keyVault.outputs.name
output AZURE_KEYVAULT_ENDPOINT string = keyVault.outputs.endpoint
// The main bicep module to provision Azure resources.
// For a more complete walkthrough to understand how this file works with azd,
// see https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/make-azd-compatible?pivots=azd-create

@minLength(1)
@maxLength(64)
@description('Name of the the environment which is used to generate a short unique hash used in all resources.')
param environmentName string

@minLength(1)
@description('Primary location for all resources')
param location string

// Parameters for Key Vault
param keyVaultName string = ''
param enabledForDeployment bool = true
param enabledForTemplateDeployment bool = true
param enableRbacAuthorization bool = true

var abbrs = loadJsonContent('./abbreviations.json')

// Tags that should be applied to all resources.
var tags = {
// Tag all resources with the environment name.
'azd-env-name': environmentName
}

// Generate a unique token to be used in naming resources.
// Remove linter suppression after using.
#disable-next-line no-unused-vars
// var resourceToken = toLower(uniqueString(subscription().id, environmentName, location))
var resourceToken = uniqueString(resourceGroup().id)

// Name of the service defined in azure.yaml
// A tag named azd-service-name with this value should be applied to the service host resource, such as:
// Microsoft.Web/sites for appservice, function
// Example usage:
// tags: union(tags, { 'azd-service-name': apiServiceName })
#disable-next-line no-unused-vars
// var apiServiceName = 'python-api'

// Add resources to be provisioned below.

// Provision Key Vault
module keyVault './core/security/keyvault.bicep' = {
name: 'keyVault'
params: {
name: !empty(keyVaultName) ? keyVaultName : '${abbrs.keyVaultVaults}${resourceToken}'
location: location
tags: tags
enabledForDeployment: enabledForDeployment
enabledForTemplateDeployment: enabledForTemplateDeployment
enableRbacAuthorization: enableRbacAuthorization
}
}

// Provision Storage Account
resource storageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' = {
name: 'storage${resourceToken}'
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
supportsHttpsTrafficOnly: true
}
}

// Provision Table Service
resource tableService 'Microsoft.Storage/storageAccounts/tableServices@2021-04-01' = {
parent: storageAccount
name: 'default'
}

// Provision Table Storage
resource table 'Microsoft.Storage/storageAccounts/tableServices/tables@2021-04-01' = {
parent: tableService
name: 'mytable'
}

// Add outputs from the deployment here, if needed.
//
// This allows the outputs to be referenced by other bicep deployments in the deployment pipeline,
// or by the local machine as a way to reference created resources in Azure for local development.
// Secrets should not be added here.
//
// Outputs are automatically saved in the local azd environment .env file.
// To see these outputs, run `azd env get-values`, or `azd env get-values --output json` for json output.
output AZURE_LOCATION string = location
output AZURE_TENANT_ID string = tenant().tenantId

output AZURE_KEYVAULT_NAME string = keyVault.outputs.name
output AZURE_KEYVAULT_ENDPOINT string = keyVault.outputs.endpoint

output AZURE_STORAGE_ACCOUNT_NAME string = storageAccount.name
output AZURE_STORAGE_ACCOUNT_TABLE_NAME string = table.name
//TODO: connection string을 깃헙 액션으로 안전하게 전달하기
1 change: 1 addition & 0 deletions src/AzureOpenAIProxy.ApiApp/AzureOpenAIProxy.ApiApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="$(AzureOpenAIVersion)" />
<PackageReference Include="Azure.Data.Tables" Version="12.9.0" />
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="$(AspNetCoreVersion)" />
Expand Down
Loading