Skip to content

Commit a35d3f4

Browse files
authored
Merge pull request #22 from DataRecce/feature/drc-506-update-the-jaffle-shop-to-use-the-cloud-mode
[Chore] Update the jaffle shop to use the cloud mode
2 parents 4cc8e66 + 55915f5 commit a35d3f4

File tree

4 files changed

+18
-34
lines changed

4 files changed

+18
-34
lines changed

.devcontainer/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mcr.microsoft.com/vscode/devcontainers/python:3.11
2+
3+
RUN pip install dbt-duckdb==1.5.0 duckdb==0.7.1 recce

.devcontainer/devcontainer.json

+9-20
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
{
22
"name": "Recce Cloud",
3-
"image": "infuseai/dev-container-base-image:latest",
4-
"containerEnv": {
5-
"RECCE_CI_WORKFLOW_NAME": ".github/workflows/recce_ci.yml", // Path to the Recce CI workflow file
6-
"DEPENDENCIES_FILE": "requirements.txt", // Path to the python dependencies file
7-
"POST_INSTALL_DEPENDENCIES_COMMAND": "pip install gradio", // Command to install python dependencies
8-
"PRE_LAUNCH_RECCE_SERVER_COMMAND": "cp .recce/recce-state-file/jaffle_shop.duckdb ."
3+
"build": {
4+
"dockerfile": "Dockerfile"
95
},
10-
"customizations": {
11-
"vscode": {
12-
"settings": {
13-
"terminal.integrated.shell.linux": "/bin/bash"
14-
}
15-
}
6+
"features": {
7+
"ghcr.io/devcontainers/features/github-cli:1": {}
168
},
17-
"forwardPorts": [ 8000 ],
18-
"portsAttributes": {
19-
"8000": {
20-
"label": "Recce Server",
21-
"onAutoForward": "openBrowser"
22-
}
9+
"postCreateCommand": {
10+
"dbt": "dbt deps",
11+
"artifact": "gh repo set-default DataRecce/jaffle_shop_duckdb && run_id=$(gh run list --workflow \"Jaffle Shop Recce CI\" --status success --limit 1 --json databaseId --jq '.[0].databaseId') && gh run download $run_id -n duckdb"
2312
},
24-
"postStartCommand": "post_start_command"
25-
}
13+
"postStartCommand": "recce server --cloud --review"
14+
}

.github/workflows/recce_ci.yml

+4-11
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Run Recce CI
4646
run: |
47-
recce run --github-pull-request-url ${{ github.event.pull_request.html_url }}
47+
recce run --cloud --cloud-token ${{ secrets.RECCE_CLOUD_TOKEN }}
4848
4949
- name: Upload DBT Artifacts
5050
uses: actions/upload-artifact@v4
@@ -56,15 +56,14 @@ jobs:
5656
uses: actions/upload-artifact@v4
5757
id: recce-artifact-uploader
5858
with:
59-
name: recce-state-file
59+
name: duckdb
6060
path: |
61-
recce_state.json
6261
jaffle_shop.duckdb
6362
6463
- name: Prepare Recce Summary
6564
id: recce-summary
6665
run: |
67-
recce summary recce_state.json > recce_summary.md
66+
recce summary --cloud --cloud-token ${{ secrets.RECCE_CLOUD_TOKEN }} > recce_summary.md
6867
cat recce_summary.md >> $GITHUB_STEP_SUMMARY
6968
echo '${{ env.NEXT_STEP_MESSAGE }}' >> recce_summary.md
7069
@@ -79,16 +78,10 @@ jobs:
7978
env:
8079
ARTIFACT_URL: ${{ steps.recce-artifact-uploader.outputs.artifact-url }}
8180
NEXT_STEP_MESSAGE: |
82-
## Next Steps
83-
If you want to check more detail inforamtion about the recce result, please download the [artifact](${{ steps.recce-artifact-uploader.outputs.artifact-url }}) file and open it by [Recce](https://pypi.org/project/recce/) CLI.
84-
8581
### How to check the recce result
8682
```bash
87-
# Unzip the downloaded artifact file
88-
tar -xf recce-state-file.zip
89-
9083
# Launch the recce server based on the state file
91-
recce server --review recce_state.json
84+
recce server --review --cloud
9285
9386
# Open the recce server http://localhost:8000 by your browser
9487
```

packages.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
packages:
22
- package: data-mie/dbt_profiler
33
version: 0.8.1
4-
- package: dbt-labs/dbt_project_evaluator
5-
version: 0.6.2
4+
- package: dbt-labs/dbt_utils
5+
version: 0.9.6
66
- package: dbt-labs/audit_helper
77
version: 0.11.0
8-

0 commit comments

Comments
 (0)