Skip to content

DEVOPS-1086: (v2) In CI-Tools, force Pylint on all files if environment lock has changed - #209

Merged
RomFloreani merged 5 commits into
mainfrom
DEVOPS-1086-v2
Jul 22, 2026
Merged

DEVOPS-1086: (v2) In CI-Tools, force Pylint on all files if environment lock has changed#209
RomFloreani merged 5 commits into
mainfrom
DEVOPS-1086-v2

Conversation

@RomFloreani

@RomFloreani RomFloreani commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

DEVOPS-1086 - In CI-Tools, force Pylint on all files if environment lock has changed

Copilot AI review requested due to automatic review settings July 20, 2026 15:15
@github-actions github-actions Bot changed the title Devops 1086 v2 DEVOPS-1086: v2 Jul 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the reusable Python static-analysis workflow so that, on pull requests, Pylint runs on all files when the environment lock definition changes (instead of only running on changed files or being skipped). This helps ensure lint results remain valid after dependency/environment updates.

Changes:

  • Add source-dir / test-dir inputs to better target Pixi “all-files” lint runs.
  • Detect lock-file changes per package manager and set FORCE_ALL_FILES to trigger an all-files Pylint run on PRs.
  • Add an explicit “Pylint skipped” notice when no applicable file changes are detected and no force-run is triggered.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/reusable-python-static_analysis.yml
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml
Copilot AI review requested due to automatic review settings July 21, 2026 18:28
@RomFloreani
RomFloreani requested a review from sebhmg July 21, 2026 18:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/reusable-python-static_analysis.yml:148

  • The conda lock-file path detection treats any non-Linux runner as "win" (via RUNNER_OS), which will mis-identify the lock file on macOS runners. Since this workflow supports macos-latest in the OS matrix, lock-file changes on macOS could fail to trigger the intended FORCE_ALL_FILES behavior.
            conda)
              os_conda=$( [[ "$RUNNER_OS" == "Linux" ]] && echo "linux" || echo "win")
              LOCK_FILE="environments/py-${PYTHON_VERSION}-${os_conda}-64-dev.conda.lock.yml"
              ;;

@sebhmg sebhmg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the logic looks correct 👍

Please, see comments for some adjustment:

  • have a default value for test-dir in input definition
  • clarification in doc and variable names

Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Copilot AI review requested due to automatic review settings July 22, 2026 13:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/reusable-python-static_analysis.yml
@RomFloreani
RomFloreani requested a review from sebhmg July 22, 2026 13:38

@sebhmg sebhmg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment about doc and test-dir

Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated
Comment thread .github/workflows/reusable-python-static_analysis.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/reusable-python-static_analysis.yml:155

  • Lock-file force-run detection only looks at files added/modified (git diff --diff-filter=AM). If the lock file is deleted or renamed (both are still “changed” relative to base), FORCE_ALL_FILES won’t be set and the workflow may incorrectly skip the full Pylint run. Consider using an unfiltered name list for lock detection while keeping the AM filter for the per-file Pylint list (to avoid passing deleted paths to Pylint).
          changed_files=$(git diff --diff-filter=AM --name-only refs/remotes/origin/${GITHUB_BASE_REF}... --)
          if [ -n "$LOCK_FILE" ] && echo "$changed_files" | grep -qxF "$LOCK_FILE"; then
            echo "::notice::Lock file '$LOCK_FILE' changed: forcing Pylint to run on all files"
            echo "FORCE_ALL_FILES=true" >> $GITHUB_ENV

@sebhmg sebhmg changed the title DEVOPS-1086: v2 DEVOPS-1086: (v2) In CI-Tools, force Pylint on all files if environment lock has changed Jul 22, 2026
@RomFloreani
RomFloreani merged commit 89672b2 into main Jul 22, 2026
16 checks passed
@RomFloreani
RomFloreani deleted the DEVOPS-1086-v2 branch July 22, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants