Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
aa6964d
Set production environment
even-wei Nov 27, 2023
f7e1d3d
Generate external raw jaffle shop data
wcchang1115 Jan 23, 2024
d9232d9
Merge pull request #5 from DataRecce/feature/rc-118-generate-jaffle-s…
Feb 22, 2024
3a69cce
Add tests to customer_order_pattern and customer_segments
even-wei Feb 27, 2024
fb23c05
Merge pull request #6 from DataRecce/chore/add-tests-to-order-pattern…
Feb 27, 2024
ea62d5d
Adjust threshold of value segment
even-wei Mar 6, 2024
b9ff462
[Feature] DRC-307 Add CI workflow by Recce Run
kentwelcome Mar 28, 2024
fdd75a4
[Patch] Add pr write permission for github workflow
kentwelcome Mar 28, 2024
f42d47e
Merge pull request #8 from DataRecce/feature/drc-307-prepare-github-a…
kentwelcome Mar 28, 2024
7cdab51
Update recce ci to use official recce
wcchang1115 Apr 9, 2024
f34c241
Merge pull request #9 from DataRecce/chore/update-recce-ci-workflow
wcchang1115 Apr 9, 2024
478c3a3
[Infra] DRC-359 Add preset checks for Recce CI
kentwelcome Apr 12, 2024
e6669c5
[Fix] Add packages.yml for recce-ci
kentwelcome Apr 12, 2024
7b7b17d
[Fix] Fix action running issue
kentwelcome Apr 15, 2024
9250ad7
Merge pull request #11 from DataRecce/feature/drc-359-demo-setup-the-…
kentwelcome Apr 15, 2024
66252d7
[Feature] DRC-389 Setup recce ci with summary command
kentwelcome Apr 26, 2024
ed3f380
[Fix] typo
kentwelcome Apr 26, 2024
5dd9083
Merge pull request #12 from DataRecce/feature/drc-389-setup-recce-sum…
kentwelcome Apr 26, 2024
197b0c5
[Fix] Update recce summary output summary
kentwelcome Apr 26, 2024
7f3f658
[Fix] Update recce summary output message
kentwelcome Apr 26, 2024
9be23ab
[Feature] Update Recce CI workflow script
kentwelcome May 8, 2024
548ddce
[Fix] Change to use latest nightly build
kentwelcome May 8, 2024
ba7047c
[Fix] message wording
kentwelcome May 8, 2024
0ce3c13
Merge pull request #13 from DataRecce/feature/drc-396-document-provid…
kentwelcome May 8, 2024
3d9cdc1
Update recce_ci.yml with latest nightly build of recce
kentwelcome May 13, 2024
62c8a54
Add packages.yml
popcornylu May 28, 2024
7a62abd
Merge pull request #15 from DataRecce/chore/drc-463-add-required-paca…
popcornylu May 28, 2024
d603f1a
Fix CLV column type to bigint
popcornylu May 30, 2024
17dcbc9
Merge pull request #16 from DataRecce/chore/fix-the-clv-column-type
popcornylu May 30, 2024
39558ad
Add recce cloud compatible output
popcornylu Jun 5, 2024
8b9f22f
Add recce cloud compatible output
popcornylu Jun 5, 2024
acdec80
Merge pull request #18 from DataRecce/chore/add-the-workflow-for-recc…
popcornylu Jun 5, 2024
41649f5
Add recce cloud compatible output
popcornylu Jun 5, 2024
37646e0
use the comment tag
popcornylu Jun 5, 2024
d11b8cc
Refine the workflow file
popcornylu Jun 5, 2024
2915805
Merge pull request #19 from DataRecce/chore/add-the-workflow-for-recc…
popcornylu Jun 5, 2024
bf25087
[Infra] Add dev container for Recce Server
kentwelcome Jun 6, 2024
894a4ff
[Feature] Disable the dbt task run when folder open
kentwelcome Jun 6, 2024
a7b5dd9
Merge pull request #20 from DataRecce/infra/devcontainer-for-recce-se…
kentwelcome Jun 6, 2024
df373b5
[Fix] Upload duckdb file with recce state file
kentwelcome Jun 6, 2024
69bf9e8
prepare duckdb file
kentwelcome Jun 6, 2024
4cc8e66
Merge pull request #21 from DataRecce/fix/upload-duckdb-file-with-rec…
kentwelcome Jun 6, 2024
cffee59
Update recce ci workflow
wcchang1115 Jun 17, 2024
09b7ea6
Update devcontainer config
wcchang1115 Jun 18, 2024
361e68f
Refine dbt packages
wcchang1115 Jun 19, 2024
55915f5
Update dbt duckdb version
wcchang1115 Jun 19, 2024
a35d3f4
Merge pull request #22 from DataRecce/feature/drc-506-update-the-jaff…
wcchang1115 Jun 19, 2024
ec67f0e
Add script to download duckdb file
wcchang1115 Jun 20, 2024
79d82b5
Merge pull request #23 from DataRecce/feature/drc-506-fix-download-du…
wcchang1115 Jun 20, 2024
d2761db
[update] add password when invoking recce cloud commands
kentwelcome Jun 28, 2024
3780457
fix typo
kentwelcome Jul 2, 2024
11c0878
Merge pull request #25 from DataRecce/feature/drc-521-update-recce-cl…
kentwelcome Jul 2, 2024
fccb117
Update recce preset checks
wcchang1115 Jun 26, 2024
71e140e
Merge pull request #26 from DataRecce/chore/update-default-checks
wcchang1115 Jul 4, 2024
11a3804
[Infra] Update devcontainer.json for recce
kentwelcome Sep 20, 2024
cbc6356
Merge pull request #32 from DataRecce/infra/modify-devcontainer-for-r…
kentwelcome Sep 20, 2024
959eb05
Update CI config
Oct 9, 2024
45031a7
Add GH_TOKEN back for GitHub CLI
Oct 9, 2024
f1c6182
Merge pull request #33 from DataRecce/feature/drc-691-update-run-recc…
Oct 9, 2024
d22ff3b
Merge pull request #34 from dbt-labs/duckdb
Oct 21, 2024
ada4f32
Install dependency based on project config
wcchang1115 Oct 24, 2024
9d18610
Copy requirements file
wcchang1115 Oct 24, 2024
e525ec3
Merge pull request #36 from DataRecce/feature/drc-828-fail-to-open-re…
wcchang1115 Oct 24, 2024
f90a2f5
[Infra] Update GitHub Action for PR
kentwelcome Nov 5, 2024
bbfa2cc
Merge pull request #37 from DataRecce/feature/drc-869-alert-users-if-…
kentwelcome Nov 5, 2024
0cf8769
[Fix] Update PR action remove specific tag when check PR up-to-date
kentwelcome Nov 5, 2024
9c370d3
[Refine] Fix PR Action
kentwelcome Nov 5, 2024
d1ffc6c
[Refine] PR Action
kentwelcome Nov 5, 2024
cce187f
[fix] typo
kentwelcome Nov 5, 2024
8d75fcf
[fix] typo
kentwelcome Nov 5, 2024
3cf44bc
Make the base update at lease per week basis
popcornylu Feb 11, 2025
f6e36d7
Merge pull request #45 from DataRecce/feature/drc-1078-demo-site-reru…
popcornylu Feb 11, 2025
e18420c
Fix CLV metric reliability for customer segmentation
ijac13 Feb 2, 2026
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
6 changes: 6 additions & 0 deletions .devcontainer/recce/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:3.11

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir recce
12 changes: 12 additions & 0 deletions .devcontainer/recce/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Recce CodeSpace",
"build": {
"dockerfile": "Dockerfile",
"context": "../../"
},
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"forwardPorts": [8000],
"postStartCommand": "./.devcontainer/script/post_start.sh"
}
13 changes: 13 additions & 0 deletions .devcontainer/script/post_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /bin/bash

