AI SummaryA Cursor rules prompt that standardizes the DataHub development workflow by directing developers to use a centralized shell script (datahub-dev.sh) for all build, test, and flag operations. This benefits DataHub contributors by reducing setup friction and ensuring consistent development practices across the team.
Install
# Download to your project root curl -o .cursorrules "https://raw.githubusercontent.com/datahub-project/datahub/master/.cursor/rules/datahub-dev.mdc"
Description
DataHub dev workflow — use scripts/dev/datahub-dev.sh for all build/test/flag operations
`datahub-dev` CLI Tool
A stdlib-only Python CLI for agent-driven development. No venv needed — runs with system python3. Always use the shell wrapper as the entry point: `bash scripts/dev/datahub-dev.sh <command> ` Run scripts/dev/datahub-dev.sh --help to see all available subcommands (start, status, wait, rebuild, test, flag list/get, env, sync-flags, reset, nuke).
End-to-End Workflow
• Start: scripts/dev/datahub-dev.sh start • Code: Make changes to Java/Python/frontend code • Rebuild: scripts/dev/datahub-dev.sh rebuild --wait • Test: scripts/dev/datahub-dev.sh test <test-path> • Iterate: Repeat steps 2–4 Worktree note: All Gradle commands inside the tool already pass -x generateGitPropertiesGlobal to avoid git-related failures in worktrees.
Module-to-Container Mapping
| Source directory | Container | | --------------------------------- | --------------------------------------------- | | metadata-service/ | datahub-gms | | datahub-graphql-core/ | datahub-gms | | metadata-io/ | datahub-gms | | datahub-frontend/ | datahub-frontend-react | | metadata-jobs/mce-consumer-job/ | datahub-mce-consumer | | metadata-jobs/mae-consumer-job/ | datahub-mae-consumer | | metadata-models/ | All (triggers full rebuild + code generation) |
Feature Flag Lifecycle
All flag changes require a container restart. Use env set + env restart: `bash scripts/dev/datahub-dev.sh env set SHOW_BROWSE_V2=true scripts/dev/datahub-dev.sh env restart ` flag list and flag get are read-only inspection tools — they show the current live values from the running server but do not change anything. The flag manifest at scripts/generated/flag-classification.json is auto-generated (gitignored). Run scripts/dev/datahub-dev.sh sync-flags after adding fields to FeatureFlags.java or after a fresh clone.
Quality Score
Good
87/100
Trust & Transparency
Open Source — Apache-2.0
Source code publicly auditable
Verified Open Source
Hosted on GitHub — publicly auditable
Actively Maintained
Last commit Yesterday
11.6k stars — Strong Community
3.4k forks