Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ba42b8c
check-npu
cllouud Jun 9, 2025
2100fd6
Merge pull request #1 from ascend-gha-runners/feature/check-npu
cllouud Jul 11, 2025
5f44a8c
feat: add preferred pod affinity
jlcoo Aug 28, 2025
f44eaad
Merge pull request #2 from ascend-gha-runners/feature/preferred_affinity
jlcoo Aug 28, 2025
af25185
feat: add preferred pod affinity for app pod
jlcoo Aug 29, 2025
9f7d501
Merge pull request #3 from ascend-gha-runners/feature/preferred_affinity
cllouud Aug 29, 2025
e923dab
fix: change format
jlcoo Aug 30, 2025
3782a2e
Merge pull request #4 from ascend-gha-runners/feature/preferred_affinity
Goalina Aug 30, 2025
5515fb9
feat: delete check npu script
jlcoo Sep 1, 2025
cc1bcd0
Merge pull request #5 from ascend-gha-runners/feature/preferred_affinity
Goalina Sep 2, 2025
7b378c0
feat: upgrade actions runner image (#6)
jlcoo Sep 8, 2025
6421740
upgrade runner image (#7)
pkking Dec 14, 2025
33b390a
feat: sync upstream main + opensourceways release/no_volumes into main
Longwt123 Jul 17, 2026
f1e89a5
ci: add vitest coverage config for diff-cover (clover.xml at root)
Longwt123 Jul 17, 2026
78308d8
test(k8s): add vitest spec files for coverage gate
Longwt123 Jul 17, 2026
959ff4a
fix: exclude spec files from tsc build; move specs into utils/ for CI…
Longwt123 Jul 17, 2026
4e1e869
fix: resolve CI build and lint errors in PR #25
Longwt123 Jul 17, 2026
339e51f
style: fix prettier formatting in exec-pod-step-with-output-test
Longwt123 Jul 17, 2026
eebebdc
test: fix waitForPodPhases timeout in error-serialization tests
Longwt123 Jul 17, 2026
7bbb7c4
test: fix double-quoting in run-container-step env tests
Longwt123 Jul 20, 2026
3fbb09c
fix: resolve module loading errors in vitest coverage CI
Longwt123 Jul 20, 2026
c885ba9
test: extend coverage for heartbeat/prepare-job/run-container-step/k8…
Longwt123 Jul 20, 2026
56be393
fix(build): exclude spec files and add skipLibCheck to docker/hooklib…
Longwt123 Jul 20, 2026
667e77d
fix(lint): fix no-floating-promises + no-unused-vars in spec files
Longwt123 Jul 20, 2026
21ff8f3
fix(test): fix docker jest type errors and improve k8s unit coverage
Longwt123 Jul 20, 2026
9023f82
style: fix prettier formatting in k8s-index.spec.ts
Longwt123 Jul 20, 2026
79e5ef3
fix(build): revert bootstrap from npm ci to npm install
Longwt123 Jul 22, 2026
ab6f596
fix(k8s): downgrade @babel/core and @babel/preset-env to ^7.x
Longwt123 Jul 22, 2026
4151720
fix(hooklib): remove peer:true fields from package-lock.json
Longwt123 Jul 22, 2026
c3a50d1
!25 Update main sync
opensourceways-bot Jul 23, 2026
8fc1baa
build(deps-dev): bump baseline-browser-mapping in /packages/docker
dependabot[bot] Sep 11, 2026
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
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

56 changes: 0 additions & 56 deletions .eslintrc.json

This file was deleted.

28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2

updates:
# Group updates into a single PR per workspace package
- package-ecosystem: npm
directory: "/packages/docker"
schedule:
interval: weekly
groups:
all-dependencies:
patterns:
- "*"
- package-ecosystem: npm
directory: "/packages/hooklib"
schedule:
interval: weekly
groups:
all-dependencies:
patterns:
- "*"
- package-ecosystem: npm
directory: "/packages/k8s"
schedule:
interval: weekly
groups:
all-dependencies:
patterns:
- "*"
69 changes: 59 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,75 @@ on:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
build:
format-and-lint:
name: Format & Lint Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sed -i "s|{{PATHTOREPO}}|$(pwd)|" packages/k8s/tests/test-kind.yaml
name: Setup kind cluster yaml config
- uses: helm/kind-action@v1.2.0
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
config: packages/k8s/tests/test-kind.yaml
- run: npm install
node-version: 24
cache: npm
- run: node --version && npm --version
name: Log Node and npm versions
- run: npm ci
name: Install dependencies
- run: npm run bootstrap
name: Bootstrap the packages
- run: npm run build-all
name: Build packages
- run: npm run format-check
name: Check formatting
- name: Check linter
run: |
npm run lint
git diff --exit-code -- ':!packages/k8s/tests/test-kind.yaml'
- name: Run tests
run: npm run test
git diff --exit-code -- . ':!packages/k8s/tests/test-kind.yaml'

docker-tests:
name: Docker Hook Tests
runs-on: ubuntu-latest
needs: format-and-lint
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: node --version && npm --version
name: Log Node and npm versions
- run: npm ci
name: Install dependencies
- run: npm run bootstrap
name: Bootstrap the packages
- run: npm run build-all
name: Build packages
- name: Run Docker tests
run: npm run test --prefix packages/docker

k8s-tests:
name: Kubernetes Hook Tests
runs-on: ubuntu-latest
needs: format-and-lint
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: sed -i "s|{{PATHTOREPO}}|$(pwd)|" packages/k8s/tests/test-kind.yaml
name: Setup kind cluster yaml config
- uses: helm/kind-action@v1.12.0
with:
config: packages/k8s/tests/test-kind.yaml
- run: node --version && npm --version
name: Log Node and npm versions
- run: npm ci
name: Install dependencies
- run: npm run bootstrap
name: Bootstrap the packages
- run: npm run build-all
name: Build packages
- name: Run Kubernetes tests
run: npm run test --prefix packages/k8s
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm install

Expand All @@ -21,7 +25,7 @@ jobs:
- name: Build packages
run: npm run build-all

- uses: actions/github-script@v7
- uses: actions/github-script@v8
id: releaseVersion
with:
result-encoding: string
Expand All @@ -47,7 +51,7 @@ jobs:

- name: Create release notes
id: releaseNotes
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @actions/actions-launch
* @github/actions-runtime @nikola-jokic
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/node:latest AS runner_builder

WORKDIR /app

COPY . /app/

RUN npm install && npm run bootstrap && npm run build-all

FROM ghcr.nju.edu.cn/actions/actions-runner:2.334.0

COPY --from=runner_builder /app/packages/k8s/dist/index.js /home/runner/k8s/index.js

USER runner
20 changes: 20 additions & 0 deletions READ-check-npu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 背景
昇腾CI bug: [pod初始化报错8020](https://github.com/ascend-gha-runners/docs/issues/11)

# 解决思路
Github ARC 创建 container pod 的源码是[runner-container-hooks](https://github.com/actions/runner-container-hooks)

我们 fork runner-container-hooks 仓库,修改源码,使得每次执行workflow之前先循环检查npu-smi命令。

# 实现流程
1. 集群中配置[configmap](https://github.com/opensourceways/ascend-ci-deployment/blob/main/cllouud/vllm-ascend/config/pre-execute-script-check-npu-configmap.yaml),check.sh脚本检查npu-smi命令。

2. 使用以下命令构建本仓库。
```bash
npm run bootstrap

npm run build-all
```
3. 构建完成后,将`./packages/k8s/dist/index.js`放入`pvc`,`pvc`挂载到`runner pod`,使用`initContainers`替换默认index.js文件。


129 changes: 129 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
const eslint = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsparser = require('@typescript-eslint/parser');
const globals = require('globals');
const pluginJest = require('eslint-plugin-jest');

module.exports = [
eslint.configs.recommended,
{
files: ['**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: ['./tsconfig.json', './packages/*/tsconfig.json']
},
globals: {
...globals.node,
...globals.es6
}
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
// Disabled rules from original config
'eslint-comments/no-use': 'off',
'import/no-namespace': 'off',
'no-constant-condition': 'off',
'no-unused-vars': 'off',
'i18n-text/no-en': 'off',
'camelcase': 'off',
'semi': 'off',
'no-shadow': 'off',

// TypeScript ESLint rules
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}
],
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'off', // Fixed: removed duplicate and kept only this one
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/prefer-function-type': 'warn',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/no-shadow': ['error']
}
},
{
// Test files configuration - Fixed file pattern to match .ts files
files: ['**/*test*.ts', '**/*spec*.ts', '**/tests/**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: ['./tsconfig.json', './packages/*/tsconfig.json']
},
globals: {
...globals.node,
...globals.es6,
// Fixed Jest globals
describe: 'readonly',
it: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
jest: 'readonly'
}
},
plugins: {
'@typescript-eslint': tseslint,
jest: pluginJest
},
rules: {
// Disable no-undef for test files since Jest globals are handled above
'no-undef': 'off',
// Relax some rules for test files
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-function-return-type': 'off'
}
},
{
files: ['**/jest.config.js', '**/jest.setup.js'],
languageOptions: {
globals: {
...globals.node,
jest: 'readonly',
module: 'writable'
}
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
'import/no-commonjs': 'off'
}
}
];
Loading
Loading