# Install dbt dependencies
dbt deps

# Download duckdb file
gh repo set-default DataRecce/jaffle_shop_duckdb
branch=$(git branch --show-current)
run_id=$(gh run list --workflow "Jaffle Shop Recce CI" --branch $branch --status success --limit 1 --json databaseId --jq '.[0].databaseId')
gh run download $run_id -n duckdb

# Exec Recce
recce server --cloud --review
44 changes: 44 additions & 0 deletions .github/workflows/dbt_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: DBT Base Environment

on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10.x"

- name: Install dependencies
run: |
pip install -r requirements.txt

- name: Run DBT
run: |
dbt deps
dbt seed --target ${{ env.DBT_BASE_TARGET }}
dbt run --target ${{ env.DBT_BASE_TARGET }}
dbt docs generate --target ${{ env.DBT_BASE_TARGET }}
env:
DBT_BASE_TARGET: "prod"

- uses: actions/upload-artifact@v4
with:
name: duckdb
path: jaffle_shop.duckdb

- name: Upload DBT Artifacts
uses: actions/upload-artifact@v4
with:
name: target
path: target/
106 changes: 106 additions & 0 deletions .github/workflows/recce_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Jaffle Shop Recce CI

on:
pull_request:
branches: [main]

jobs:
check-pull-request:
name: Check pull request by Recce CI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Merge Base Branch into PR
uses: cycleapple/PR-Update@v1.0.2
with:
baseBranch: ${{ github.event.pull_request.base.ref }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10.x"

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install recce-nightly

- name: Prepare dbt Base environment
run: |
gh repo set-default ${{ github.repository }}
base_branch=${{ github.base_ref }}
run_id=$(gh run list --workflow ${WORKFLOW_BASE} --branch ${base_branch} --status success --limit 1 --json databaseId --jq '.[0].databaseId')
echo "Download artifacts from run $run_id"
gh run download ${run_id} -n target -D target-base
gh run download ${run_id} -n duckdb
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_BASE: ".github/workflows/dbt_base.yml"

- name: Prepare dbt Current environment
run: |
git checkout ${{ github.event.pull_request.head.sha }}
dbt deps
dbt seed --target ${{ env.DBT_CURRENT_TARGET}}
dbt run --target ${{ env.DBT_CURRENT_TARGET}}
dbt docs generate --target ${{ env.DBT_CURRENT_TARGET}}
env:
DBT_CURRENT_TARGET: "dev"

- name: Run Recce CI
run: |
recce run --cloud
env:
GITHUB_TOKEN: ${{ secrets.RECCE_CLOUD_TOKEN }}
RECCE_STATE_PASSWORD: ${{ vars.RECCE_STATE_PASSWORD}}

- name: Upload DBT Artifacts
uses: actions/upload-artifact@v4
with:
name: target
path: target/

- name: Upload Recce State File
uses: actions/upload-artifact@v4
id: recce-artifact-uploader
with:
name: duckdb
path: |
jaffle_shop.duckdb

- name: Prepare Recce Summary
id: recce-summary
run: |
recce summary --cloud --cloud-token ${{ secrets.RECCE_CLOUD_TOKEN }} > recce_summary.md
cat recce_summary.md >> $GITHUB_STEP_SUMMARY
echo '${{ env.NEXT_STEP_MESSAGE }}' >> recce_summary.md

# Handle the case when the recce summary is too long to be displayed in the GitHub PR comment
if [[ `wc -c recce_summary.md | awk '{print $1}'` -ge '65535' ]]; then
echo '# Recce Summary
The recce summary is too long to be displayed in the GitHub PR comment.
Please check the summary detail in the [Job Summary](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}) page.
${{ env.NEXT_STEP_MESSAGE }}' > recce_summary.md
fi

env:
ARTIFACT_URL: ${{ steps.recce-artifact-uploader.outputs.artifact-url }}
RECCE_STATE_PASSWORD: ${{ vars.RECCE_STATE_PASSWORD}}
NEXT_STEP_MESSAGE: |
### How to check the recce result
```bash
# Launch the recce server based on the state file
recce server --review --cloud --password ${{ vars.RECCE_STATE_PASSWORD}}

# Open the recce server http://localhost:8000 by your browser
```

- name: Comment on pull request
uses: thollander/actions-comment-pull-request@v2
with:
filePath: recce_summary.md
comment_tag: recce
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"problemMatcher": [],

// Try start the task on folder open
"runOptions": {
"runOn": "folderOpen"
},
// "runOptions": {
// "runOn": "folderOpen"
// },
// Create the tasks in a terminal group
"presentation": {
"panel": "shared",
Expand Down
4 changes: 0 additions & 4 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ clean-targets:

require-dbt-version: [">=1.0.0", "<2.0.0"]

seeds:
+docs:
node_color: '#cd7f32'

models:
jaffle_shop:
materialized: table
Expand Down
Loading