Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Bump go version to 1.21 #303

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
81fb954
feat: bump go version
ishaansehgal99 Mar 18, 2024
723b228
Merge branch 'main' into Ishaan/bump-go
ishaansehgal99 Mar 19, 2024
d0498a0
fix: Upgrade FastAPI Version (#305)
ishaansehgal99 Mar 19, 2024
e1673aa
ci: Update pipeline target
helayoty Mar 19, 2024
2485c58
docs: Update README.md for announcing v0.2.1 (#307)
Fei-Guo Mar 20, 2024
4ba337d
feat: Part 2 - Add validation checks for TuningSpec, DataSource, Data…
ishaansehgal99 Mar 20, 2024
e69f8bf
fix: Fix typo in Makefile (#315)
davefellows Mar 25, 2024
10af81a
docs: Update README.md to correct the mail list (#317)
Fei-Guo Mar 25, 2024
2f0323a
chore: Add GitHub issue/PR templates (#316)
helayoty Mar 26, 2024
99b7d57
fix: Adjust default model params (#310)
ishaansehgal99 Mar 26, 2024
8eddac3
fix: Update Model Tags (#311)
ishaansehgal99 Mar 26, 2024
d079f36
ci: Update release workflow (#319)
helayoty Mar 29, 2024
2df7725
fix: Update helm chart to use Release.Namespace (#322)
helayoty Mar 29, 2024
8d0976f
release: update manifest and helm charts for v0.2.2 (#324)
helayoty Mar 29, 2024
c49b93a
ci: Remove PR trigger from release workflow (#330)
helayoty Apr 1, 2024
ee9101a
fix: Add registry as a pipeline job output (#329)
helayoty Apr 1, 2024
08dd1f4
feat: Initialize Fine-Tuning Interface and Core Methods - Part 3 (#308)
ishaansehgal99 Apr 1, 2024
05fb90c
feat: Add sample front end helm chart (#320)
ishaansehgal99 Apr 1, 2024
cf7cf94
feat: Add API Docs and Improve Inference Readability (#331)
ishaansehgal99 Apr 1, 2024
77aa95b
chore: Factoring out reusable presets logic - Part 4 (#332)
ishaansehgal99 Apr 2, 2024
fde6369
fix: Update namespace in the helm chart (#337)
helayoty Apr 4, 2024
64152d4
fix: Add preset nil checks (#347)
ishaansehgal99 Apr 10, 2024
f88b529
feat: Add default configmaps - Part 5 (#346)
ishaansehgal99 Apr 10, 2024
9e2ac24
chore: Add utils functions and move tests into seperate package (#351)
ishaansehgal99 Apr 16, 2024
e2f5e25
feat: Add global client, accessible via webhooks (#353)
ishaansehgal99 Apr 16, 2024
65a99da
chore: naming nit preset-inferences.go
ishaansehgal99 Apr 17, 2024
e799d62
feat: Add few util functions (#354)
ishaansehgal99 Apr 17, 2024
bf4acba
feat: Update CRD to add Volume and ConfigTemplate (#356)
Fei-Guo Apr 18, 2024
6be8a0d
feat: Simple Configmap Validation Checks - Part 6 (#355)
ishaansehgal99 Apr 19, 2024
0b63598
feat: Setup Preset Tuning Util Functions and miscellaneous validation…
ishaansehgal99 Apr 25, 2024
aa89d20
feat: [SKU modularization] sku handler interface (#357)
smritidahal653 Apr 25, 2024
9342647
test: Add UTs for invalid image source or destination (#359)
ishaansehgal99 Apr 25, 2024
c2614a2
Merge branch 'Ishaan/bump-go' of https://github.com/Azure/kaito into …
ishaansehgal99 Apr 25, 2024
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
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest a new feature for Kaito
title: ''
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

**Describe the solution you'd like**

**Describe alternatives you've considered**

**Additional context**
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/report_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**

**Steps To Reproduce**

**Expected behavior**

**Logs**

**Environment**

- Kubernetes version (use `kubectl version`):
- OS (e.g: `cat /etc/os-release`):
- Install tools:
- Others:

**Additional context**
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Reason for Change**:
<!-- What does this PR improve or fix in Kaito? Why is it needed? -->

**Requirements**

- [ ] added unit tests and e2e tests (if applicable).

**Issue Fixed**:
<!-- If this PR fixes GitHub issue 4321, add "Fixes #4321" to the next line. -->

**Notes for Reviewers**:
2 changes: 1 addition & 1 deletion .github/workflows/build-publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

env:
REGISTRY: ghcr.io
GO_VERSION: '1.20'
GO_VERSION: '1.21'
IMAGE_NAME: 'workspace'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
fetch-depth: 0
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Create release
on:
workflow_run:
workflows: [ "Create, Scan and Publish KAITO image" ]
types: [completed]
branches: [release-**]
repository_dispatch:
types: [ release-tag ]
branches: [ release-** ]
types: [ create-release ]

permissions:
id-token: write
Expand All @@ -18,19 +13,20 @@ env:

jobs:
create-release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout the repository at the given SHA from the artifact
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
fetch-depth: 0
Expand All @@ -43,3 +39,4 @@ jobs:
args: release --rm-dist --timeout 60m --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.event.client_payload.tag }}
Original file line number Diff line number Diff line change
@@ -1,40 +1,66 @@
name: e2e-test

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: kaito-e2e-workflow

on:
push:
branches: [main]
paths-ignore: ['docs/**', '**.md', '**.mdx', '**.png', '**.jpg']
pull_request:
branches: [main]
paths-ignore: ['docs/**', '**.md', '**.mdx', '**.png', '**.jpg']
repository_dispatch:
types: [ release-tag ]
branches: [ release-** ]

env:
GO_VERSION: "1.20"
workflow_call:
inputs:
git_sha:
type: string
required: true
tag:
type: string
isRelease:
type: boolean
default: false
registry:
type: string
region:
type: string
description: "the azure location to run the e2e test in"
default: "eastus"
k8s_version:
type: string
default: "1.27"
secrets:
E2E_CLIENT_ID:
required: true
E2E_TENANT_ID:
required: true
E2E_SUBSCRIPTION_ID:
required: true
E2E_AMRT_SECRET_NAME:
required: true
E2E_ACR_AMRT_USERNAME:
required: true
E2E_ACR_AMRT_PASSWORD:
required: true

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
e2e-tests:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # This is required for requesting the JWT
environment: e2e-test
env:
GO_VERSION: "1.20"

steps:
- name: Shorten SHA
if: ${{ !github.event.client_payload.isRelease }}
id: vars
run: echo "pr_sha_short=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_OUTPUT
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ inputs.git_sha }}

- name: Set e2e Resource and Cluster Name
run: |
rand=${{ steps.vars.outputs.pr_sha_short }}
rand=$(git rev-parse --short ${{ inputs.git_sha }})

if [ "$rand" = "" ]; then
rand=$RANDOM
Expand All @@ -46,36 +72,22 @@ jobs:
echo "REGISTRY=kaito${rand}.azurecr.io" >> $GITHUB_ENV

- name: Set Registry
if: ${{ github.event.client_payload.isRelease }}
if: ${{ inputs.isRelease }}
run: |
echo "REGISTRY=${{ github.event.client_payload.registry }}" >> $GITHUB_ENV
echo "VERSION=$(echo ${{ github.event.client_payload.tag }} | tr -d v)" >> $GITHUB_ENV
echo "REGISTRY=${{ inputs.registry }}" >> $GITHUB_ENV
echo "VERSION=$(echo ${{ inputs.tag }} | tr -d v)" >> $GITHUB_ENV

- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout
if: ${{ !github.event.client_payload.isRelease }}
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Checkout
uses: actions/checkout@v4
if: ${{ github.event.client_payload.isRelease }}
with:
fetch-depth: 0
submodules: true
ref: ${{ env.REPO_TAG }}

- uses: azure/[email protected]
- name: Az login
uses: azure/login@8c334a195cbb38e46038007b304988d888bf676a # v2.0.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
client-id: ${{ secrets.E2E_CLIENT_ID }}
tenant-id: ${{ secrets.E2E_TENANT_ID }}
subscription-id: ${{ secrets.E2E_SUBSCRIPTION_ID }}

- uses: azure/setup-helm@v4
with:
Expand Down Expand Up @@ -104,7 +116,7 @@ jobs:
az identity create --name gpuIdentity --resource-group ${{ env.CLUSTER_NAME }}

- name: build KAITO image
if: ${{ !github.event.client_payload.isRelease }}
if: ${{ !inputs.isRelease }}
shell: bash
run: |
make docker-build-kaito
Expand All @@ -120,6 +132,8 @@ jobs:
AZURE_ACR_NAME: ${{ env.CLUSTER_NAME }}
AZURE_RESOURCE_GROUP: ${{ env.CLUSTER_NAME }}
AZURE_CLUSTER_NAME: ${{ env.CLUSTER_NAME }}
AZURE_LOCATION: ${{ inputs.region }}
AKS_K8S_VERSION: ${{ inputs.k8s_version }}

- name: Install gpu-provisioner helm chart
shell: bash
Expand All @@ -130,18 +144,18 @@ jobs:
AZURE_RESOURCE_GROUP: ${{ env.CLUSTER_NAME }}
AZURE_CLUSTER_NAME: ${{ env.CLUSTER_NAME }}

- uses: azure/login@v1.6.1
- uses: azure/login@8c334a195cbb38e46038007b304988d888bf676a # v2.0.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
client-id: ${{ secrets.E2E_CLIENT_ID }}
tenant-id: ${{ secrets.E2E_TENANT_ID }}
subscription-id: ${{ secrets.E2E_SUBSCRIPTION_ID }}

- name: Create Role Assignment
uses: azure/[email protected]
with:
inlineScript: |
IDENTITY_PRINCIPAL_ID="$(az identity show --name gpuIdentity --resource-group ${{ env.CLUSTER_NAME }} --query 'principalId' -otsv)"
az role assignment create --assignee ${IDENTITY_PRINCIPAL_ID} --scope "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CLUSTER_NAME }}" --role "Contributor"
az role assignment create --assignee ${IDENTITY_PRINCIPAL_ID} --scope "/subscriptions/${{ secrets.E2E_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CLUSTER_NAME }}" --role "Contributor"

- name: Create Azure Federated Identity
uses: azure/[email protected]
Expand All @@ -164,10 +178,10 @@ jobs:

- name: Add Secret Credentials
run: |
kubectl create secret docker-registry ${{secrets.AMRT_SECRET_NAME}} \
--docker-server=${{secrets.ACR_AMRT_USERNAME}}.azurecr.io \
--docker-username=${{secrets.ACR_AMRT_USERNAME}} \
--docker-password=${{secrets.ACR_AMRT_PASSWORD}}
kubectl create secret docker-registry ${{ secrets.E2E_AMRT_SECRET_NAME }} \
--docker-server=${{ secrets.E2E_ACR_AMRT_USERNAME }}.azurecr.io \
--docker-username=${{ secrets.E2E_ACR_AMRT_USERNAME }} \
--docker-password=${{ secrets.E2E_ACR_AMRT_PASSWORD }}

- name: Log kaito-workspace
run: |
Expand All @@ -179,8 +193,8 @@ jobs:
env:
AZURE_CLUSTER_NAME: ${{ env.CLUSTER_NAME }}
RUN_LLAMA_13B: ${{ env.RUN_LLAMA_13B }}
AI_MODELS_REGISTRY: ${{secrets.ACR_AMRT_USERNAME}}.azurecr.io
AI_MODELS_REGISTRY_SECRET: ${{secrets.AMRT_SECRET_NAME}}
AI_MODELS_REGISTRY: ${{ secrets.E2E_ACR_AMRT_USERNAME }}.azurecr.io
AI_MODELS_REGISTRY_SECRET: ${{ secrets.E2E_AMRT_SECRET_NAME }}

- name: Cleanup e2e resources
if: ${{ always() }}
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: publish_helm_chart

on:
workflow_run:
workflows: [ "Create, Scan and Publish KAITO image" ]
types: [ completed ]
branches: [ release-** ]
repository_dispatch:
types: [ create-release ]

permissions:
id-token: write # This is required for requesting the JWT
Expand All @@ -15,15 +13,15 @@ permissions:
pull-requests: read

jobs:
release:
publish-helm:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
fetch-depth: 0
ref: ${{ github.event.client_payload.tag }}

- name: Publish Workspace Helm chart
uses: stefanprodan/[email protected]
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/kaito-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pr-e2e-test

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:
paths-ignore: ['docs/**', '**.md', '**.mdx', '**.png', '**.jpg']

env:
GO_VERSION: "1.20"

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
run-e2e:
uses: ./.github/workflows/e2e-workflow.yml
with:
git_sha: ${{ github.event.pull_request.head.sha }}
secrets:
E2E_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
E2E_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
E2E_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
E2E_AMRT_SECRET_NAME: ${{ secrets.AMRT_SECRET_NAME }}
E2E_ACR_AMRT_USERNAME: ${{ secrets.ACR_AMRT_USERNAME }}
E2E_ACR_AMRT_PASSWORD: ${{ secrets.ACR_AMRT_PASSWORD }}
4 changes: 2 additions & 2 deletions .github/workflows/kind-cluster/determine_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ def check_modified_models(pr_branch):

def main():
pr_branch = os.environ.get("PR_BRANCH", "main") # If not specified default to 'main'
force_run_all = os.environ.get("FORCE_RUN_ALL", False) # If not specified default to False
force_run_all = os.environ.get("FORCE_RUN_ALL", "false") # If not specified default to False

affected_models = []
if force_run_all:
if force_run_all != "false":
affected_models = [model['name'] for model in YAML_PR['models']]
else:
# Logic to determine affected models
Expand Down
Loading
Loading