Skip to content

Commit c7aa2cf

Browse files
authored
Merge branch 'main' into fixconn
2 parents 853315a + 8fa2015 commit c7aa2cf

5 files changed

Lines changed: 67 additions & 4 deletions

File tree

.github/workflows/ci-pr-checks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ jobs:
363363
E2E_LABEL_FILTER: ${{ matrix.suite.label-filter }}
364364
PULL_SIDECAR_IMAGE: "false"
365365
PULL_VLLM_RENDER_IMAGE: "false"
366+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
366367
run: make test-e2e-gaie-run
367368

368369
e2e-router:
@@ -450,4 +451,5 @@ jobs:
450451
E2E_LABEL_FILTER: ${{ matrix.suite.label-filter }}
451452
LOAD_VLLM_RENDER_IMAGE: ${{ matrix.suite.needs-renderer }}
452453
PULL_VLLM_RENDER_IMAGE: "false"
454+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
453455
run: make test-e2e-router-run

.github/workflows/ci-release.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,43 @@ jobs:
5151
tag: ${{ needs.set-params.outputs.tag }}
5252
prerelease: ${{ fromJSON(needs.set-params.outputs.prerelease) }}
5353
chart-suffix: ""
54+
55+
upload-artifacts:
56+
needs: set-params
57+
runs-on: ubuntu-latest
58+
permissions:
59+
contents: write
60+
steps:
61+
- name: Checkout source
62+
uses: actions/checkout@v6
63+
64+
- name: Set up Go
65+
uses: actions/setup-go@v5
66+
with:
67+
go-version-file: go.mod
68+
69+
- name: Setup Kubectl
70+
uses: azure/setup-kubectl@v4
71+
with:
72+
version: 'latest'
73+
74+
- name: Build Artifacts
75+
run: |
76+
make artifacts
77+
78+
- name: Upload Release Assets
79+
env:
80+
GITHUB_TOKEN: ${{ github.token }}
81+
run: |
82+
files=$(find artifacts -type f -size +0c | tr '\n' ' ')
83+
if [ -z "$files" ]; then
84+
echo "No artifacts to upload."
85+
exit 0
86+
fi
87+
if gh release view "${{ needs.set-params.outputs.tag }}" >/dev/null 2>&1; then
88+
gh release upload "${{ needs.set-params.outputs.tag }}" $files --clobber
89+
else
90+
echo "Release ${{ needs.set-params.outputs.tag }} does not exist. Creating a draft release..."
91+
gh release create "${{ needs.set-params.outputs.tag }}" $files --draft --title "${{ needs.set-params.outputs.tag }}" --notes "Release ${{ needs.set-params.outputs.tag }}"
92+
fi
93+

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ endif
122122
# Should we pass ALL env vars here?
123123
E2E_ENV_VARS = EPP_IMAGE VLLM_IMAGE SIDECAR_IMAGE VLLM_RENDER_IMAGE \
124124
E2E_KEEP_CLUSTER_ON_FAILURE E2E_PORT E2E_METRICS_PORT K8S_CONTEXT READY_TIMEOUT \
125-
E2E_LABEL_FILTER LOAD_VLLM_RENDER_IMAGE
125+
E2E_LABEL_FILTER LOAD_VLLM_RENDER_IMAGE HF_TOKEN
126126
BUILDER_E2E_ENV_FLAGS = $(foreach v,$(E2E_ENV_VARS),$(if $($(v)),-e '$(v)=$($(v))'))
127127
ifneq ($(filter command line environment,$(origin NAMESPACE)),)
128128
BUILDER_E2E_ENV_FLAGS += -e NAMESPACE=$(NAMESPACE)
@@ -360,6 +360,19 @@ helm-push-standalone: ## Package and push the llm-d-router-standalone Helm chart
360360
$(MAKE) helm-push CHART=llm-d-router-standalone
361361

362362

363+
##@ Release
364+
365+
.PHONY: artifacts
366+
artifacts: yq check-kustomize ## Generate release artifacts (CRD manifests)
367+
if [ -d artifacts ]; then rm -rf artifacts; fi
368+
mkdir -p artifacts
369+
kubectl kustomize config/crd > artifacts/manifests_all.yaml
370+
$(YQ) -P 'select(.spec.group == "llm-d.ai")' artifacts/manifests_all.yaml > artifacts/manifests.yaml
371+
rm -f artifacts/manifests_all.yaml
372+
$(YQ) -P 'select(.spec.versions | map(.name == "v1") | any)' artifacts/manifests.yaml > artifacts/v1-manifests.yaml
373+
$(YQ) -P 'select(.spec.versions | map(.name != "v1") | all)' artifacts/manifests.yaml > artifacts/experimental-manifests.yaml
374+
375+
363376
##@ Coverage
364377

365378
COVERAGE_DIR ?= coverage

test/e2e/setup_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"io"
66
"net/http"
7+
"os"
78
"strconv"
89
"time"
910

@@ -31,7 +32,7 @@ func createModelServersFromKustomize(kustomizeDir string, extra map[string]strin
3132
"${DECODE_ROLE}": "",
3233
"${EPP_NAME}": "e2e-epp",
3334
"${NAMESPACE}": nsName,
34-
"${HF_TOKEN}": "",
35+
"${HF_TOKEN}": os.Getenv("HF_TOKEN"),
3536
"${VLLM_EXTRA_ARGS_E}": "",
3637
"${VLLM_EXTRA_ARGS_P}": "",
3738
"${VLLM_EXTRA_ARGS_D}": "",

test/e2e/utils_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io"
88
"net/http"
9+
"os"
910
"os/exec"
1011
"strconv"
1112
"strings"
@@ -193,9 +194,15 @@ func removeEmptyLabels(inputs []string) []string {
193194
}
194195

195196
func isModelReal(modelName string) bool {
196-
url := "https://huggingface.co/api/models/" + modelName
197+
req, err := http.NewRequest("GET", "https://huggingface.co/api/models/"+modelName, nil)
198+
if err != nil {
199+
return false
200+
}
201+
if token := os.Getenv("HF_TOKEN"); token != "" {
202+
req.Header.Set("Authorization", "Bearer "+token)
203+
}
197204

198-
resp, err := http.Get(url)
205+
resp, err := http.DefaultClient.Do(req)
199206
if err != nil {
200207
return false
201208
}

0 commit comments

Comments
 (0)