From 543ca9e775012d0d14a3c42681ca4b82ebd5f21a Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:31:31 -0500 Subject: [PATCH 1/9] Add evidence build to CI --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1783ba..4c1077d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,10 @@ jobs: uses: actions/setup-python@v4.7.0 with: python-version: "3.10.x" + - name: Setup Node + uses: actions/setup-node@v3.8.1 + with: + node-version: 18.x - name: Install requirements run: python3 -m pip install -r requirements.txt - name: Run EL @@ -21,3 +25,5 @@ jobs: run: dbt deps && dbt build - name: Lint SQL run: sqlfluff lint models --format github-annotation-native + - name: Build Evidence + run: npm --filter ./reports run build:strict From 9de463c2772e5d53b64b4e8e387d0e5e320a62c0 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:36:01 -0500 Subject: [PATCH 2/9] Try to fix npm build syntax --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c1077d..3ecf5dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,4 +26,4 @@ jobs: - name: Lint SQL run: sqlfluff lint models --format github-annotation-native - name: Build Evidence - run: npm --filter ./reports run build:strict + run: npm run build:strict --prefix ./reports From 79feee881d547e8586d382493ea51f7827af5fb2 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:39:37 -0500 Subject: [PATCH 3/9] Install npm deps before running CI build --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ecf5dc..ec8d3bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,10 @@ jobs: uses: actions/setup-node@v3.8.1 with: node-version: 18.x - - name: Install requirements + - name: Install Python requirements run: python3 -m pip install -r requirements.txt + - name: Install Node requirements + run: npm install --prefix ./reports - name: Run EL run: python3 el.py -lc - name: Run T From adb0c3ac5ff5b764648632f3906276e6e57ce9d7 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:47:59 -0500 Subject: [PATCH 4/9] Add EVIDENCE_DATABASE env var to CI --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec8d3bc..8c8efd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,5 +27,7 @@ jobs: run: dbt deps && dbt build - name: Lint SQL run: sqlfluff lint models --format github-annotation-native - - name: Build Evidence + - name: Build Evidence + env: + EVIDENCE_DATABASE: 'duckdb' run: npm run build:strict --prefix ./reports From f1a608e79de4895d50deb8bded187ab739d85028 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:03:48 -0500 Subject: [PATCH 5/9] Add duckdb file env var to evidence build step in CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c8efd3..c36e18a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,4 +30,5 @@ jobs: - name: Build Evidence env: EVIDENCE_DATABASE: 'duckdb' + EVIDENCE_DUCKDB_FILENAME: 'octocatalog.db' run: npm run build:strict --prefix ./reports From 8355afdbbe601fb238f11be223dd3f8076ad1e4c Mon Sep 17 00:00:00 2001 From: gwen windflower Date: Wed, 27 Sep 2023 17:13:55 -0500 Subject: [PATCH 6/9] Pin duckdb to 0.8.1 for Evidence and MD compatibility --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 067d83a..ee049ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ black~=23.9.1 dbt-metricflow[duckdb]~=0.3.0 +duckdb==0.8.1 halo~=0.0.31 isort~=5.12.0 pre-commit~=3.4.0 From d084a8385bad20ac896e179d7348468efd309f12 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:34:11 -0500 Subject: [PATCH 7/9] Try pathing the duckdb filename for Evidence CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c36e18a..ee08a61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,5 +30,5 @@ jobs: - name: Build Evidence env: EVIDENCE_DATABASE: 'duckdb' - EVIDENCE_DUCKDB_FILENAME: 'octocatalog.db' + EVIDENCE_DUCKDB_FILENAME: './reports/octocatalog.db' run: npm run build:strict --prefix ./reports From 000945389e34bc953dc3b672bfcc8aef8765a7f0 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:40:13 -0500 Subject: [PATCH 8/9] Pathing didn't work REVERT --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee08a61..c36e18a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,5 +30,5 @@ jobs: - name: Build Evidence env: EVIDENCE_DATABASE: 'duckdb' - EVIDENCE_DUCKDB_FILENAME: './reports/octocatalog.db' + EVIDENCE_DUCKDB_FILENAME: 'octocatalog.db' run: npm run build:strict --prefix ./reports From 05da585ade79a9948f3c0e7080b660fcc9309e09 Mon Sep 17 00:00:00 2001 From: winnie <91998347+gwenwindflower@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:28:50 -0500 Subject: [PATCH 9/9] Downgrade from build strict for empty data potential --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c36e18a..6c1dce3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,4 +31,4 @@ jobs: env: EVIDENCE_DATABASE: 'duckdb' EVIDENCE_DUCKDB_FILENAME: 'octocatalog.db' - run: npm run build:strict --prefix ./reports + run: npm run build --prefix ./reports