Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] Update the jaffle shop to use the cloud mode #22

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:3.11

RUN pip install dbt-duckdb==1.5.0 duckdb==0.7.1 recce
29 changes: 9 additions & 20 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
{
"name": "Recce Cloud",
"image": "infuseai/dev-container-base-image:latest",
"containerEnv": {
"RECCE_CI_WORKFLOW_NAME": ".github/workflows/recce_ci.yml", // Path to the Recce CI workflow file
"DEPENDENCIES_FILE": "requirements.txt", // Path to the python dependencies file
"POST_INSTALL_DEPENDENCIES_COMMAND": "pip install gradio", // Command to install python dependencies
"PRE_LAUNCH_RECCE_SERVER_COMMAND": "cp .recce/recce-state-file/jaffle_shop.duckdb ."
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"forwardPorts": [ 8000 ],
"portsAttributes": {
"8000": {
"label": "Recce Server",
"onAutoForward": "openBrowser"
}
"postCreateCommand": {
"dbt": "dbt deps",
"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"
},
"postStartCommand": "post_start_command"
}
"postStartCommand": "recce server --cloud --review"
}
15 changes: 4 additions & 11 deletions .github/workflows/recce_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Run Recce CI
run: |
recce run --github-pull-request-url ${{ github.event.pull_request.html_url }}
recce run --cloud --cloud-token ${{ secrets.RECCE_CLOUD_TOKEN }}

- name: Upload DBT Artifacts
uses: actions/upload-artifact@v4
Expand All @@ -56,15 +56,14 @@ jobs:
uses: actions/upload-artifact@v4
id: recce-artifact-uploader
with:
name: recce-state-file
name: duckdb
path: |
recce_state.json
jaffle_shop.duckdb

- name: Prepare Recce Summary
id: recce-summary
run: |
recce summary recce_state.json > recce_summary.md
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

Expand All @@ -79,16 +78,10 @@ jobs:
env:
ARTIFACT_URL: ${{ steps.recce-artifact-uploader.outputs.artifact-url }}
NEXT_STEP_MESSAGE: |
## Next Steps
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.

### How to check the recce result
```bash
# Unzip the downloaded artifact file
tar -xf recce-state-file.zip

# Launch the recce server based on the state file
recce server --review recce_state.json
recce server --review --cloud

# Open the recce server http://localhost:8000 by your browser
```
Expand Down
5 changes: 2 additions & 3 deletions packages.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
packages:
- package: data-mie/dbt_profiler
version: 0.8.1
- package: dbt-labs/dbt_project_evaluator
version: 0.6.2
- package: dbt-labs/dbt_utils
version: 0.9.6
- package: dbt-labs/audit_helper
version: 0.11.0

Loading