Skip to content

Commit

Permalink
Merge branch 'main' into fix/change-gql-bigint-to-encoded-as-str
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol authored Jul 15, 2024
2 parents 29b628d + 7d45a2e commit 1f44a4e
Show file tree
Hide file tree
Showing 205 changed files with 8,079 additions and 1,912 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ indent_style = space
indent_size = 4

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[*.rst]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
# You can target a repository in a different organization
# to the issue
project-url: https://github.com/orgs/lablup/projects/11
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
- uses: actions/[email protected].1
- uses: actions/[email protected].2
with:
project-url: https://github.com/orgs/lablup/projects/20
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 2
token: ${{ secrets.WORKFLOW_PAT }}

- name: Extract Python version from pants.toml
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
needs: backport-target-branch
strategy:
matrix: ${{ fromJson(needs.backport-target-branch.outputs.matrix) }}
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -92,7 +94,7 @@ jobs:
run: |
git config --global user.name "${{ needs.backport-target-branch.outputs.author }}"
git config --global user.email "${{ needs.backport-target-branch.outputs.author_email }}"
git fetch origin main --depth=2
git fetch origin main --depth=10
git cherry-pick --strategy=recursive --strategy-option=theirs ${{ needs.backport-target-branch.outputs.latest_commit }}
git commit \
--amend -m '${{ needs.backport-target-branch.outputs.commit_message }}' \
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/build-static-wsproxy.yml

This file was deleted.

81 changes: 21 additions & 60 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
else
echo "GIT_FETCH_DEPTH=2" >> "${GITHUB_ENV}"
fi
- uses: actions/checkout@v4
- name: Check out the revision with minimal required history
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.GIT_FETCH_DEPTH }}
- name: Extract Python version from pants.toml
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:


typecheck:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && github.event.pull_request.merged == false }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name) && github.event.pull_request.merged == false }}
runs-on: ubuntu-latest
steps:
- name: Calculate the fetch depth
Expand All @@ -89,7 +90,8 @@ jobs:
else
echo "GIT_FETCH_DEPTH=2" >> "${GITHUB_ENV}"
fi
- uses: actions/checkout@v4
- name: Check out the revision with minimal required history
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.GIT_FETCH_DEPTH }}
- name: Extract Python version from pants.toml
Expand Down Expand Up @@ -142,7 +144,7 @@ jobs:


test:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && github.event.pull_request.merged == false }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name) && github.event.pull_request.merged == false }}
runs-on: [ubuntu-latest-8-cores]
steps:
- name: Calculate the fetch depth
Expand All @@ -152,7 +154,8 @@ jobs:
else
echo "GIT_FETCH_DEPTH=2" >> "${GITHUB_ENV}"
fi
- uses: actions/checkout@v4
- name: Check out the revision with minimal required history
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.GIT_FETCH_DEPTH }}
- name: Create LFS file hash list
Expand Down Expand Up @@ -220,14 +223,15 @@ jobs:
strategy:
fail-fast: false
matrix:
# ubuntu-latest: intel
# linux-aarch64: aarch64 (self-hosted)
# ubuntu-latest: x86-64
# ubuntu-22.04-arm64: aarch64
# macos-12: intel
# macos-13: apple silicon
os: [ubuntu-latest, linux-aarch64, macos-13-xlarge, macos-12-large]
os: [ubuntu-latest, ubuntu-22.04-arm64, macos-13-xlarge, macos-12-large]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Check out the revision
uses: actions/checkout@v4
- name: Fetch remote tags
run: git fetch origin 'refs/tags/*:refs/tags/*' -f
- name: Create LFS file hash list
Expand All @@ -245,55 +249,14 @@ jobs:
PYTHON_VERSION=$(awk -F'["]' '/CPython==/ {print $2; exit}' pants.toml | sed 's/CPython==//')
echo "PANTS_CONFIG_FILES=pants.ci.toml" >> $GITHUB_ENV
echo "PROJECT_PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
- name: Install coreutils for macOS
if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install coreutils
- if: ${{ !endsWith(matrix.os, 'linux-aarch64') }}
- name: Set up Python as Runtime
uses: actions/setup-python@v5
with:
python-version: ${{ env.PROJECT_PYTHON_VERSION }}
cache: "pip"
# For linux-aarch64 runner, we assume that we have the correct prebuilt Python version already.

