NVIDIA / NVIDIA/TensorRT-LLM

Add concurrency control and least-privilege permissions to PR check workflow

Open Beginner friendly
#13,021 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Infra
Dominant language
Python
Stars
14.7k
Forks
2.8k
Avg merge
2d 23h
Merged PRs (30d)
489

Description

Summary

The pr-check.yml workflow is missing a concurrency group and explicit permissions,
unlike its sibling precommit-check.yml which already has both.

Proposed Changes

  1. Add concurrency group — cancel in-progress runs when a new push arrives on the
    same PR, preventing wasted CI runner minutes on stale runs.
  2. Add explicit permissions block — declare least-privilege read access for
    pull-requests and contents, following GitHub's security hardening recommendations.
  3. Bump Python from 3.10 to 3.12 — consistent with precommit-check.yml and uses
    a more current runtime.

Motivation

  • Rapid successive pushes to a PR currently trigger multiple redundant workflow runs.
  • Without explicit permissions, the workflow inherits the repository-wide default, which
    is broader than necessary.
  • Python version inconsistency across workflows in the same directory.

All three patterns already exist in precommit-check.yml, so this aligns pr-check.yml
with established conventions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing pr-check.yml with its sibling precommit-check.yml, focusing on the existing concurrency, permissions, and Python setup patterns. Update pr-check.yml to match the three requested conventions, then run or inspect the PR check workflow configuration to confirm the concurrency group, read-only permissions, and Python 3.12 setting are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, security
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.