MonkeyCanCode opened a new pull request, #2027: URL: https://github.com/apache/polaris/pull/2027
This PR brings in a root-level Makefile to simplify and centralize how we set up our development environment and run common build tasks for Polaris. **The Problem I Noticed:** Right now, getting set up or performing routine builds often means jumping between different documentation pages to find various tool installations (like `helm`, `kubectl`, `jq`, `jenv`, `git`, `docker`) and then copying lengthy `gradlew` commands. While it makes sense to have granular instructions for deep dives or specific contributions, having a single, straightforward entry point for common tasks could really smooth out onboarding for new folks and make our development flow much more efficient. **My Proposal (and a Working Example):** I've put together this PR as a first pass, a working example, to kick off a discussion on whether this centralized Makefile approach is something we want to adopt. It shows how we can: * **Streamline Dependency Setup:** Get all common project dependencies installed with just one `make` command. (We can definitely refine this further, perhaps breaking it down into component-specific sets if we build this out.) * **Simplify Builds:** Replace those long `gradlew` calls with concise `make` commands to build the server, admin, or both. * **Automate Helm Tasks:** Easily generate Helm documentation, run unit tests, and perform linting all with simple `make` targets. * **Add Pre-commit Automation:** Introduce a `pre-commit` target to automate routine tasks like Helm documentation generation and applying Spotless formatting. * _Heads up:_ Python codebase linting/checks aren't included yet. I hit some hard-coded path issues there, but that's something I can tackle if we decide to pursue this direction. **Beyond this PR: Other Potential Use Cases:** If we move forward with this approach, the Makefile could also become a central point for: * **Minikube Cluster Management:** Streamlining cluster setup, teardown, and interaction specifically for Helm-related development. * **Unified Test Execution:** Running all project test cases (unit, integration, etc.) with a single `make` command. * **Service State Management & Deployment:** Handling local service lifecycle (e.g., `make start`, `make stop`) and orchestrating Helm deployments. **What I'm Looking For:** I'd really appreciate your thoughts on this centralized Makefile idea. Does this feel like the right path for how we want to manage our developer experience? Any feedback on the overall concept or the specific examples here would be super helpful as we decide whether to build this out further. **Sample interface and commands output:** Main interface: ```sh ➜ polaris git:(makefile) make Usage: make <target> General help Display this help. Polaris Build build Build Polaris server, admin, and container images build-server Build Polaris server and container image build-admin Build Polaris admin and container image build-cleanup Clean build artifacts spotless-apply Apply code formatting using Spotless Gradle plugin. Helm helm-doc-generate Generate Helm chart documentation helm-unittest Run Helm chart unittest helm-lint Run Helm chart lint check Pre-commit pre-commit Run tasks for pre-commit Dependencies setup-binaries Install required binaries if not present ``` Run pre-commit ```sh ➜ polaris git:(makefile) make pre-commit --- Checking Homebrew installation --- --- Homebrew is installed --- --- Checking and installing required binaries --- --- All required binaries checked/installed --- --- Applying Spotless formatting --- Configuration on demand is an incubating feature. [Incubating] Problems report is available at: file:///Users/yong/Desktop/GitHome/polaris/build/reports/problems/problems-report.html Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD SUCCESSFUL in 1s 174 actionable tasks: 174 up-to-date --- Spotless formatting applied --- --- Generating Helm documentation --- INFO[2025-07-11T00:19:38-05:00] Found Chart directories [polaris] INFO[2025-07-11T00:19:38-05:00] Generating README Documentation for chart helm/polaris --- Helm documentation generated and copied --- ``` Run build ```sh ➜ polaris git:(makefile) make build --- Checking Homebrew installation --- --- Homebrew is installed --- --- Checking and installing required binaries --- --- All required binaries checked/installed --- --- Building Polaris server --- Configuration on demand is an incubating feature. [Incubating] Problems report is available at: file:///Users/yong/Desktop/GitHome/polaris/build/reports/problems/problems-report.html Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD SUCCESSFUL in 16s 85 actionable tasks: 2 executed, 83 up-to-date --- Polaris server build complete --- --- Building Polaris admin --- Configuration on demand is an incubating feature. [Incubating] Problems report is available at: file:///Users/yong/Desktop/GitHome/polaris/build/reports/problems/problems-report.html Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.14.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD SUCCESSFUL in 7s 67 actionable tasks: 2 executed, 65 up-to-date --- Polaris admin build complete --- ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org