- name: Unpack local-proxy binaries
run: |
OS_TYPE=$(uname -s)
CPU_ARCH=$(uname -m)
SYSTEM="$OS_TYPE $CPU_ARCH"
case "$SYSTEM" in
"Linux x86_64" )
SRC_PLATFORM="linux-x64"
DST_PLATFORM="linux-x86_64"
CHECKSUM_CMD="sha256sum"
;;
"Linux aarch64" )
SRC_PLATFORM="linux-arm64"
DST_PLATFORM="linux-aarch64"
CHECKSUM_CMD="sha256sum"
;;
"Darwin x86_64" )
SRC_PLATFORM="macos-x64"
DST_PLATFORM="macos-x86_64"
CHECKSUM_CMD="shasum -a 256"
;;
"Darwin arm64" )
SRC_PLATFORM="macos-arm64"
DST_PLATFORM="macos-aarch64"
CHECKSUM_CMD="shasum -a 256"
;;
esac
mkdir dist-local-proxy
# Normalize the package naming
unzip "src/ai/backend/web/assets/backend.ai-local-proxy-$SRC_PLATFORM.zip"
mv "backend.ai-local-proxy" "dist-local-proxy/backendai-local-proxy-$DST_PLATFORM"
cd dist-local-proxy
ls | xargs -I{} sh -c "$CHECKSUM_CMD {} > {}.sha256"
- name: Upload local-proxy binaries
uses: actions/upload-artifact@v4
with:
name: local-proxy-${{ matrix.os }}
path: dist-local-proxy/*
- name: Bootstrap Pants
uses: pantsbuild/actions/init-pants@v8
with:
Expand Down Expand Up @@ -326,7 +289,8 @@ jobs:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check out the revision
uses: actions/checkout@v4
- name: Fetch remote tags
run: git fetch origin 'refs/tags/*:refs/tags/*' -f
- name: Create LFS file hash list
Expand Down Expand Up @@ -395,6 +359,8 @@ jobs:
if: always() # We want the log even on failures.

build-sbom:
needs: [lint, typecheck, test]
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
uses: ./.github/workflows/sbom.yml

make-final-release:
Expand Down Expand Up @@ -422,7 +388,7 @@ jobs:
pip install -U -r tools/towncrier-requirements.txt
- name: Install local dependencies for packaging
run: |
pip install -U 'twine~=4.0' 'packaging>=21.3'
pip install -U 'twine~=5.0' 'packaging>=21.3'
- name: Extract the release changelog
run: |
python ./scripts/extract-release-changelog.py
Expand All @@ -438,12 +404,6 @@ jobs:
pattern: scies-*
path: dist
merge-multiple: true
- name: Download local-proxy
uses: actions/download-artifact@v4
with:
pattern: local-proxy-*
path: dist
merge-multiple: true
- name: Download SBOM report
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -553,7 +513,8 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Check out the revision
uses: actions/checkout@v4
- name: Create LFS file hash list
run: git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/pr-prefix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check PR title prefix
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
if echo "${{ github.event.pull_request.title }}" | tr ':' '\n' | head -n 1 | grep -qE 'feat|fix|docs|refactor|ci|chore(\([^)]+\)|$)';
if echo "$TITLE" | tr ':' '\n' | head -n 1 | grep -qE '^(feat|fix|docs?|refactor|ci|chore(\([^)]+\))?|deps)$';
then
echo "PR title is valid."
else
echo "PR title is invalid."
echo "Use the title prefixes like:"
echo " feat: (for new features and functionality)"
echo " fix: (for bug fixes and revisions on how things work)"
echo " docs: (for docs, docstring, and comment changes)"
echo " refactor: (for refactoring and revisions on how things are related)"
echo " ci: (for changes related to CI/CD workflows)"
echo " chore(...): (for changes related to repo/build configs, dependencies, etc.)"
echo " feat: (for new features and functionality)"
echo " fix: (for bug fixes and revisions on how things work)"
echo " doc: (for docs, docstring, and comment changes)"
echo " docs: (for docs, docstring, and comment changes)"
echo " refactor: (for refactoring and revisions on how things are related)"
echo " ci: (for changes related to CI/CD workflows)"
echo " chore: (for changes related to repo/build configs, tool dependencies, etc.)"
echo " chore(...): (for changes related to repo/build configs, tool dependencies, etc.)"
echo " deps: (for changes related to upstream dependencies, etc.)"
echo "following the conventional commit style."
exit 1
fi
34 changes: 13 additions & 21 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,23 @@ on: [workflow_dispatch, workflow_call]

jobs:
sbom:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Extract Python version from pants.toml
- name: Calculate the fetch depth
run: |
PYTHON_VERSION=$(grep -m 1 -oP '(?<=CPython==)([^"]+)' pants.toml)
echo "PROJECT_PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
- name: Set up Python as Runtime
uses: actions/setup-python@v5
with:
python-version: ${{ env.PROJECT_PYTHON_VERSION }}
cache: pip
- name: Prepare cache dir for Pants
run: mkdir -p .tmp
- name: Bootstrap Pants
uses: pantsbuild/actions/init-pants@v8
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
echo "GIT_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
else
echo "GIT_FETCH_DEPTH=2" >> "${GITHUB_ENV}"
fi
- name: Checkout the source tree
uses: actions/checkout@v4
with:
gha-cache-key: pants-cache-main-1-sbom-py${{ env.PROJECT_PYTHON_VERSION }}-${{ runner.os }}-${{ runner.arch }}
named-caches-hash: ${{ hashFiles('python*.lock', 'tools/*.lock') }}
cache-lmdb-store: 'true'
- uses: CycloneDX/gh-python-generate-sbom@v2
- name: Upload SBOM report
lfs: false
fetch-depth: ${{ env.GIT_FETCH_DEPTH }}
- name: Generate the SBOM report
uses: CycloneDX/gh-python-generate-sbom@v2
- name: Upload the SBOM report
uses: actions/upload-artifact@v4
with:
name: SBOM report
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/timeline-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ permissions:
contents: write

jobs:
pr-number-assign:
assign-pr-number:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:changelog') && !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name) && github.event.pull_request.number != null && github.event.pull_request.merged == false }}
uses: ./.github/workflows/pr-number-assign.yml
uses: ./.github/workflows/assign-pr-number.yml
secrets:
WORKFLOW_PAT: ${{ secrets.WORKFLOW_PAT }}
WORKFLOW_PAT: ${{ secrets.OCTODOG }}

towncrier:
needs: [pr-number-assign]
needs: [assign-pr-number]
runs-on: ubuntu-latest
steps:
- name: Get PR's fetch depth
Expand Down
Loading

0 comments on commit 1f44a4e

Please sign in to comment.