Skip to content
Open
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
5 changes: 4 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ jobs:
./gradlew check sourceTarball distTar distZip publishToMavenLocal \
-x :polaris-runtime-service:test \
-x :polaris-admin:test \
-x intTest --continue
-x intTest \
-x :polaris-helm:check \
--continue
- name: Save partial Gradle build cache
uses: ./.github/actions/ci-incr-build-cache-save
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -213,6 +215,7 @@ jobs:
./gradlew \
intTest \
-x :polaris-runtime-service:intTest \
-x :polaris-helm:intTest \
--continue
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ jobs:
./gradlew \
:polaris-server:assemble \
:polaris-server:quarkusAppPartsBuild --rerun \
:polaris-admin:assemble \
:polaris-admin:quarkusAppPartsBuild --rerun \
-Dquarkus.container-image.build=true
minikube image ls

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spark_client_regtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
# publishToMavenLocal causes a GH API requests, use the token for those requests
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
run: ./gradlew assemble publishToMavenLocal
run: ./gradlew assemble publishToMavenLocal -x :polaris-helm:assemble

- name: Image build
env:
Expand Down
82 changes: 78 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,86 @@ Tips:
* Keep in mind that the Git commit subject and message is going to be read by other people, potentially even after years. The Git commit subject and message will appear "as is" in release notes.
* Make sure the subject and message are properly formatted and contains a concise description of the changes in way that someone who has no prior knowledge can understand the rationale of the change and the change itself. Remove information that's of no use for someone reading the Git commit log, for example single intermediate commit messages like `formatting` or `fix test`.

## Java version requirements
## Build Prerequisites and Required Tools

The Apache Polaris build currently requires Java 21 or later. There are a few tools that help you running the right Java version:
Apache Polaris (incubating) requires several tools to run a full build, including tests and documentation generation.

