From 377b23813f82ee6425861186937e04dabe2e9144 Mon Sep 17 00:00:00 2001 From: Eric Mariasis Date: Sat, 1 Feb 2025 15:21:13 -0500 Subject: [PATCH 1/4] docs: removal of deprecated kubectl command in installation.md (#264) **Commit Message**: Removal of deprecated kubectl command below from [the installation getting started guide](https://github.com/envoyproxy/ai-gateway/blob/main/site/docs/getting-started/installation.md). `kubectl wait --timeout=2m -n envoy-ai-gateway-system deployment/ai-gateway-controller --for=create ` It seems to include a deprecated arg ```--for=create``` **Related Issues/PRs (if applicable)**: Fixes [Issue 262](https://github.com/envoyproxy/ai-gateway/issues/262) **Special notes for reviewers (if applicable)**: Signed-off-by: ericmariasis --- site/docs/getting-started/installation.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/site/docs/getting-started/installation.md b/site/docs/getting-started/installation.md index 5325feae5..8983116a2 100644 --- a/site/docs/getting-started/installation.md +++ b/site/docs/getting-started/installation.md @@ -19,8 +19,6 @@ helm upgrade -i aieg oci://ghcr.io/envoyproxy/ai-gateway/ai-gateway-helm \ --namespace envoy-ai-gateway-system \ --create-namespace -kubectl wait --timeout=2m -n envoy-ai-gateway-system deployment/ai-gateway-controller --for=create - kubectl wait --timeout=2m -n envoy-ai-gateway-system deployment/ai-gateway-controller --for=condition=Available ``` From 5f65fb58519df1dac8c3f83acf4733d12b1fb580 Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Sat, 1 Feb 2025 13:16:40 -0800 Subject: [PATCH 2/4] chore: fixes PR style check (#266) **Commit Message** This makes the PR style check stricter than before: * The description's first line must be `**Commit Message**` * The PR title length must be less than 53 characters --------- Signed-off-by: Takeshi Yoneda --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++--- .github/workflows/pr_title_check.yaml | 30 ++++++++++++++++++++------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9af24f5de..e1efee589 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -**Commit Message**: +**Commit Message** -**Related Issues/PRs (if applicable)**: +**Related Issues/PRs (if applicable)** -**Special notes for reviewers (if applicable)**: +**Special notes for reviewers (if applicable)** " ]]; then + if [[ $BODY =~ "-->" ]]; then echo "PR description contains '-->'. Please remove all the comment out lines in the template after carefully reading them." exit 1 fi - if [[ ! $TITLE =~ "**Commit Message**:" ]]; then - echo "PR description must begin with '**Commit Message**:'." - exit 1 + first_line=$(echo -n "$BODY" | head -n 1) + trimmed_first_line=$(echo "$first_line" | sed 's/[[:space:]]*$//') + echo "$trimmed_first_line='$trimmed_first_line'" + if [[ "$trimmed_first_line" != "**Commit Message**" ]]; then + echo "The first line of the PR description must be '**Commit Message**'" + exit 1 fi title: @@ -63,3 +66,16 @@ jobs: The subject "{subject}" found in the pull request title "{title}" didn't match the configured pattern. Please ensure that the subject doesn't start with an uppercase character. + + - name: Check length of PR title + env: + # Do not use ${{ github.event.pull_request.title }} directly in run command. + TITLE: ${{ github.event.pull_request.title }} + # We want to make sure that each commit "subject" is under 53 characters not to + # be truncated in the git log as well as in the GitHub UI. + # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=bc7938deaca7f474918c41a0372a410049bd4e13#n664 + run: | + if (( ${#TITLE} >= 53 )); then + echo "The PR title is too long. Please keep it under 52 characters." + exit 1 + fi From 59de25ea011310620e59387111a1958a98a131ed Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Sat, 1 Feb 2025 13:41:44 -0800 Subject: [PATCH 3/4] ci: cleanup PR Style Check GHA (#268) **Commit Message** This refactors the PR style check github workflow. * Renamed the file to match the workflow name. * Split the description checks into multiple runs. Signed-off-by: Takeshi Yoneda --- .../{pr_title_check.yaml => pr_style_check.yaml} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename .github/workflows/{pr_title_check.yaml => pr_style_check.yaml} (90%) diff --git a/.github/workflows/pr_title_check.yaml b/.github/workflows/pr_style_check.yaml similarity index 90% rename from .github/workflows/pr_title_check.yaml rename to .github/workflows/pr_style_check.yaml index eec45b9ea..a53179207 100644 --- a/.github/workflows/pr_title_check.yaml +++ b/.github/workflows/pr_style_check.yaml @@ -14,11 +14,11 @@ jobs: description: name: Description runs-on: ubuntu-latest + env: + # Do not use ${{ github.event.pull_request.body }} directly in run command. + BODY: ${{ github.event.pull_request.body }} steps: - - name: Check PR description - env: - # Do not use ${{ github.event.pull_request.body }} directly in run command. - BODY: ${{ github.event.pull_request.body }} + - name: Check comment out lines run: | if [[ $BODY =~ "'. Please remove all the comment out lines in the template after carefully reading them." exit 1 fi + - name: Check the first line matches '**Commit Message**' + run: | first_line=$(echo -n "$BODY" | head -n 1) trimmed_first_line=$(echo "$first_line" | sed 's/[[:space:]]*$//') echo "$trimmed_first_line='$trimmed_first_line'" From c7d0187d7b3ab33c499a4a1cf7a26e1fa50da9dd Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Sat, 1 Feb 2025 14:00:24 -0800 Subject: [PATCH 4/4] ci: relaxes PR title length check (#269) **Commit Message** This follows up on #266 and relaxes the PR title length restriction to 60 characters. It was too strict. Signed-off-by: Takeshi Yoneda --- .github/workflows/pr_style_check.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_style_check.yaml b/.github/workflows/pr_style_check.yaml index a53179207..e01b56903 100644 --- a/.github/workflows/pr_style_check.yaml +++ b/.github/workflows/pr_style_check.yaml @@ -73,11 +73,11 @@ jobs: env: # Do not use ${{ github.event.pull_request.title }} directly in run command. TITLE: ${{ github.event.pull_request.title }} - # We want to make sure that each commit "subject" is under 53 characters not to + # We want to make sure that each commit "subject" is under 60 characters not to # be truncated in the git log as well as in the GitHub UI. # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=bc7938deaca7f474918c41a0372a410049bd4e13#n664 run: | - if (( ${#TITLE} >= 53 )); then - echo "The PR title is too long. Please keep it under 52 characters." + if (( ${#TITLE} >= 60 )); then + echo "The PR title is too long. Please keep it under 60 characters." exit 1 fi