From 7a7ef7c6abf3731d25e1186fb1a538d51d276693 Mon Sep 17 00:00:00 2001 From: Brett Hoerner Date: Thu, 21 Nov 2024 14:38:15 -0700 Subject: [PATCH] Simple build and push --- .github/CODEOWNERS | 20 ---- .github/ISSUE_TEMPLATE/1-bug_report.yml | 82 -------------- .github/ISSUE_TEMPLATE/2-feature_request.yml | 56 ---------- .github/ISSUE_TEMPLATE/config.yml | 20 ---- .github/pull_request_template.md | 37 ------- .github/renovate.json5 | 74 ------------- .github/workflows/check-md-link-config.json | 11 -- .github/workflows/check-md-link.yml | 45 -------- .github/workflows/docker-build-push.yml | 37 +++++++ .github/workflows/gradle.yml | 86 --------------- .github/workflows/helm.yml | 107 ------------------- .github/workflows/regtest.yml | 42 -------- .github/workflows/site.yml | 59 ---------- .github/workflows/stale.yml | 37 ------- README.md | 106 +----------------- 15 files changed, 39 insertions(+), 780 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/1-bug_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/2-feature_request.yml delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/renovate.json5 delete mode 100644 .github/workflows/check-md-link-config.json delete mode 100644 .github/workflows/check-md-link.yml create mode 100644 .github/workflows/docker-build-push.yml delete mode 100644 .github/workflows/gradle.yml delete mode 100644 .github/workflows/helm.yml delete mode 100644 .github/workflows/regtest.yml delete mode 100644 .github/workflows/site.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 6f96f1c10..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,20 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -* @jbonofre @ashvina @anoopj @RussellSpitzer @snazy @vvcephei @takidau @jackye1995 @flyrain @eric-maynard @collado-mike @ebyhr @annafil @adutra diff --git a/.github/ISSUE_TEMPLATE/1-bug_report.yml b/.github/ISSUE_TEMPLATE/1-bug_report.yml deleted file mode 100644 index 88163ae10..000000000 --- a/.github/ISSUE_TEMPLATE/1-bug_report.yml +++ /dev/null @@ -1,82 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Bug report -description: Create a report to help us improve. -title: "[BUG]" -labels: ["bug"] -body: - - type: markdown - attributes: - value: | - Verify that the issue is not already reported, looking at the [currently open issues](https://github.com/apache/polaris/issues), use the `Filter` field to narrow down your search. - - Please provide a title above with a short, concise summary - don't leave it "empty". - - Do **NOT** share any sensitive information like password, security tokens, private URLs etc. - - - type: checkboxes - attributes: - label: "Is this a possible security vulnerability?" - description: "If yes, then STOP here and contact security@apache.org instead!" - options: - - label: "This is NOT a possible security vulnerability" - required: true - - - type: textarea - attributes: - label: "Describe the bug" - description: "A clear and concise description of what the bug is." - validations: - required: true - - - type: textarea - attributes: - label: "To Reproduce" - description: "Steps to reproduce the behavior" - placeholder: | - 1. Go to '...' - 2. Click on '...' - 3. Scroll down to '...' - 4. See error - - - type: textarea - attributes: - label: "Actual Behavior" - placeholder: "How the system currently behaves" - - - type: textarea - attributes: - label: "Expected Behavior" - placeholder: "How the system should behave" - - - type: textarea - attributes: - label: "Additional context" - description: "More information, text, screenshots, etc" - placeholder: "Enter additional helpful information here" - - - type: textarea - attributes: - label: "System information" - description: "Information about the environment in which the bug occurs" - placeholder: | - OS: [e.g. Linux, macOS or Windows] - Polaris Catalog Version: [e.g. 0.3.0] - Object storage & setup: [e.g. AWS S3, region, Minio] diff --git a/.github/ISSUE_TEMPLATE/2-feature_request.yml b/.github/ISSUE_TEMPLATE/2-feature_request.yml deleted file mode 100644 index d502175ae..000000000 --- a/.github/ISSUE_TEMPLATE/2-feature_request.yml +++ /dev/null @@ -1,56 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Feature request -description: Suggest an idea for this project -title: "[FEATURE REQUEST]" -labels: enhancement -body: - - type: markdown - attributes: - value: | - Verify that the feature request is not already reported, looking at the [currently open issues](https://github.com/apache/polaris/issues), use the `Filter` field to narrow down your search. - - Please provide a title above with a short, concise summary - don't leave it "empty". - - Do **NOT** share any sensitive information like password, security tokens, private URLs etc. - - - type: textarea - attributes: - label: Is your feature request related to a problem? Please describe. - placeholder: | - A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - - - type: textarea - attributes: - label: Describe the solution you'd like - placeholder: | - A clear and concise description of what you want to happen. - - - type: textarea - attributes: - label: Describe alternatives you've considered - placeholder: | - A clear and concise description of any alternative solutions or features you've considered. - - - type: textarea - attributes: - label: Additional context - placeholder: | - Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 71af91b5b..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,20 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -blank_issues_enabled: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index deba9e9f3..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,37 +0,0 @@ -# Description - -Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. - -Fixes # (issue) - -## Type of change - -Please delete options that are not relevant. - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] Documentation update -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] This change requires a documentation update - -# How Has This Been Tested? - -Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - -- [ ] Test A -- [ ] Test B - -**Test Configuration**: -* Hardware: -* Toolchain: -* SDK: - -# Checklist: - -Please delete options that are not relevant. - -- [ ] I have performed a self-review of my code -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation -- [ ] My changes generate no new warnings -- [ ] If adding new functionality, I have discussed my implementation with the community using the linked GitHub issue diff --git a/.github/renovate.json5 b/.github/renovate.json5 deleted file mode 100644 index 4e65d7c56..000000000 --- a/.github/renovate.json5 +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - extends: [ - "config:base", - // Required to not pin dependencies to _exact_ versions (pip) - ":preserveSemverRanges", - "group:monorepos", - "helpers:pinGitHubActionDigests", - ":semanticPrefixFixDepsChoreOthers", - ":dependencyDashboard", - ], - - // Added for posterity how to let Renovate manage version-branches, assuming that release branches - // have the `release/` prefix. - baseBranches: ["main", "/^release\\/.*/"], - additionalBranchPrefix: "{{baseBranch}}/", - commitMessagePrefix: "{{baseBranch}}: ", - - pip_requirements: { - // fileMatch default: (^|/)([\\w-]*)requirements\\.(txt|pip)$ - "fileMatch": ["(^|/)([\\w-]*)requirements.*\\.txt$"], - }, - - packageRules: [ - // Check for updates, do not merge automatically. This rule does effectively nothing, but serves as a - // reference for the kinds of managers used in Polaris. - { - matchManagers: [ - "gradle", "gradle-wrapper", - "pip_requirements", "pip_setup", "poetry", "setup-cfg", - "dockerfile", "devcontainer", "docker-compose", - "github-actions"], - automerge: false, // just be explicit (false is the default) - }, - - // Reduce awssdk update frequency noise (awssdk has daily releases) - { - matchManagers: ["gradle"], - matchPackagePrefixes: ["software.amazon.awssdk"], - extends: ["schedule:weekly"], - }, - - // Turn off major & minor version updates on version-branches - { - matchBaseBranches: ["/^release/.*/"], - matchUpdateTypes: ["major", "minor"], - enabled: false - }, - ], - - // Max 50 PRs in total, 5 per hour. - // Renovate rebases PRs automatically when the renovate bot "visits" (scans) the repo, hence the hourly and - // concurrent PRs limit. - prConcurrentLimit: 50, - prHourlyLimit: 5, -} diff --git a/.github/workflows/check-md-link-config.json b/.github/workflows/check-md-link-config.json deleted file mode 100644 index 17ebbff66..000000000 --- a/.github/workflows/check-md-link-config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "^https?://localhost.*" - }, - { - "_comment": "mvnrepository blocks requests originating from GitHub Actions", - "pattern": "https://mvnrepository.com/artifact/org.apache.iceberg/iceberg-spark" - } - ] -} \ No newline at end of file diff --git a/.github/workflows/check-md-link.yml b/.github/workflows/check-md-link.yml deleted file mode 100644 index 00a163593..000000000 --- a/.github/workflows/check-md-link.yml +++ /dev/null @@ -1,45 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will find markdown links in the folder paths -# specified, and confirm the links are valid - -name: Check Markdown links - -on: - push: - branches: - - 'main' - pull_request: - -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - use-quiet-mode: 'yes' - config-file: '.github/workflows/check-md-link-config.json' - folder-path: 'regtests, regtests/client/python/docs, regtests/client/python, .github, build-logic, polaris-core, polaris-service, extension, spec, k8, getting-started' - file-path: 'CHAT_BYLAWS.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, README.md SECURITY.md' diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml new file mode 100644 index 000000000..f94255325 --- /dev/null +++ b/.github/workflows/docker-build-push.yml @@ -0,0 +1,37 @@ +name: Build and Push Docker Container + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + env: + IMAGE_VERSION: $(date +'%Y%m%d_%H%M%S')_${{ github.sha }}_${{ github.run_number }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin + + - name: Build and push multi-platform Docker image + run: | + # Build and tag the Docker image with the version + docker buildx create --use + docker buildx build --push \ + --tag ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):${{ env.IMAGE_VERSION }} \ + --platform linux/amd64,linux/arm64 . + + env: + DOCKER_CLI_ACI_AS_TEXT: "true" diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml deleted file mode 100644 index 288716fb5..000000000 --- a/.github/workflows/gradle.yml +++ /dev/null @@ -1,86 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle - -name: Java CI with Gradle - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - # Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. - # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md - - name: Setup Gradle - uses: gradle/actions/setup-gradle@16bf8bc8fe830fa669c3c9f914d3eb147c629707 # v4 - with: - # The setup-gradle action fails, if the wrapper is not using the right version or is not present. - # Our `gradlew` validates the integrity of the `gradle-wrapper.jar`, so it's safe to disable this. - validate-wrappers: false - - - name: Check formatting - run: ./gradlew check - - - name: Check Maven publication - run: ./gradlew publishToMavenLocal sourceTarball - - - name: Build with Gradle Wrapper - run: ./gradlew test - - - name: Archive test results - uses: actions/upload-artifact@v4 - if: always() - with: - name: upload-test-artifacts - path: | - polaris-core/build/test-results/test - polaris-service/build/test-results/test - - # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). - # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. - # - # - name: Setup Gradle - # uses: gradle/actions/setup-gradle@16bf8bc8fe830fa669c3c9f914d3eb147c629707 # v4 - # with: - # gradle-version: '8.6' - # - # - name: Build with Gradle 8.6 - # run: gradle build diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml deleted file mode 100644 index 64e93490a..000000000 --- a/.github/workflows/helm.yml +++ /dev/null @@ -1,107 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Helm tests - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - helm-tests: - name: Helm tests - runs-on: ubuntu-latest - timeout-minutes: 60 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Helm - uses: azure/setup-helm@v4.2.0 - with: - version: 'v3.16.0' - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.6.1 - - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs helm) - if [[ -n "$changed" ]]; then - echo "changed=true" >> "$GITHUB_OUTPUT" - fi - - - name: Run 'helm template' validation - if: steps.list-changed.outputs.changed == 'true' - run: | - cd helm/polaris - for f in values.yaml ci/*.yaml; do - echo "::group::helm template $f" - helm template --debug --namespace polaris-ns --values $f . - echo "::endgroup::" - done - - - name: Run Helm unit tests - if: steps.list-changed.outputs.changed == 'true' - run: | - helm plugin install https://github.com/helm-unittest/helm-unittest.git || true - helm unittest helm/polaris - - - name: Run chart-testing (lint) - if: steps.list-changed.outputs.changed == 'true' - run: ct lint --target-branch ${{ github.event.repository.default_branch }} --debug --charts ./helm/polaris - - - name: Set up Minikube - if: steps.list-changed.outputs.changed == 'true' - uses: medyagh/setup-minikube@v0.0.18 - - - name: Docker build - if: steps.list-changed.outputs.changed == 'true' - run: | - eval $(minikube docker-env) - docker build -f ./Dockerfile \ - --build-arg ECLIPSELINK=true \ - --build-arg ECLIPSELINK_DEPS=com.h2database:h2:2.3.232 \ - -t polaris:latest . - - - name: Install fixtures - if: steps.list-changed.outputs.changed == 'true' - run: | - kubectl create namespace polaris-ns - kubectl apply --namespace polaris-ns $(find helm/polaris/ci/fixtures -name "*.yaml" -exec echo -n "-f {} " \;) - - - name: Run chart-testing (install) - if: steps.list-changed.outputs.changed == 'true' - run: | - ct install --target-branch ${{ github.event.repository.default_branch }} \ - --namespace polaris-ns \ - --helm-extra-set-args "--set=image.repository=polaris --set=image.tag=latest" \ - --debug --charts ./helm/polaris diff --git a/.github/workflows/regtest.yml b/.github/workflows/regtest.yml deleted file mode 100644 index b7f095c08..000000000 --- a/.github/workflows/regtest.yml +++ /dev/null @@ -1,42 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: Regression Tests -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - regtest: - - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v4 - - name: fix permissions - run: mkdir -p regtests/output && chmod 777 regtests/output && chmod 777 regtests/t_*/ref/* - - name: Regression Test - env: - AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} - AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} - run: docker compose up --build --exit-code-from regtest diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml deleted file mode 100644 index de458aba0..000000000 --- a/.github/workflows/site.yml +++ /dev/null @@ -1,59 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -name: "Hugo Site" -on: - push: - branches: [ "main", "versioned-docs" ] - pull_request: - -jobs: - site: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/checkout@v4 - with: - ref: "versioned-docs" - path: site/content/releases - - - name: Install docker-compose - run: | - sudo curl -SL \ - https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-linux-x86_64 \ - -o /usr/local/bin/docker-compose - sudo chmod 755 /usr/local/bin/docker-compose - sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose - - - name: Build Apache Site - run: site/bin/create-static-site.sh - - - name: Copy .asf.yaml - run: sudo cp .asf.yaml site/build/apache-site/ - - - name: Deploy Static Site to GitHub - if: github.event_name == 'push' && github.repository == 'apache/polaris' - uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: asf-site - publish_dir: ./site/build/apache-site - cname: polaris.apache.org diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 253350735..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,37 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - ---- -jobs: - stale: - runs-on: ubuntu-22.04 - steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e - with: - days-before-close: 5 - days-before-stale: 30 - stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days." - stale-pr-message: "This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days." -name: "Close stale issues and PRs" -on: - schedule: - - cron: "30 1 * * *" -permissions: - issues: read - pull-requests: write diff --git a/README.md b/README.md index da1a27eb5..996a90025 100644 --- a/README.md +++ b/README.md @@ -1,105 +1,3 @@ - +# polaris-container -# Apache Polaris (incubating) - -Apache Polaris™ is an open-source, fully-featured catalog for Apache Iceberg™. It implements Iceberg's -[REST API](https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml), -enabling seamless multi-engine interoperability across a wide range of platforms, including Apache Doris™, Apache Flink®, -Apache Spark™, StarRocks, and Trino. - -Documentation is available at https://polaris.apache.org, including -[Polaris management API doc](https://polaris.apache.org/index.html#tag/polaris-management-service_other) -and [Apache Iceberg REST API doc](https://polaris.apache.org/index.html#tag/Configuration-API). - -[Subscribe to the dev mailing list][dev-list-subscribe] to join discussions via email or browse [the archives](https://lists.apache.org/list.html?dev@polaris.apache.org). Check out the [CONTRIBUTING guide](CONTRIBUTING.md) -for contribution guidelines. - -[![Zulip](https://img.shields.io/badge/Zulip-Chat-blue?color=3d4db3&logo=zulip&style=for-the-badge&logoColor=white)](https://polaris-catalog.zulipchat.com/) -[![Build Status](https://img.shields.io/github/actions/workflow/status/apache/polaris/gradle.yml?branch=main&label=Main%20CI&logo=Github&style=for-the-badge)](https://github.com/apache/polaris/actions/workflows/gradle.yml?query=branch%3Amain) - -[dev-list-subscribe]: mailto:dev-subscribe@polaris.apache.org - -## Building and Running - -Apache Polaris is organized into the following modules: -- `polaris-core` - The main Polaris entity definitions and core business logic -- `polaris-server` - The Polaris REST API server -- `polaris-eclipselink` - The Eclipselink implementation of the MetaStoreManager interface - -Apache Polaris is built using Gradle with Java 21+ and Docker 27+. -- `./gradlew build` - To build and run tests. Make sure Docker is running, as the integration tests depend on it. -- `./gradlew assemble` - To skip tests. -- `./gradlew test` - To run unit tests and integration tests. -- `./gradlew runApp` - To run the Polaris server locally on localhost:8181. -- `./regtests/run_spark_sql.sh` - To connect from Spark SQL. Here are some example commands to run in the Spark SQL shell: -```sql -create database db1; -show databases; -create table db1.table1 (id int, name string); -insert into db1.table1 values (1, 'a'); -select * from db1.table1; -``` - -Apache Polaris supports the following optional build options: -- `-PeclipseLink=true` – Enables the EclipseLink extension. -- `-PeclipseLinkDeps=[groupId]:[artifactId]:[version],...` – Specifies one or more additional dependencies for EclipseLink (e.g., JDBC drivers) separated by commas. - -### More build and run options -Running in Docker -- `docker build -t localhost:5001/polaris:latest .` - To build the image. - - Optional build options: - - `docker build -t localhost:5001/polaris:latest --build-arg ECLIPSELINK=true .` - Enables the EclipseLink extension. - - `docker build -t localhost:5001/polaris:latest --build-arg ECLIPSELINK=true --build-arg ECLIPSELINK_DEPS=[groupId]:[artifactId]:[version],... .` – Enables the EclipseLink extension with one or more additional dependencies for EclipseLink (e.g. JDBC drivers) separated by commas. -- `docker run -p 8181:8181 localhost:5001/polaris:latest` - To run the image in standalone mode. - -Running in Kubernetes -- `./run.sh` - To run Polaris as a mini-deployment locally. This will create one pod that bind itself to ports `8181` and `8182`. - - Optional run options: - - `./run.sh -b "ECLIPSELINK=true"` - Enables the EclipseLink extension. - - `./run.sh -b "ECLIPSELINK=true;ECLIPSELINK_DEPS=[groupId]:[artifactId]:[version],..."` – Enables the EclipseLink extension with one or more additional dependencies for EclipseLink (e.g. JDBC drivers) separated by commas. -- `kubectl port-forward svc/polaris-service -n polaris 8181:8181 8182:8182` - To create secure connections between a local machine and a pod within the cluster for both service and metrics endpoints. - - Currently supported metrics endpoints: - - localhost:8182/metrics - - localhost:8182/healthcheck -- `kubectl get pods -n polaris` - To check the status of the pods. -- `kubectl get deployment -n polaris` - To check the status of the deployment. -- `kubectl describe deployment polaris-deployment -n polaris` - To troubleshoot if things aren't working as expected. - -Running regression tests -- `./regtests/run.sh` - To run regression tests in another terminal. -- `docker compose up --build --exit-code-from regtest` - To run regression tests in a Docker environment. - -Building docs -- Docs are generated using [Hugo](https://gohugo.io/) using the [Docsy](https://www.docsy.dev/docs/) theme. -- To view the site locally, run - ```bash - site/bin/run-hugo-in-docker.sh - ``` -- See [README in `site/`](site/README.md) for more information. - -## License - -Apache Polaris is under the Apache License Version 2.0. See the [LICENSE](LICENSE). - -## ASF Incubator disclaimer - -Apache Polaris™ is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. - -Apache®, Apache Polaris™, Apache Iceberg™, Apache Spark™ are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. +This is only a fork of https://github.com/apache/polaris so that we can push a stable container image. \ No newline at end of file