api no longer fails when no pilots or logbook entries

This commit is contained in:
2024-12-01 11:10:13 -06:00
parent cd21f5170f
commit 28115bbcaa
4 changed files with 61 additions and 43 deletions

View File

@@ -5,15 +5,35 @@ on:
- feature/** - feature/**
jobs: jobs:
changed-files:
name: changed-files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
uses: tj-actions/changed-files@v45
with:
dir_names: 'true'
build-deploy-api: build-deploy-api:
if: contains(needs.changed-files.outputs.modified_files, 'api')
name: build-deploy-api name: build-deploy-api
needs:
- changed-files
uses: ./.github/workflows/api.yaml uses: ./.github/workflows/api.yaml
with: with:
calling_workflow: dev calling_workflow: dev
secrets: inherit secrets: inherit
build-deploy-app: build-deploy-app:
if: contains(needs.changed-files.outputs.modified_files, 'app')
name: build-deploy-app name: build-deploy-app
needs:
- changed-files
uses: ./.github/workflows/app.yaml uses: ./.github/workflows/app.yaml
with: with:
calling_workflow: dev calling_workflow: dev

View File

@@ -7,22 +7,22 @@ on:
- main - main
jobs: jobs:
build-deploy-api: # build-deploy-api:
if: github.event_name == 'pull_request' && github.event.action != 'closed' # if: github.event_name == 'pull_request' && github.event.action != 'closed'
name: build-deploy-api # name: build-deploy-api
uses: ./.github/workflows/api.yaml # uses: ./.github/workflows/api.yaml
with: # with:
calling_workflow: dev # calling_workflow: dev
secrets: inherit # secrets: inherit
build-deploy-app: # build-deploy-app:
if: github.event_name == 'pull_request' && github.event.action != 'closed' # if: github.event_name == 'pull_request' && github.event.action != 'closed'
name: build-deploy-app # name: build-deploy-app
uses: ./.github/workflows/app.yaml # uses: ./.github/workflows/app.yaml
with: # with:
calling_workflow: dev # calling_workflow: dev
deployment_environment: staging # deployment_environment: staging
secrets: inherit # secrets: inherit
close-pull-request-job: close-pull-request-job:
if: github.event_name == 'pull_request' && github.event.action == 'closed' if: github.event_name == 'pull_request' && github.event.action == 'closed'

View File

@@ -418,20 +418,24 @@ const Logbook: React.FC<unknown> = () => {
</> </>
)} )}
</Grid> </Grid>
<LogbookEntryForm {state.isFormOpen && (
entryId={state.selectedEntryId} <LogbookEntryForm
isDrawerOpen={state.isFormOpen} entryId={state.selectedEntryId}
mode={state.formMode} isDrawerOpen={state.isFormOpen}
onOpenClose={(mode) => onOpenCloseEntryForm(mode)} mode={state.formMode}
/> onOpenClose={(mode) => onOpenCloseEntryForm(mode)}
<ConfirmationDialog />
contentText="Are you sure you want to delete the logbook entry?" )}
isLoading={state.isConfirmDialogLoading} {state.isConfirmDialogOpen && (
isOpen={state.isConfirmDialogOpen} <ConfirmationDialog
onCancel={onConfirmationDialogCancel} contentText="Are you sure you want to delete the logbook entry?"
onConfirm={onConfirmationDialogConfirm} isLoading={state.isConfirmDialogLoading}
title="Confirm Delete" isOpen={state.isConfirmDialogOpen}
/> onCancel={onConfirmationDialogCancel}
onConfirm={onConfirmationDialogConfirm}
title="Confirm Delete"
/>
)}
</Box> </Box>
); );
}; };

View File

@@ -1,23 +1,17 @@
resource "azurerm_storage_account" "storage_account_dev" { resource "azurerm_storage_account" "storage_account" {
name = "${var.STORAGE_ACCOUNT_NAME}dev" name = "${var.STORAGE_ACCOUNT_NAME}"
resource_group_name = data.azurerm_resource_group.resource_group.name resource_group_name = data.azurerm_resource_group.resource_group.name
location = data.azurerm_resource_group.resource_group.location location = data.azurerm_resource_group.resource_group.location
account_tier = "Standard" account_tier = "Standard"
account_replication_type = "LRS" account_replication_type = "LRS"
} }
resource "azurerm_storage_account" "storage_account_staging" { resource "azurerm_storage_table" "logbook_storage_table" {
name = "${var.STORAGE_ACCOUNT_NAME}staging" name = "Logbook"
resource_group_name = data.azurerm_resource_group.resource_group.name storage_account_name = azurerm_storage_account.storage_account.name
location = data.azurerm_resource_group.resource_group.location
account_tier = "Standard"
account_replication_type = "LRS"
} }
resource "azurerm_storage_account" "storage_account_prod" { resource "azurerm_storage_table" "pilots_storage_table" {
name = "${var.STORAGE_ACCOUNT_NAME}prod" name = "Pilots"
resource_group_name = data.azurerm_resource_group.resource_group.name storage_account_name = azurerm_storage_account.storage_account.name
location = data.azurerm_resource_group.resource_group.location
account_tier = "Standard"
account_replication_type = "LRS"
} }