Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
refactor -> work against runtime

update dependency proto & change runtime port

fix port out of range

rename manifests "expression" to "pyexp"

update natun dep

replace the runtime pb to the monorepo

sha1 -> sha256

add headers

better logging

:bug: fix minor configuration bugs

:bug: add auth to grpc

:seedling: update deps

:bug: change proto dir in makefile

:seedling: update natun ver

:seedling: go mod tidy

:seedling: add missing header

:seedling: fix gh actions

:sparkles: update deps (& runtime api change)

:bug: fix bugs

:seedling: upgrade pyexp

:seedling: upgrade deps

:bug: temporarily disabling some lint checks
golangci/golangci-lint#2859

👻 rename org

Signed-off-by: AlmogBaku <almog.baku@gmail.com>

👻 rebrand

👻 add missing file

✨ update golang-lint

👻 raptor/raptorml
  • Loading branch information
AlmogBaku committed Feb 6, 2023
0 parents commit 418ee87
Show file tree
Hide file tree
Showing 25 changed files with 3,074 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4

[{*.bash,*.sh,*.zsh}]
indent_size = 2
tab_width = 2

[{*.go,*.go2}]
indent_style = tab

[{*.yaml,*.yml,PROJECT}]
indent_size = 2
35 changes: 35 additions & 0 deletions .github/workflows/allowed-licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: OSS Licenses Check

on:
push: ~
pull_request: ~

jobs:
allowed-licenses:
name: Check for allowed licenses
runs-on: ubuntu-latest
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: '^1.18'
- name: Clone the code
uses: actions/checkout@v3
- name: Install google/go-licenses
run: go install github.com/google/go-licenses@master
shell: bash
- name: Check for licenses
run: ./hack/licenses-check-allowed.sh
shell: bash
- name: Report failure
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-issue'
repo: raptor-ml/raptor
token: ${{ secrets.ACTIONS_PAT }}
title: 🛑 Disallowed licence for ${{ github.sha }}
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
labels: bug
30 changes: 30 additions & 0 deletions .github/workflows/license-header.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: License Header

on:
push: ~
pull_request: ~

jobs:
license-header:
name: Check if the Licence Header is present in all the go files
runs-on: ubuntu-latest
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Clone the code
uses: actions/checkout@v3
- name: Check for license header
env:
GITHUB: true
run: ./hack/check-headers-for-license.sh
shell: bash
- name: Report failure
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-issue'
repo: raptor-ml/raptor
token: ${{ secrets.ACTIONS_PAT }}
title: 🐛 License header missing for ${{ github.sha }}
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
labels: bug
48 changes: 48 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Lint

# Trigger the workflow on pull requests and direct pushes to any branch
on:
push: ~
pull_request: ~

jobs:

lint:
name: golangci-lint
runs-on: ubuntu-latest
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: '^1.18'
- name: Clone the code
uses: actions/checkout@v3
- name: Cache go dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: latest # Always uses the latest patch version.
only-new-issues: true # Show only new issues if it's a pull request
skip-pkg-cache: true
skip-build-cache: true
args: --timeout=5m
- name: Report failure
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions-cool/issues-helper@v3
with:
actions: 'create-issue'
token: ${{ secrets.ACTIONS_PAT }}
repo: raptor-ml/raptor
title: 🐛 Lint failed for ${{ github.sha }}
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
labels: bug, component/streaming
97 changes: 97 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Release

on:
workflow_dispatch:
inputs:
release_type:
default: alpha
description: What type of release is this?
required: true
type: choice
options:
- alpha
- beta
- rc
- stable

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prerelease prep
id: prerelease
run: |
if [ "${{ github.event.inputs.release_type }}" == "stable" ]; then
echo "::set-output name=version_format::v\${major}.\${minor}.\${patch}"
echo "::set-output name=prerelease::false"
else
echo "::set-output name=prerelease::true"
echo "::set-output name=version_format::v\${major}.\${minor}.\${patch}-${{ github.event.inputs.release_type }}\${increment}"
fi
shell: bash
- name: Calculate Semver
uses: paulhatch/semantic-version@v5.0.0-alpha
id: version
with:
# The prefix to use to identify tags
tag_prefix: "v"
major_pattern: "/^(:warning:|⚠/).*/"
# Same as above except indicating a minor change, supports regular expressions wrapped with '/'
minor_pattern: "/^(:sparkles:|✨).*/"
# A string to determine the format of the version output
version_format: "${{ steps.prerelease.outputs.version_format }}"
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: '^1.18'
- name: Build project
run: |
make lint build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta_core
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
- name: Build & Push
uses: docker/build-push-action@v2
with:
context: .
file: hack/release.Dockerfile
target: runner
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_runtime.outputs.tags }}
labels: ${{ steps.meta_runtime.outputs.labels }}
- name: Tag
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ steps.version.outputs.version }}',
sha: context.sha
})
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.version }}
prerelease: ${{ steps.prerelease.outputs.prerelease }}
name: Version ${{ steps.version.outputs.version }}
15 changes: 15 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
days-before-stale: 60
days-before-close: 14
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
20 changes: 20 additions & 0 deletions .github/workflows/verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Verifier

on:
# NB: using `pull_request_target` runs this in the context of
# the base repository, so it has permission to upload to the checks API.
# This means changes won't kick in to this file until merged onto the
# main branch.
pull_request_target:
types: [ opened, edited, reopened, synchronize ]

jobs:
verify:
runs-on: ubuntu-latest
name: verify PR contents
steps:
- name: Verifier action
id: verifier
uses: kubernetes-sigs/kubebuilder-release-tools@v0.1.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
gen/

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
bin
testbin/*

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Kubernetes Generated files - skip generated files, except for vendored files

!vendor/**/zz_generated.*

# editor and IDE paraphernalia
.idea
*.swp
*.swo
*~
7 changes: 7 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
run:
tests: false
timeout: 5m

linters:
disable:
- unused
Loading

0 comments on commit 418ee87

Please sign in to comment.