From 576edaed3fdbcf7f4f76f4f774b0ab28d7c620a9 Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 16:59:45 -0700 Subject: [PATCH 01/17] ci: align pre-commit hooks and GitHub templates Adopt the shared pre-commit baseline: two-line SPDX header, conventional commit message validation (commit-msg stage), and the centralized add-license / add-spdx-license hooks from developer_tools v0.2.0. Run pre-commit CI only on files modified by the PR, and roll out the standard issue templates and the simplified single PR template. TRI-1100 --- .github/ISSUE_TEMPLATE/bug_report.md | 24 ++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++ .github/pull_request_template.md | 23 ++++++++++++ .github/workflows/pre-commit.yml | 27 +------------- .pre-commit-config.yaml | 45 ++++++++++------------- 5 files changed, 88 insertions(+), 51 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..df06a0e5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,24 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Description** +A clear and concise description of what the bug is. + +**Triton Information** +What version of Triton are you using? + +Are you using the Triton container or did you build it yourself? + +**To Reproduce** +Steps to reproduce the behavior. + +Describe the models (framework, inputs, outputs), ideally include the model configuration file (if using an ensemble include the model configuration file for that as well). + +**Expected behavior** +A clear and concise description of what you expected to happen. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..2671e4eb --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,23 @@ + + +#### What does the PR do? + + +#### Related Issues / PRs + + +#### Test plan + + +#### Caveats + + +#### Checklist +- [ ] PR title follows `: ` (conventional commit — enforced by the `conventional-pre-commit` hook) +- [ ] I ran `pre-commit install && pre-commit run --all-files` locally and it passes +- [ ] Copyright header is correct on all changed files +- [ ] External contributors: I have read the [Contribution guidelines](../CONTRIBUTING.md) and signed the [Contributor License Agreement](https://github.com/NVIDIA/triton-inference-server/blob/master/Triton-CCLA-v1.pdf) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4dbce6b1..e52c546f 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,28 +1,5 @@ -# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of NVIDIA CORPORATION nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: BSD-3-Clause name: pre-commit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95efd68e..31a22ec8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,28 +1,7 @@ -# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of NVIDIA CORPORATION nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: BSD-3-Clause + +default_install_hook_types: [pre-commit, commit-msg] repos: - repo: https://github.com/PyCQA/isort @@ -54,6 +33,15 @@ repos: additional_dependencies: [tomli] args: ["--toml", "pyproject.toml"] exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$) +# Validates commit messages against the Conventional Commits format +# (<commit_type>: <title>). Replaces the manual commit-type checklist that +# used to live in the PR template. +- repo: https://github.com/compilerla/conventional-pre-commit + rev: v4.4.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] + args: [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] # More details about these pre-commit hooks here: # https://pre-commit.com/hooks.html - repo: https://github.com/pre-commit/pre-commit-hooks @@ -73,6 +61,11 @@ repos: - id: trailing-whitespace - repo: https://github.com/triton-inference-server/developer_tools - rev: v0.1.0 + rev: v0.2.0 hooks: - id: add-license + # Incremental SPDX-header adoption: migrates each source file to the + # two-line SPDX header the first time it is touched. pre-commit runs hooks + # only on the files staged in a commit, so this rolls SPDX out gradually + # as files change. + - id: add-spdx-license From 1370944e8408c00574e1ca7409afde44684cd651 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:35:00 -0700 Subject: [PATCH 02/17] chore: align SPDX copyright text with NVIDIA Legal boilerplate Legal's Copyright / License Header Guidance specifies the SPDX form without a comma after the year. TRI-1100 --- .github/pull_request_template.md | 2 +- .github/workflows/pre-commit.yml | 2 +- .pre-commit-config.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2671e4eb..3de2b786 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: BSD-3-Clause --> diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index e52c546f..2210ecbe 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause name: pre-commit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31a22ec8..6ed0c4d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause default_install_hook_types: [pre-commit, commit-msg] From c3620069654ea2713bcf4c9c322258149124ad3a Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 22:59:20 -0700 Subject: [PATCH 03/17] ci: drop SPDX adoption and keep long-form license headers Remove the add-spdx-license hook reference and restore the standard long-form NVIDIA BSD header on the files introduced by this branch. The centralized add-license hook (developer_tools v0.2.0) is kept: it excludes .github/ templates and never rewrites LICENSE files. TRI-1100 --- .github/pull_request_template.md | 5 ----- .github/workflows/pre-commit.yml | 27 +++++++++++++++++++++++++-- .pre-commit-config.yaml | 32 +++++++++++++++++++++++++------- 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3de2b786..a79d3bdd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,8 +1,3 @@ -<!-- -SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -SPDX-License-Identifier: BSD-3-Clause ---> - #### What does the PR do? <!-- Describe the change and the motivation behind it. --> diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 2210ecbe..15d0b686 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,5 +1,28 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NVIDIA CORPORATION nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. name: pre-commit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ed0c4d1..9b707cf9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,28 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NVIDIA CORPORATION nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. default_install_hook_types: [pre-commit, commit-msg] @@ -64,8 +87,3 @@ repos: rev: v0.2.0 hooks: - id: add-license - # Incremental SPDX-header adoption: migrates each source file to the - # two-line SPDX header the first time it is touched. pre-commit runs hooks - # only on the files staged in a commit, so this rolls SPDX out gradually - # as files change. - - id: add-spdx-license From 0a0ccc8fcbf2859aa7cde03fbbdf1ad7c7317bd6 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:14:21 -0700 Subject: [PATCH 04/17] ci: bump developer_tools hooks to v0.2.1 TRI-1100 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b707cf9..0eda51d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -84,6 +84,6 @@ repos: - id: trailing-whitespace - repo: https://github.com/triton-inference-server/developer_tools - rev: v0.2.0 + rev: v0.2.1 hooks: - id: add-license From 0d87537dfcfadd75080a504cc110924afd4a2b35 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:26:25 -0700 Subject: [PATCH 05/17] ci: route issue reporting to the server repository Issues for all Triton components are tracked in triton-inference-server/server; disable blank issues here and point the new-issue chooser at the server repository. TRI-1100 --- .github/ISSUE_TEMPLATE/bug_report.md | 24 ----------------------- .github/ISSUE_TEMPLATE/config.yml | 5 +++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ------------------- 3 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index df06a0e5..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Description** -A clear and concise description of what the bug is. - -**Triton Information** -What version of Triton are you using? - -Are you using the Triton container or did you build it yourself? - -**To Reproduce** -Steps to reproduce the behavior. - -Describe the models (framework, inputs, outputs), ideally include the model configuration file (if using an ensemble include the model configuration file for that as well). - -**Expected behavior** -A clear and concise description of what you expected to happen. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..1fb3f373 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Bug report or feature request + url: https://github.com/triton-inference-server/server/issues/new/choose + about: Please report issues for all Triton Inference Server components in the server repository. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7d..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. From e45da7e9bdbdb3de212adf60fbe175d68bac58ee Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:31:19 -0700 Subject: [PATCH 06/17] ci: share the server repository's PR templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adopt the canonical PR template set from triton-inference-server/server (default chooser plus internal/external contribution templates) so every repository presents the same PR experience. The manual "Commit Type" checkbox section is dropped — the conventional-pre-commit hook (commit-msg stage) enforces it automatically. TRI-1100 --- .../pull_request_template_external_contrib.md | 36 +++++++++++++++++++ .../pull_request_template_internal_contrib.md | 36 +++++++++++++++++++ .github/pull_request_template.md | 23 +++++------- 3 files changed, 81 insertions(+), 14 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md new file mode 100644 index 00000000..4a9e6b65 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md @@ -0,0 +1,36 @@ +#### What does the PR do? +<!-- Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.--> + +#### Checklist +- [ ] I have read the [Contribution guidelines](#../../CONTRIBUTING.md) and signed the [Contributor License +Agreement](https://github.com/NVIDIA/triton-inference-server/blob/master/Triton-CCLA-v1.pdf) +- [ ] PR title reflects the change and is of format `<commit_type>: <Title>` +- [ ] Changes are described in the pull request. +- [ ] Related issues are referenced. +- [ ] Populated [github labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) field +- [ ] Added [test plan](#test-plan) and verified test passes. +- [ ] Verified that the PR passes existing CI. +- [ ] I ran pre-commit locally (`pre-commit install, pre-commit run --all`) +- [ ] Verified copyright is correct on all changed files. +- [ ] Added _succinct_ git squash message before merging [ref](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). +- [ ] All template sections are filled out. +- [ ] Optional: Additional screenshots for behavior/output changes with before/after. + +#### Related PRs: +<!-- Related PRs from other Repositories --> + +#### Where should the reviewer start? +<!-- call out specific files that should be looked at closely --> + +#### Test plan: +<!-- list steps to verify feature works --> +<!-- were e2e tests added?--> + +#### Caveats: +<!-- any limitations or possible things missing from this PR --> + +#### Background +<!-- e.g. what led to this change being made. this is optional extra information to help the reviewer --> + +#### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) +- closes GitHub issue: #xxx diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md new file mode 100644 index 00000000..42b1bb96 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md @@ -0,0 +1,36 @@ +#### What does the PR do? +<!-- Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.--> + +#### Checklist +- [ ] PR title reflects the change and is of format `<commit_type>: <Title>` +- [ ] Changes are described in the pull request. +- [ ] Related issues are referenced. +- [ ] Populated [github labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) field +- [ ] Added [test plan](#test-plan) and verified test passes. +- [ ] Verified that the PR passes existing CI. +- [ ] Verified copyright is correct on all changed files. +- [ ] Added _succinct_ git squash message before merging [ref](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). +- [ ] All template sections are filled out. +- [ ] Optional: Additional screenshots for behavior/output changes with before/after. + +#### Related PRs: +<!-- Related PRs from other Repositories --> + +#### Where should the reviewer start? +<!-- call out specific files that should be looked at closely --> + +#### Test plan: +<!-- list steps to verify --> +<!-- were e2e tests added?--> + +- CI Pipeline ID: +<!-- Only Pipeline ID and no direct link here --> + +#### Caveats: +<!-- any limitations or possible things missing from this PR --> + +#### Background +<!-- e.g. what led to this change being made. this is optional extra information to help the reviewer --> + +#### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) +- closes GitHub issue: #xxx diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a79d3bdd..0787dcbc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,18 +1,13 @@ -#### What does the PR do? -<!-- Describe the change and the motivation behind it. --> +Thanks for submitting a PR to Triton! +Please go the the `Preview` tab above this description box and select the appropriate sub-template: -#### Related Issues / PRs -<!-- Use "Closes #xxx" / "Fixes #xxx" / "Resolves #xxx" for issues. - Link related PRs from other triton-inference-server repositories. --> +* [PR description template for Triton Engineers](?expand=1&template=pull_request_template_internal_contrib.md) +* [PR description template for External Contributors](?expand=1&template=pull_request_template_external_contrib.md) -#### Test plan -<!-- How was this change verified? List steps, tests added, or CI evidence. --> +If you already created the PR, please replace this message with one of +* [External contribution template](https://raw.githubusercontent.com/triton-inference-server/server/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md) +* [Internal contribution template](https://raw.githubusercontent.com/triton-inference-server/server/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md) + +and fill it out. -#### Caveats -<!-- Optional: known limitations or follow-ups. --> -#### Checklist -- [ ] PR title follows `<commit_type>: <Title>` (conventional commit — enforced by the `conventional-pre-commit` hook) -- [ ] I ran `pre-commit install && pre-commit run --all-files` locally and it passes -- [ ] Copyright header is correct on all changed files -- [ ] External contributors: I have read the [Contribution guidelines](../CONTRIBUTING.md) and signed the [Contributor License Agreement](https://github.com/NVIDIA/triton-inference-server/blob/master/Triton-CCLA-v1.pdf) From 0a9de1ddf5d305b13e5b68d8a2b84bd8939e7e74 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 14:45:08 -0700 Subject: [PATCH 07/17] ci: align pre-commit hooks and adopt org-wide GitHub defaults Adopt the shared pre-commit baseline: conventional-commit message validation (commit-msg stage) and the centralized add-license hook from the org .github repository (v1.0.0 - excludes .github/ templates and never rewrites LICENSE files). Run pre-commit CI only on files modified by the PR, and add the caller stub for the org-wide conventional-pr reusable workflow (PR title validation + type labeling). PR and issue templates are no longer stored per repository: they are inherited from the org-wide defaults in triton-inference-server/.github (issues route to the server repository). TRI-1100 --- .github/ISSUE_TEMPLATE/config.yml | 5 --- .../pull_request_template_external_contrib.md | 36 ---------------- .../pull_request_template_internal_contrib.md | 36 ---------------- .github/pull_request_template.md | 13 ------ .github/workflows/conventional-pr.yml | 41 +++++++++++++++++++ .pre-commit-config.yaml | 8 ++-- 6 files changed, 45 insertions(+), 94 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md delete mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/conventional-pr.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 1fb3f373..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Bug report or feature request - url: https://github.com/triton-inference-server/server/issues/new/choose - about: Please report issues for all Triton Inference Server components in the server repository. diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md deleted file mode 100644 index 4a9e6b65..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md +++ /dev/null @@ -1,36 +0,0 @@ -#### What does the PR do? -<!-- Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.--> - -#### Checklist -- [ ] I have read the [Contribution guidelines](#../../CONTRIBUTING.md) and signed the [Contributor License -Agreement](https://github.com/NVIDIA/triton-inference-server/blob/master/Triton-CCLA-v1.pdf) -- [ ] PR title reflects the change and is of format `<commit_type>: <Title>` -- [ ] Changes are described in the pull request. -- [ ] Related issues are referenced. -- [ ] Populated [github labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) field -- [ ] Added [test plan](#test-plan) and verified test passes. -- [ ] Verified that the PR passes existing CI. -- [ ] I ran pre-commit locally (`pre-commit install, pre-commit run --all`) -- [ ] Verified copyright is correct on all changed files. -- [ ] Added _succinct_ git squash message before merging [ref](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). -- [ ] All template sections are filled out. -- [ ] Optional: Additional screenshots for behavior/output changes with before/after. - -#### Related PRs: -<!-- Related PRs from other Repositories --> - -#### Where should the reviewer start? -<!-- call out specific files that should be looked at closely --> - -#### Test plan: -<!-- list steps to verify feature works --> -<!-- were e2e tests added?--> - -#### Caveats: -<!-- any limitations or possible things missing from this PR --> - -#### Background -<!-- e.g. what led to this change being made. this is optional extra information to help the reviewer --> - -#### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) -- closes GitHub issue: #xxx diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md deleted file mode 100644 index 42b1bb96..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md +++ /dev/null @@ -1,36 +0,0 @@ -#### What does the PR do? -<!-- Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.--> - -#### Checklist -- [ ] PR title reflects the change and is of format `<commit_type>: <Title>` -- [ ] Changes are described in the pull request. -- [ ] Related issues are referenced. -- [ ] Populated [github labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) field -- [ ] Added [test plan](#test-plan) and verified test passes. -- [ ] Verified that the PR passes existing CI. -- [ ] Verified copyright is correct on all changed files. -- [ ] Added _succinct_ git squash message before merging [ref](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). -- [ ] All template sections are filled out. -- [ ] Optional: Additional screenshots for behavior/output changes with before/after. - -#### Related PRs: -<!-- Related PRs from other Repositories --> - -#### Where should the reviewer start? -<!-- call out specific files that should be looked at closely --> - -#### Test plan: -<!-- list steps to verify --> -<!-- were e2e tests added?--> - -- CI Pipeline ID: -<!-- Only Pipeline ID and no direct link here --> - -#### Caveats: -<!-- any limitations or possible things missing from this PR --> - -#### Background -<!-- e.g. what led to this change being made. this is optional extra information to help the reviewer --> - -#### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) -- closes GitHub issue: #xxx diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 0787dcbc..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,13 +0,0 @@ -Thanks for submitting a PR to Triton! -Please go the the `Preview` tab above this description box and select the appropriate sub-template: - -* [PR description template for Triton Engineers](?expand=1&template=pull_request_template_internal_contrib.md) -* [PR description template for External Contributors](?expand=1&template=pull_request_template_external_contrib.md) - -If you already created the PR, please replace this message with one of -* [External contribution template](https://raw.githubusercontent.com/triton-inference-server/server/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template_external_contrib.md) -* [Internal contribution template](https://raw.githubusercontent.com/triton-inference-server/server/main/.github/PULL_REQUEST_TEMPLATE/pull_request_template_internal_contrib.md) - -and fill it out. - - diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml new file mode 100644 index 00000000..d96bb136 --- /dev/null +++ b/.github/workflows/conventional-pr.yml @@ -0,0 +1,41 @@ +# Copyright 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NVIDIA CORPORATION nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Thin caller: the logic lives in the org-wide reusable workflow, pinned by +# tag. Workflow changes ship as a new tag in the .github repository plus a +# one-line rev bump here (tags are write-once, never moved). + +name: conventional-pr + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + conventional-pr: + permissions: + pull-requests: write + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0eda51d1..dda5e861 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,8 +57,8 @@ repos: args: ["--toml", "pyproject.toml"] exclude: (?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$) # Validates commit messages against the Conventional Commits format -# (<commit_type>: <title>). Replaces the manual commit-type checklist that -# used to live in the PR template. +# (<commit_type>: <title>); PR titles are validated org-wide by the +# conventional-pr reusable workflow. - repo: https://github.com/compilerla/conventional-pre-commit rev: v4.4.0 hooks: @@ -83,7 +83,7 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace -- repo: https://github.com/triton-inference-server/developer_tools - rev: v0.2.1 +- repo: https://github.com/triton-inference-server/.github + rev: v1.0.0 hooks: - id: add-license From 3a7e9a525a705aae03a5b03bc294ad0e80218985 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 14:56:01 -0700 Subject: [PATCH 08/17] ci: bump conventional-pr workflow to v1.1.0 Org-wide label color scheme and cherry-pick detection. TRI-1100 --- .github/workflows/conventional-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index d96bb136..0871567f 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,4 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.0.0 + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.1.0 From 4d4eb2078f19b4e978fa1a8a6a16f3e7d30869d8 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:28:44 -0700 Subject: [PATCH 09/17] ci: bump conventional-pr workflow to v1.2.1 Human-readable type labels with enforced descriptions and colors. TRI-1100 --- .github/workflows/conventional-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index 0871567f..dab9232a 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,4 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.1.0 + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.2.1 From 32e349543816769625303e0e02acb3decf82466a Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:35:09 -0700 Subject: [PATCH 10/17] ci: bump conventional-pr workflow to v1.2.2 TRI-1100 --- .github/workflows/conventional-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index dab9232a..594e1ec1 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,4 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.2.1 + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.2.2 From d265a86e68fe604105ea61566a14ff5d453f14dd Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:41:16 -0700 Subject: [PATCH 11/17] ci: bump conventional-pr workflow to v1.3.0 TRI-1100 --- .github/workflows/conventional-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index 594e1ec1..503ddca2 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,4 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.2.2 + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.3.0 From 17417b652e14b35c501da1cdbe8ad27cfb0ec73e Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:55:27 -0700 Subject: [PATCH 12/17] ci: bump conventional-pr workflow to v1.3.1 TRI-1100 --- .github/workflows/conventional-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index 503ddca2..1866f851 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,4 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.3.0 + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.3.1 From f81b320e3da6890f3bb54ca37254b33bfb7182ec Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 16:14:13 -0700 Subject: [PATCH 13/17] ci: pin org .github hooks and workflow to the same tag (v1.3.1) TRI-1100 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dda5e861..63b6fe55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -84,6 +84,6 @@ repos: - id: trailing-whitespace - repo: https://github.com/triton-inference-server/.github - rev: v1.0.0 + rev: v1.3.1 hooks: - id: add-license From aa59a8002610801443c607b2850690eb0751c50f Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:15:03 -0700 Subject: [PATCH 14/17] ci: bump org .github hooks and workflow to v1.4.0 The add-license hook now fails when the LICENSE copyright year is stale. TRI-1100 --- .github/workflows/conventional-pr.yml | 2 +- .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index 1866f851..922aaa5e 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,4 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.3.1 + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.4.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 63b6fe55..dfb695e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -84,6 +84,6 @@ repos: - id: trailing-whitespace - repo: https://github.com/triton-inference-server/.github - rev: v1.3.1 + rev: v1.4.0 hooks: - id: add-license From 7c3e882ca7710fe57c88398bf56cebf28585f17a Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:28:32 -0700 Subject: [PATCH 15/17] ci: bump org .github hooks and workflow to v1.4.1 Workflow files are license-processed again (only templates excluded); refresh the stale copyright year this repo's pre-commit workflow carried. TRI-1100 --- .github/workflows/conventional-pr.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- .pre-commit-config.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index 922aaa5e..7f6b096d 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,4 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.4.0 + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.4.1 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 15d0b686..4dbce6b1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,4 +1,4 @@ -# Copyright 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfb695e6..836d7415 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -84,6 +84,6 @@ repos: - id: trailing-whitespace - repo: https://github.com/triton-inference-server/.github - rev: v1.4.0 + rev: v1.4.1 hooks: - id: add-license From 91ed92a2cdde0c13439b1d3820f3b43220056728 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:18:50 -0700 Subject: [PATCH 16/17] ci: bump org .github hooks and workflow to v1.4.2 Grant issues:write to the labeling job (review feedback). TRI-1100 --- .github/workflows/conventional-pr.yml | 3 ++- .pre-commit-config.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index 7f6b096d..72472a77 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -38,4 +38,5 @@ jobs: conventional-pr: permissions: pull-requests: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.4.1 + issues: write + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.4.2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 836d7415..724cade3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -84,6 +84,6 @@ repos: - id: trailing-whitespace - repo: https://github.com/triton-inference-server/.github - rev: v1.4.1 + rev: v1.4.2 hooks: - id: add-license From 6b0533b8e1b8b301a0da6cdd8d92366e5b37d616 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:28:43 -0700 Subject: [PATCH 17/17] ci: harden CI workflows and configs per fleet-wide review feedback - conventional-pr stub: dual pull_request/pull_request_target triggers so fork PRs from external contributors get labeled too (the reusable workflow never checks out PR code); explicit contents:read; pinned v1.4.3. - pre-commit workflow: robust modified-files runner (null-delimited paths, deletion-only PRs handled, deleted paths filtered, no undocumented -r flag, cache keyed on config hash). - flake8 args quoted correctly (the flow-scalar form split at commas and silently reduced the select list). - hooks pinned to .github v1.4.3. TRI-1100 --- .github/workflows/conventional-pr.yml | 14 +++++++++++++- .github/workflows/pre-commit.yml | 19 ++++++++++++++----- .pre-commit-config.yaml | 4 ++-- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/conventional-pr.yml b/.github/workflows/conventional-pr.yml index 72472a77..d3348b77 100644 --- a/.github/workflows/conventional-pr.yml +++ b/.github/workflows/conventional-pr.yml @@ -33,10 +33,22 @@ name: conventional-pr on: pull_request: types: [opened, edited, synchronize, reopened] + pull_request_target: + types: [opened, edited, synchronize, reopened] jobs: conventional-pr: + # Same-repo PRs run on the safe pull_request event; fork PRs run on + # pull_request_target so the labeling job gets a writable token (safe + # here: the reusable workflow never checks out PR code - it only reads + # PR metadata via the API and manages labels). + if: >- + (github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository) || + (github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.full_name != github.repository) permissions: pull-requests: write issues: write - uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.4.2 + contents: read + uses: triton-inference-server/.github/.github/workflows/conventional-pr.yml@v1.4.3 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4dbce6b1..cd8680b3 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -32,14 +32,23 @@ on: jobs: pre-commit: runs-on: ubuntu-latest + permissions: + contents: read steps: - uses: actions/checkout@v5.0.0 with: fetch-depth: 2 - - name: Get modified files - id: modified-files - run: echo "modified_files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT - uses: actions/setup-python@v6.0.0 - - uses: pre-commit/action@v3.0.1 + - uses: actions/cache@v4 with: - extra_args: --files ${{ steps.modified-files.outputs.modified_files }} + path: ~/.cache/pre-commit + key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + - name: Run pre-commit on the files modified by the PR + # Null-delimited so paths with spaces survive; --no-run-if-empty + # handles deletion-only PRs; deleted paths are filtered out before + # being handed to pre-commit. + run: | + python -m pip install --quiet pre-commit + git diff --name-only -z --diff-filter=d HEAD^1 HEAD \ + | xargs -0 --no-run-if-empty \ + pre-commit run --show-diff-on-failure --color=always --files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 724cade3..e5fd080f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: rev: 7.3.0 hooks: - id: flake8 - args: [--max-line-length=88, --select=C,E,F,W,B,B950, --extend-ignore = E203,E501] + args: ["--max-line-length=88", "--select=C,E,F,W,B,B950", "--extend-ignore=E203,E501"] types_or: [python, cython] - repo: https://github.com/pre-commit/mirrors-clang-format rev: v16.0.5 @@ -84,6 +84,6 @@ repos: - id: trailing-whitespace - repo: https://github.com/triton-inference-server/.github - rev: v1.4.2 + rev: v1.4.3 hooks: - id: add-license