From f90578a172337a4a65aca3e795630f95b0e4da6a Mon Sep 17 00:00:00 2001 From: "M. Chornyi" <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 16:59:48 -0700 Subject: [PATCH 01/18] 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 | 76 +++++++++-------------- pyproject.toml | 25 ++++++++ 6 files changed, 122 insertions(+), 73 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 create mode 100644 pyproject.toml 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 1408b62e..31a22ec8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,91 +1,71 @@ -# 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. -exclude: (libevhtp|cnmem) +# 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 rev: 5.12.0 hooks: - id: isort - exclude: "\\.patch$" + additional_dependencies: [toml] - repo: https://github.com/psf/black rev: 23.1.0 hooks: - id: black - exclude: "\\.patch$" types_or: [python, cython] - repo: https://github.com/PyCQA/flake8 rev: 7.3.0 hooks: - id: flake8 - exclude: "\\.patch$" args: [--max-line-length=88, --select=C,E,F,W,B,B950, --extend-ignore = E203,E501] types_or: [python, cython] -- repo: https://github.com/codespell-project/codespell - rev: v2.2.4 - hooks: - - id: codespell - exclude: "\\.patch$" - repo: https://github.com/pre-commit/mirrors-clang-format rev: v16.0.5 hooks: - id: clang-format - exclude: "\\.patch$" types_or: [c, c++, cuda, proto, textproto, java] args: ["-fallback-style=none", "-style=file", "-i"] +- repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + 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 rev: v6.0.0 hooks: - id: check-case-conflict - exclude: "\\.patch$" - id: check-executables-have-shebangs - exclude: "\\.patch$" - id: check-merge-conflict - exclude: "\\.patch$" - id: check-json - exclude: "\\.patch$" - id: check-toml - exclude: "\\.patch$" - id: check-yaml - exclude: "\\.patch$" - id: check-shebang-scripts-are-executable - exclude: "\\.patch$" - id: end-of-file-fixer - exclude: "\\.patch$" types_or: [c, c++, cuda, proto, textproto, java, python] - id: mixed-line-ending - exclude: "\\.patch$" - id: requirements-txt-fixer - exclude: "\\.patch$" - id: trailing-whitespace - exclude: "\\.patch$" - repo: https://github.com/triton-inference-server/developer_tools - rev: v0.1.0 + rev: v0.2.0 hooks: - id: add-license - exclude: "\\.patch$" + # 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 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..7a34de5c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: BSD-3-Clause + +[tool.codespell] +# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override - +# this is only to allow you to run codespell interactively +skip = "./.git,./.github" +# ignore short words, and typename parameters like OffsetT +ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b" +# use the 'clear' dictionary for unambiguous spelling mistakes +builtin = "clear" +# disable warnings about binary files and wrong encoding +quiet-level = 3 + +[tool.isort] +profile = "black" +use_parentheses = true +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +ensure_newline_before_comments = true +line_length = 88 +balanced_wrapping = true +indent = " " +skip = ["build"] From ee5bfb3cd29d49ea0fab79fa3c974cc0292ae901 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:36:18 -0700 Subject: [PATCH 02/18] 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 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 4 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] diff --git a/pyproject.toml b/pyproject.toml index 7a34de5c..5b8333da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -# 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 [tool.codespell] From 836aa9221ae14bcca3c2812b2704b499f0c57f86 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:00:37 -0700 Subject: [PATCH 03/18] 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 +++++++++++++++++++++++++------- pyproject.toml | 27 +++++++++++++++++++++++++-- 4 files changed, 75 insertions(+), 16 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 diff --git a/pyproject.toml b/pyproject.toml index 5b8333da..e4c246bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,28 @@ -# SPDX-FileCopyrightText: Copyright (c) 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. [tool.codespell] # note: pre-commit passes explicit lists of files here, which this skip file list doesn't override - From 9fb9bd673877fac99108207261f8fdbcae95681f Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:15:24 -0700 Subject: [PATCH 04/18] 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 c6eb4f2bb7e9bd5a9a1f9c114229e9a60a3d6f76 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:27:30 -0700 Subject: [PATCH 05/18] 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 abd86b1e78f4a482b3488a64bc0b6e2a746c9cbc Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:32:36 -0700 Subject: [PATCH 06/18] 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 635f42d6cac13563faaa1c410481175377186829 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 14:46:48 -0700 Subject: [PATCH 07/18] 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 e8bab2cc01b4ea30273596c490033325f783622a Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 14:57:14 -0700 Subject: [PATCH 08/18] 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 f9d87551741be9a0b7ae0c5980261dd1e436d858 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:29:58 -0700 Subject: [PATCH 09/18] 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 422962c24e84e947e35693dab74ca58fec998410 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:36:23 -0700 Subject: [PATCH 10/18] 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 31bdd5a99ebbfe361db9062578ad00b18cbca7b1 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:42:29 -0700 Subject: [PATCH 11/18] 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 369ed44a2b2fa0c0a081961623b1534950dde580 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:56:37 -0700 Subject: [PATCH 12/18] 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 93ee34e6231437da56b9a7c1d78988a6523441ed Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Mon, 20 Jul 2026 16:15:25 -0700 Subject: [PATCH 13/18] 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 efbc06bfdef48ac37d575cd62946888ec7f2fa0f Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:16:31 -0700 Subject: [PATCH 14/18] 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 015e4a3d9d01dd500584fc822b20f194fb7c009f Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:30:05 -0700 Subject: [PATCH 15/18] 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 48b35d866364b8bc31e4b9d8dfbb2651d6a5268a Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:23:29 -0700 Subject: [PATCH 16/18] ci: keep patch files excluded from all hooks Review feedback on #80: main excluded "\.patch$" per hook; the baseline alignment dropped it. Vendored patches are byte- and whitespace-exact - trailing-whitespace, end-of-file-fixer, or the formatters would corrupt any touched patch. Restore it as a single top-level exclude covering every hook, including the centralized add-license. TRI-1100 --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 836d7415..18eecf5b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,6 +26,10 @@ default_install_hook_types: [pre-commit, commit-msg] +# Vendored patch files are byte- and whitespace-exact; any hook that +# reformats or "fixes" them corrupts the patch. +exclude: "\\.patch$" + repos: - repo: https://github.com/PyCQA/isort rev: 5.12.0 From 7914206d231f1acb227eb41fcc01e7f54f67bf27 Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:20:13 -0700 Subject: [PATCH 17/18] 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 18eecf5b..5ab8453d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,6 +88,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 2c1b8d5fa122419c581d0e89784bd20a7843ed1d Mon Sep 17 00:00:00 2001 From: Misha Chornyi <99709299+mc-nv@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:30:15 -0700 Subject: [PATCH 18/18] 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 5ab8453d..906cf142 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,7 +45,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 @@ -88,6 +88,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