Skip to content

tests: re-order python-basic-tests to run cheap tests first#453

Merged
bmr-cymru merged 3 commits intomainfrom
bmr-reorder-python-basic-tests
Aug 30, 2025
Merged

tests: re-order python-basic-tests to run cheap tests first#453
bmr-cymru merged 3 commits intomainfrom
bmr-reorder-python-basic-tests

Conversation

@bmr-cymru
Copy link
Copy Markdown
Contributor

@bmr-cymru bmr-cymru commented Aug 29, 2025

Resolves: #310
Resolves: #456
Resolves: #457

Summary by CodeRabbit

  • Chores

    • Streamlined CI by running code-quality checks earlier in the pipeline and removing duplicate executions, reducing noise and speeding feedback on pull requests.
    • Standardized the configuration of code-quality tools to ensure consistent results across runs.
  • Style

    • Added a dedicated configuration for code style checks, aligning formatting rules with existing linting settings for more consistent styling across the codebase.
  • Tests

    • No functional test changes; validation flow improved via earlier quality gates.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 29, 2025

Walkthrough

Updates GitHub Actions workflow to run code-quality checks earlier and only once, with parallelized flake8/pylint. Removes duplicated later checks. Adds a pycodestyle configuration to setup.cfg.

Changes

Cohort / File(s) Summary of changes
CI workflow reordering and deduplication
.github/workflows/snapm.yml
Inserts pycodestyle, flake8 (with --jobs), pylint (with --jobs), and bandit steps immediately after configuration creation; removes later duplicate checks; adjusts flags.
Lint configuration
setup.cfg
Adds [pycodestyle] section with ignore settings to centralize configuration.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Dev as Push/PR
    participant GHA as GitHub Actions
    participant Job as python-basic-tests job
    Note over Dev,GHA: CI pipeline control-flow change
    Dev->>GHA: Trigger workflow
    GHA->>Job: Start job
    Job->>Job: Create boom configuration
    rect rgba(198,239,206,0.4)
    Note right of Job: Early code-quality checks (new position)
    Job->>Job: Run pycodestyle (cfg-driven)
    Job->>Job: Run flake8 --jobs auto
    Job->>Job: Run pylint --jobs 0
    Job->>Job: Run bandit with skips
    end
    Job->>Job: Install stratis-cli (later)
    Job->>Job: Continue remaining tests
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Re-order GitHub workflows so cheap tests come first (#310)
Configure pycodestyle in setup.cfg (#456)
Parallelize pylint and flake8 via --jobs (#457)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
None

Poem

I thump my paw at sunrise’s glow,
Lints hop first, the slow tests slow.
Flakes sprint wide with parallel might,
Pylint bounds left, Bandit right.
In setup’s meadow, rules now nest—
Quick fails found, and faster rest. 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 61fc424 and d86e8fa.

📒 Files selected for processing (1)
  • .github/workflows/snapm.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/snapm.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (45)
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: virt_tests (bios, lvm-thin, centos-stream9)
  • GitHub Check: virt_tests (bios, lvm-thin, centos-stream10)
  • GitHub Check: virt_tests (bios, lvm, centos-stream9)
  • GitHub Check: virt_tests (uefi, lvm, fedora41)
  • GitHub Check: virt_tests (bios, lvm-thin, fedora41)
  • GitHub Check: virt_tests (bios, lvm, centos-stream10)
  • GitHub Check: virt_tests (bios, lvm, fedora42)
  • GitHub Check: virt_tests (bios, lvm, fedora41)
  • GitHub Check: virt_tests (uefi, lvm-thin, centos-stream9)
  • GitHub Check: virt_tests (uefi, lvm-thin, centos-stream10)
  • GitHub Check: virt_tests (uefi, lvm, centos-stream10)
  • GitHub Check: virt_tests (uefi, lvm-thin, fedora41)
  • GitHub Check: virt_tests (uefi, lvm-thin, fedora42)
  • GitHub Check: virt_tests (bios, lvm-thin, fedora42)
  • GitHub Check: virt_tests (uefi, lvm, fedora42)
  • GitHub Check: virt_tests (uefi, lvm, centos-stream9)
  • GitHub Check: python-basic-tests
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bmr-reorder-python-basic-tests

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@packit-as-a-service
Copy link
Copy Markdown

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/snapshotmanager-snapm-453
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/snapm.yml (3)

56-67: Run linters even earlier to shave more time.

Consider moving these four steps to just after “Install Ubuntu snapm deps” (and before pip install, package install, and any systemd copies/reload). If pylint import resolution requires deps, use pylint’s import-error disable or PYTHONPATH to still avoid the install/reload overhead.


56-67: Minor speed-ups: enable parallelism for flake8/pylint.

Add flake8’s auto-parallel and pylint’s job auto-detection to reduce wall time.

-      - name: Check Flake8
+      - name: Check Flake8
         run: >
-          flake8 snapm
+          flake8 --jobs auto snapm
-      - name: Check pylint
+      - name: Check pylint
         run: >
-          pylint snapm
+          pylint -j 0 snapm

56-67: Centralize linter config to keep CI/local consistent.

Instead of passing ignores on the CLI (pycodestyle E501,E203,W503 and Bandit skip list), consider moving them into pyproject.toml/setup.cfg. Then these steps can omit flags and devs get the same behavior locally.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 932f679 and b685d6a.

📒 Files selected for processing (1)
  • .github/workflows/snapm.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-26T15:22:27.918Z
Learnt from: bmr-cymru
PR: snapshotmanager/snapm#383
File: virt_tests/testvm.py:493-499
Timestamp: 2025-08-26T15:22:27.918Z
Learning: In the snapm virt_tests testing workflow, the target distributions (Fedora 41/42, CentOS Stream 9/10) all provide the bare `pip` executable when python3-pip is installed, so using `pip install` instead of `python3 -m pip install` is acceptable and works reliably across these specific distributions.

Applied to files:

  • .github/workflows/snapm.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (28)
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: virt_tests (uefi, lvm-thin, fedora42)
  • GitHub Check: virt_tests (bios, lvm-thin, fedora42)
  • GitHub Check: virt_tests (uefi, lvm-thin, centos-stream10)
  • GitHub Check: virt_tests (bios, lvm, centos-stream10)
  • GitHub Check: virt_tests (uefi, lvm, centos-stream10)
  • GitHub Check: virt_tests (bios, lvm, fedora41)
  • GitHub Check: python-basic-tests
🔇 Additional comments (1)
.github/workflows/snapm.yml (1)

56-67: Good reorder: fast-fail linters now run before Stratis build/install.

This meets the goal of surfacing basic issues earlier and removes redundant later checks. Nice.

@bmr-cymru bmr-cymru force-pushed the bmr-reorder-python-basic-tests branch 2 times, most recently from d5eb47a to 76f4c2c Compare August 29, 2025 20:42
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
pyproject.toml (1)

30-32: Document skip rationale and consider scoping targets.

Add brief TOML comments explaining why B101/B303/B404/B603 are skipped, and optionally set targets = ["snapm"] so local bandit -c pyproject.toml works without extra args.

 [tool.bandit]
+# Rationale: skip noisy checks for our codebase; review periodically.
 exclude_dirs = ["tests", "container_tests", "virt_tests"]
 skips = ["B101", "B303", "B404", "B603"]
+targets = ["snapm"]
.github/workflows/snapm.yml (3)

25-40: Trim duplicate packages to shave CI time.

You install both python3-pycodestyle and pycodestyle, and python3-flake8 and flake8. Keep one of each (the Python 3 packages are sufficient on Ubuntu) to reduce apt work.

           python3-pycodestyle
-          pycodestyle
           libfaketime
           faketime
-          flake8
           pylint
           bandit

41-52: Minor: --jobs auto for flake8 is redundant.

auto is already the default; you can drop it for brevity. (flake8.pycqa.org)

-          flake8 --jobs auto snapm
+          flake8 snapm

21-40: Run linters before heavier deps to fail even earlier.

Split the apt install: first just linters, run checks, then install the rest (e.g., lvm2). This reduces wasted setup when a quick check fails.

       - name: Run apt-get update
         run: sudo apt-get -q update
-      - name: Install Ubuntu snapm deps
+      - name: Install linter deps
         env:
           DEBIAN_FRONTEND: noninteractive
         run: >
           sudo apt-get install -y
-          python3-pytest
-          python3-pytest-subtests
-          python3-pycodestyle
-          python3-coverage
-          python3-flake8
-          python3-dateutil
-          python3-packaging
-          python3-wcwidth
-          pycodestyle
-          libfaketime
-          faketime
-          flake8
-          pylint
-          bandit
-          lvm2
+          python3-pycodestyle python3-flake8 pylint bandit
+      - name: Check PyCodestyle
         run: >
           pycodestyle snapm
       - name: Check Flake8
         run: >
-          flake8 --jobs auto snapm
+          flake8 snapm
       - name: Check pylint
         run: >
           pylint --jobs 0 snapm
       - name: Run bandit
         run: >
           bandit -c pyproject.toml -r snapm
+      - name: Install remaining Ubuntu deps
+        env:
+          DEBIAN_FRONTEND: noninteractive
+        run: >
+          sudo apt-get install -y
+          python3-pytest python3-pytest-subtests python3-coverage
+          python3-dateutil python3-packaging python3-wcwidth
+          libfaketime faketime lvm2
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d5eb47a and 76f4c2c.

📒 Files selected for processing (3)
  • .github/workflows/snapm.yml (1 hunks)
  • pyproject.toml (1 hunks)
  • setup.cfg (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • setup.cfg
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-26T15:22:27.918Z
Learnt from: bmr-cymru
PR: snapshotmanager/snapm#383
File: virt_tests/testvm.py:493-499
Timestamp: 2025-08-26T15:22:27.918Z
Learning: In the snapm virt_tests testing workflow, the target distributions (Fedora 41/42, CentOS Stream 9/10) all provide the bare `pip` executable when python3-pip is installed, so using `pip install` instead of `python3 -m pip install` is acceptable and works reliably across these specific distributions.

Applied to files:

  • .github/workflows/snapm.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (37)
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:epel-9-x86_64
  • GitHub Check: rpm-build:centos-stream-9-x86_64
  • GitHub Check: rpm-build:fedora-43-x86_64
  • GitHub Check: rpm-build:fedora-41-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-42-x86_64
  • GitHub Check: virt_tests (bios, lvm, centos-stream10)
  • GitHub Check: virt_tests (uefi, lvm-thin, fedora41)
  • GitHub Check: virt_tests (uefi, lvm, fedora42)
  • GitHub Check: virt_tests (bios, lvm, fedora42)
  • GitHub Check: virt_tests (bios, lvm-thin, fedora41)
  • GitHub Check: virt_tests (uefi, lvm-thin, centos-stream9)
  • GitHub Check: virt_tests (uefi, lvm-thin, centos-stream10)
  • GitHub Check: virt_tests (bios, lvm-thin, centos-stream10)
  • GitHub Check: virt_tests (bios, lvm, centos-stream9)
  • GitHub Check: virt_tests (uefi, lvm, centos-stream10)
  • GitHub Check: virt_tests (bios, lvm-thin, centos-stream9)
  • GitHub Check: virt_tests (uefi, lvm, centos-stream9)
  • GitHub Check: virt_tests (bios, lvm, fedora41)
  • GitHub Check: virt_tests (uefi, lvm-thin, fedora42)
  • GitHub Check: virt_tests (uefi, lvm, fedora41)
  • GitHub Check: virt_tests (bios, lvm-thin, fedora42)
🔇 Additional comments (3)
pyproject.toml (1)

30-32: Bandit config centralization LGTM.

Using [tool.bandit] with exclude_dirs and skips is correct and aligns CI with a single source of truth. (bandit.readthedocs.io)

.github/workflows/snapm.yml (2)

41-52: Fast‑fail order and parallel linting look good.

Running pycodestyle/flake8/pylint/bandit early achieves the “fail fast” goal; pylint --jobs 0 auto-detects CPUs, and flake8 supports parallel --jobs. (pylint.pycqa.org, flake8.pycqa.org)


47-49: Watch for pylint parallelism quirks.

Historically, -j 0 (auto) could yield different reports vs. serialized runs in some environments. If you see flaky results, pin --jobs 1. (github.com)

@bmr-cymru
Copy link
Copy Markdown
Contributor Author

@coderabbitai re: "Run linters even earlier to shave more time"

Run pylint --jobs 0 snapm
************* Module /home/runner/work/snapm/snapm/.pylintrc
.pylintrc:1:0: W0012: Unknown option value for '--disable', expected a valid pylint message and got 'R0917' (unknown-option-value)
************* Module snapm.manager._boot
snapm/manager/_boot.py:18:0: E0401: Unable to import 'boom' (import-error)
snapm/manager/_boot.py:19:0: E0401: Unable to import 'boom.cache' (import-error)
snapm/manager/_boot.py:20:0: E0401: Unable to import 'boom.command' (import-error)
snapm/manager/_boot.py:21:0: E0401: Unable to import 'boom.config' (import-error)
snapm/manager/_boot.py:22:0: E0401: Unable to import 'boom.bootloader' (import-error)
snapm/manager/_boot.py:27:0: E0401: Unable to import 'boom.osprofile' (import-error)
************* Module snapm.manager.plugins.stratis
snapm/manager/plugins/stratis.py:20:0: E0401: Unable to import 'dbus_python_client_gen' (import-error)
************* Module snapm.manager.plugins.stratislib._data
snapm/manager/plugins/stratislib/_data.py:22:0: E0401: Unable to import 'dbus_client_gen' (import-error)
snapm/manager/plugins/stratislib/_data.py:27:0: E0401: Unable to import 'dbus_python_client_gen' (import-error)

So no, let's not do that.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 29, 2025

Tip

For best results, initiate chat on the files or code changes.

@bmr-cymru Thanks for testing that! You're absolutely right - running pylint before the dependencies are installed causes those import errors since pylint needs to be able to import the modules it's analyzing.

The current approach in your PR strikes the right balance by moving the linters after the basic Ubuntu package installation (which includes Python linting tools) but before the expensive Stratis component installation. This gives us the "fail fast" benefit without the dependency issues.

I also notice there's a pylintrc configuration warning about an unknown option 'R0917'. That might be worth addressing separately, but it doesn't affect the core objective of this PR.

The reordering you've implemented looks good - it achieves the goal of failing faster on basic code quality issues without the complications of missing dependencies.

Resolves: #310

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Resolves: #456

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
@bmr-cymru bmr-cymru force-pushed the bmr-reorder-python-basic-tests branch from 76f4c2c to 61fc424 Compare August 29, 2025 20:55
@bmr-cymru
Copy link
Copy Markdown
Contributor Author

@coderabbitai:

I also notice there's a pylintrc configuration warning about an unknown option 'R0917'. That might be worth addressing separately, but it doesn't affect the core objective of this PR.

That's because the version in CI is old. It's harmless.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 29, 2025

Tip

For best results, initiate chat on the files or code changes.

@bmr-cymru Thanks for the clarification! That makes perfect sense - version differences between the pylint in CI and the configuration can definitely cause those harmless warnings about unknown options. Good to know that's expected behavior and not something that needs fixing.

Your testing and the current approach in this PR definitely validate that the reordering strategy you've chosen is the right one - getting the code quality checks to run early without running into the dependency maze.


✏️ Learnings added
Learnt from: bmr-cymru
URL: https://github.com/snapshotmanager/snapm/pull/453

Timestamp: 2025-08-29T20:56:12.852Z
Learning: In the snapm project, pylintrc warnings about unknown option 'R0917' in CI are expected and harmless due to older pylint versions being used in the CI environment.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@bmr-cymru
Copy link
Copy Markdown
Contributor Author

@coderabbitai: re: "Centralize linter configs"

No workie for bandit in ubuntu-latest:

Run bandit -c pyproject.toml -r snapm
[config]	ERROR	expected '<document start>', but found '<scalar>'
  in "pyproject.toml", line 2, column 1
[main]	ERROR	pyproject.toml : Error parsing file.
Error: Process completed with exit code 2.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 29, 2025

Tip

For best results, initiate chat on the files or code changes.

.

The most compatible approach would be to either:

  1. Use a separate .bandit config file - This works with all bandit versions
  2. Use command-line arguments - As you're currently doing in the workflow

Given that the CI environment constraints make the centralized config approach problematic, I'd recommend sticking with the current approach of using command-line arguments for bandit configuration in the workflow. This keeps things working reliably across different bandit versions without additional dependencies.

The current PR approach is solid - moving the linters to run earlier while keeping them compatible with the CI environment is exactly the right balance!


🧠 Learnings used
Learnt from: bmr-cymru
PR: snapshotmanager/snapm#0
File: :0-0
Timestamp: 2025-08-29T20:56:12.852Z
Learning: In the snapm project, pylintrc warnings about unknown option 'R0917' in CI are expected and harmless due to older pylint versions being used in the CI environment.

@bmr-cymru
Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 29, 2025

✅ Actions performed

Full review triggered.

Resolves: #457

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
@bmr-cymru bmr-cymru force-pushed the bmr-reorder-python-basic-tests branch from c58bee0 to d86e8fa Compare August 30, 2025 11:19
@bmr-cymru bmr-cymru merged commit d86e8fa into main Aug 30, 2025
32 of 35 checks passed
@bmr-cymru bmr-cymru deleted the bmr-reorder-python-basic-tests branch November 10, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant