Skip to content

Commit

Permalink
Pull buckets into env/configuration, expand edm connector testing (#1108
Browse files Browse the repository at this point in the history
)

* expand recipes test coverage

* move buckets to configuration.py

* downstream effects of moving buckets

* expand publish testing, add legacy_upload

* clean up templatedb publishing interaction

* add dev flags to build, library, ingest workflows

* add tabulate to build image reqs
  • Loading branch information
fvankrieken authored Sep 6, 2024
1 parent 342ec15 commit c3e5881
Show file tree
Hide file tree
Showing 45 changed files with 576 additions and 240 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ on:
description: "An optional note about this build"
type: string
required: false
dev_bucket:
description: "dev bucket to use in place of recipes/publishing. If name of bucket is 'de-dev-a' simply put 'a'"
type: string
required: false
workflow_call:
inputs:
dataset_name:
Expand Down Expand Up @@ -107,6 +111,7 @@ jobs:
plan_command: ${{ needs.health_check.outputs.plan_command }}
logging_level: ${{ inputs.logging_level }}
build_note: ${{ inputs.build_note }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
cbbr:
needs: health_check
if: inputs.dataset_name == 'cbbr' || inputs.dataset_name == 'all'
Expand All @@ -119,6 +124,7 @@ jobs:
plan_command: ${{ needs.health_check.outputs.plan_command }}
logging_level: ${{ inputs.logging_level }}
build_note: ${{ inputs.build_note }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
checkbook:
needs: health_check
if: inputs.dataset_name == 'checkbook' || inputs.dataset_name == 'all'
Expand All @@ -127,6 +133,7 @@ jobs:
with:
image_tag: ${{ needs.health_check.outputs.tag }}
build_name: ${{ needs.health_check.outputs.build_name }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
colp:
needs: health_check
if: inputs.dataset_name == 'colp' || inputs.dataset_name == 'all'
Expand All @@ -137,6 +144,7 @@ jobs:
build_name: ${{ needs.health_check.outputs.build_name }}
recipe_file: ${{ inputs.recipe_file }}
plan_command: ${{ needs.health_check.outputs.plan_command }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
cpdb:
needs: health_check
if: inputs.dataset_name == 'cpdb' || inputs.dataset_name == 'all'
Expand All @@ -147,6 +155,7 @@ jobs:
build_name: ${{ needs.health_check.outputs.build_name }}
recipe_file: ${{ inputs.recipe_file }}
plan_command: ${{ needs.health_check.outputs.plan_command }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
developments:
needs: health_check
if: inputs.dataset_name == 'developments' || inputs.dataset_name == 'all'
Expand All @@ -157,6 +166,7 @@ jobs:
build_name: ${{ needs.health_check.outputs.build_name }}
recipe_file: ${{ inputs.recipe_file }}
plan_command: ${{ needs.health_check.outputs.plan_command }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
facilities:
needs: health_check
if: inputs.dataset_name == 'facilities' || inputs.dataset_name == 'all'
Expand All @@ -167,6 +177,7 @@ jobs:
build_name: ${{ needs.health_check.outputs.build_name }}
recipe_file: ${{ inputs.recipe_file }}
plan_command: ${{ needs.health_check.outputs.plan_command }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
factfinder:
needs: health_check
if: inputs.dataset_name == 'factfinder'
Expand All @@ -176,6 +187,7 @@ jobs:
image_tag: ${{ needs.health_check.outputs.tag }}
build_name: ${{ needs.health_check.outputs.build_name }}
recipe_file: ${{ inputs.recipe_file }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
green_fast_track:
needs: health_check
if: inputs.dataset_name == 'green_fast_track' || inputs.dataset_name == 'all'
Expand All @@ -186,6 +198,7 @@ jobs:
recipe_file: ${{ inputs.recipe_file }}
build_name: ${{ needs.health_check.outputs.build_name }}
plan_command: ${{ needs.health_check.outputs.plan_command }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
knownprojects:
needs: health_check
if: inputs.dataset_name == 'knownprojects' || inputs.dataset_name == 'all'
Expand All @@ -194,6 +207,7 @@ jobs:
with:
image_tag: ${{ needs.health_check.outputs.tag }}
build_name: ${{ needs.health_check.outputs.build_name }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
pluto:
needs: health_check
if: inputs.dataset_name == 'pluto' || inputs.dataset_name == 'all'
Expand All @@ -204,6 +218,7 @@ jobs:
build_name: ${{ needs.health_check.outputs.build_name }}
recipe_file: ${{ inputs.recipe_file }}
plan_command: ${{ needs.health_check.outputs.plan_command }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
ztl:
needs: health_check
if: inputs.dataset_name == 'ztl' || inputs.dataset_name == 'all'
Expand All @@ -214,3 +229,4 @@ jobs:
build_name: ${{ needs.health_check.outputs.build_name }}
recipe_file: ${{ inputs.recipe_file }}
plan_command: ${{ needs.health_check.outputs.plan_command }}
dev_bucket: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || '' }}
6 changes: 6 additions & 0 deletions .github/workflows/cbbr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
default: false

jobs:
build:
Expand All @@ -35,6 +38,9 @@ jobs:
env:
BUILD_ENGINE_DB: db-cbbr
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}

steps:
- name: Checkout
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/checkbook_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
build_name:
type: string
required: true
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -19,6 +22,9 @@ jobs:
env:
BUILD_ENGINE_DB: db-checkbook
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
defaults:
run:
shell: bash
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/colp_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -28,6 +31,9 @@ jobs:
env:
BUILD_ENGINE_DB: db-colp
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
services:
postgis:
image: postgis/postgis:15-3.3-alpine
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cpdb_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -29,6 +32,9 @@ jobs:
env:
BUILD_ENGINE_DB: db-cpdb
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/data_library_single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
type: boolean
required: true
default: false
dev_bucket:
description: "dev bucket to use in place of recipes. If name of bucket is 'de-dev-a' simply put 'a'"
type: string
required: false

jobs:
dataloading:
Expand All @@ -31,7 +35,9 @@ jobs:
run:
shell: bash
env:
AWS_S3_BUCKET: edm-recipes
BUILD_NAME: ${{ github.head_ref || github.ref_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || 'edm-recipes' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/developments_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -26,9 +29,12 @@ jobs:
working-directory: products/developments
container:
image: nycplanning/build-geosupport:${{ inputs.image_tag || 'latest' }}
env:
BUILD_ENGINE_DB: db-devdb
BUILD_NAME: ${{ inputs.build_name }}
env:
BUILD_ENGINE_DB: db-devdb
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/facilities_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -26,9 +29,12 @@ jobs:
working-directory: products/facilities
container:
image: nycplanning/build-geosupport:${{ inputs.image_tag || 'latest' }}
env:
BUILD_ENGINE_DB: db-facilities
BUILD_NAME: ${{ inputs.build_name }}
env:
BUILD_ENGINE_DB: db-facilities
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/factfinder_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
recipe_file:
type: string
required: true
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -25,6 +28,9 @@ jobs:
image: nycplanning/build-base:${{ inputs.image_tag || 'latest' }}
env:
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/green_fast_track_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -28,6 +31,9 @@ jobs:
env:
BUILD_ENGINE_DB: db-green-fast-track
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ingest_single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ on:
type: boolean
required: true
default: false
dev_bucket:
description: "dev bucket to use in place of recipes. If name of bucket is 'de-dev-a' simply put 'a'"
type: string
required: false

jobs:
dataloading:
Expand All @@ -33,6 +37,11 @@ jobs:
defaults:
run:
shell: bash
env:
BUILD_NAME: ${{ github.head_ref || github.ref_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket && format('de-dev-{0}', inputs.dev_bucket) || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/knownprojects_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
build_name:
type: string
required: true
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -23,6 +26,9 @@ jobs:
env:
BUILD_ENGINE_DB: kpdb
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pluto_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
required: false

jobs:
build:
Expand All @@ -32,6 +35,9 @@ jobs:
env:
BUILD_ENGINE_DB: db-pluto
BUILD_NAME: ${{ inputs.build_name }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/template_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ on:
plan_command:
type: string
default: recipe
dev_bucket:
type: string
required: false

env:
TOY_SECRET_GITHUB: ${{ secrets.TOY_SECRET }}
BUILD_ENGINE_DB: db-template
BUILD_NAME: ${{ inputs.build_name || github.head_ref || github.ref_name }}
LOGGING_LEVEL: ${{ inputs.logging_level }}
RECIPES_BUCKET: ${{ inputs.dev_bucket || 'edm-recipes' }}
PUBLISHING_BUCKET: ${{ inputs.dev_bucket || 'edm-publishing' }}
DEV_FLAG: ${{ inputs.dev_bucket && 'true' || 'false' }}

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/template_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ env:
TOY_SECRET_GITHUB: ${{ secrets.TOY_SECRET }}
BUILD_ENGINE_DB: db-template
BUILD_NAME: ${{ inputs.build_name || github.head_ref || github.ref_name }}
RECIPES_BUCKET: edm-recipes
PUBLISHING_BUCKET: edm-publishing

jobs:
unit_tests:
Expand Down
Loading

0 comments on commit c3e5881

Please sign in to comment.