* [SDKMAN!](https://sdkman.io/) follow the installation instructions, then run `sdk list java` to see the available distributions and versions, then run `sdk install java <identifier from list>` using the identifier for the distribution and version (>= 21) of your choice.
* [jenv](https://www.jenv.be/) If on a Mac you can use jenv to set the appropriate SDK.
### Core Build Requirements

These tools are required for basic building and testing:

* **Git**: Required for cloning the repository and version control.

* **Java 21+**: The build requires Java 21 or later. Suggested installers:
* [SDKMAN!](https://sdkman.io/) - Run `sdk list java` to see available distributions, then `sdk install java <identifier>` to install.
* [jEnv](https://www.jenv.be/) - You can also use jEnv to manage Java versions.

* **Container Runtime**: A container runtime like [Docker] or [Podman] is required for integration tests, regression tests
and building container images.

[Docker]: https://www.docker.com/
[Podman]: https://podman.io/

### Helm Chart Testing Requirements

These tools are required to run Helm chart tests (part of `./gradlew test` and `./gradlew intTest`):

* **Helm**: Kubernetes package manager, required for template validation and unit tests.
* macOS: `brew install helm`
* See [Helm installation instructions](https://helm.sh/docs/intro/install/)

* **Helm Unittest Plugin**: Required for running Helm unit tests.
* Install: `helm plugin install https://github.com/helm-unittest/helm-unittest.git`

* **helm-docs**: Required for generating Helm chart documentation.
* macOS: `brew install norwoodj/tap/helm-docs`
* See [helm-docs installation instructions](https://github.com/norwoodj/helm-docs)

* **chart-testing (ct)**: Required for linting and testing Helm charts.
* macOS: `brew install chart-testing`
* See [chart-testing installation instructions](https://github.com/helm/chart-testing)

* **Minikube**: Required for running Helm chart integration tests.
* macOS: `brew install minikube`
* See [Minikube installation instructions](https://minikube.sigs.k8s.io/docs/start/)

* **kubectl**: Kubernetes command-line tool, required for Helm integration tests.
* macOS: `brew install kubectl`
* See [kubectl installation instructions](https://kubernetes.io/docs/tasks/tools/)

### Other Tools

These tools are helpful but not strictly required:

* **jq**: JSON processor, useful for working with Polaris APIs and scripts.
* macOS: `brew install jq`
* See [jq installation instructions](https://jqlang.github.io/jq/download/)

### Quick Installation (macOS)

For macOS users with Homebrew, you can install all dependencies at once using the provided Makefile:

```bash
make install-dependencies-brew
make install-optional-dependencies-brew
```

To check which dependencies are installed:
```bash
make check-dependencies
```

### Skipping Specific Tests

If you don't have all the Helm-related tools installed, you can skip those tests:

```bash
# Run checks excluding Helm tests
./gradlew check -x :polaris-helm:test

# Run build excluding Helm integration tests
./gradlew build -x :polaris-helm:intTest
```

## Code Contribution Guidelines

Expand Down
2 changes: 2 additions & 0 deletions gradle/projects.main.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ polaris-config-docs-annotations=tools/config-docs/annotations
polaris-config-docs-generator=tools/config-docs/generator
polaris-config-docs-site=tools/config-docs/site

polaris-helm=helm/polaris

# executor abstraction
polaris-async-api=persistence/nosql/async/api
polaris-async-java=persistence/nosql/async/java
Expand Down
19 changes: 17 additions & 2 deletions helm/polaris/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ weight: 675
Do not modify the README.md file directly, please modify README.md.gotmpl instead.
To re-generate the README.md file, install helm-docs then run from the repo root:
helm-docs --chart-search-root=helm
Alternatively, run `./gradlew helmDocs` or `make helm-doc-generate` from the repo root.
-->

![Version: 1.2.0-incubating-SNAPSHOT](https://img.shields.io/badge/Version-1.2.0--incubating--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.2.0-incubating-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.2.0--incubating--SNAPSHOT-informational?style=flat-square)
Expand Down Expand Up @@ -55,8 +56,6 @@ eval $(minikube docker-env)
./gradlew \
:polaris-server:assemble \
:polaris-server:quarkusAppPartsBuild --rerun \
:polaris-admin:assemble \
:polaris-admin:quarkusAppPartsBuild --rerun \
-Dquarkus.container-image.build=true
```

Expand Down Expand Up @@ -149,6 +148,13 @@ helm plugin install https://github.com/helm-unittest/helm-unittest.git
brew install chart-testing
```

Alternatively, on macOS, you can also run the following make targets:

```bash
make install-dependencies-brew
make install-optional-dependencies-brew
Comment on lines +154 to +155
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind adding this as a macOS variant but leave the Linux one?

(Also for the other occurrences below)

```

The integration tests also require some fixtures to be deployed. The `ci/fixtures` directory
contains the required resources. To deploy them, run the following command:
```bash
Expand Down Expand Up @@ -183,6 +189,15 @@ Integration tests are run with the Chart Testing tool:
ct install --namespace polaris --charts ./helm/polaris
```

### Running tests with Gradle

Both unit and integration tests can be run with Gradle. From the Polaris repo root:

```bash
./gradlew :polaris-helm:test
./gradlew :polaris-helm:intTest
```

## Values

| Key | Type | Default | Description |
Expand Down
19 changes: 17 additions & 2 deletions helm/polaris/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ weight: 675
Do not modify the README.md file directly, please modify README.md.gotmpl instead.
To re-generate the README.md file, install helm-docs then run from the repo root:
helm-docs --chart-search-root=helm
Alternatively, run `./gradlew helmDocs` or `make helm-doc-generate` from the repo root.
-->

{{ template "chart.deprecationWarning" . }}
Expand Down Expand Up @@ -57,8 +58,6 @@ eval $(minikube docker-env)
./gradlew \
:polaris-server:assemble \
:polaris-server:quarkusAppPartsBuild --rerun \
:polaris-admin:assemble \
:polaris-admin:quarkusAppPartsBuild --rerun \
-Dquarkus.container-image.build=true
```

Expand Down Expand Up @@ -151,6 +150,13 @@ helm plugin install https://github.com/helm-unittest/helm-unittest.git
brew install chart-testing
```

Alternatively, on macOS, you can also run the following make targets:

```bash
make install-dependencies-brew
make install-optional-dependencies-brew
```

The integration tests also require some fixtures to be deployed. The `ci/fixtures` directory
contains the required resources. To deploy them, run the following command:
```bash
Expand Down Expand Up @@ -185,4 +191,13 @@ Integration tests are run with the Chart Testing tool:
ct install --namespace polaris --charts ./helm/polaris
```

### Running tests with Gradle

Both unit and integration tests can be run with Gradle. From the Polaris repo root:

```bash
./gradlew :polaris-helm:test
./gradlew :polaris-helm:intTest
```

{{ template "chart.valuesSection" . }}
Loading