diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..2c4ae081d --- /dev/null +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7d1fc17ad..768246065 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" -} \ No newline at end of file + "postStartCommand": "recce server --cloud --review" +} diff --git a/.github/workflows/recce_ci.yml b/.github/workflows/recce_ci.yml index 0b8fd21bf..adce7d66a 100644 --- a/.github/workflows/recce_ci.yml +++ b/.github/workflows/recce_ci.yml @@ -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 @@ -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 @@ -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 ``` diff --git a/packages.yml b/packages.yml index 054b39468..1de1e1133 100644 --- a/packages.yml +++ b/packages.yml @@ -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 -