Skip to content

Conversation

@mirecheck
Copy link
Contributor

@mirecheck mirecheck commented Oct 13, 2025

Modernizing CI infrastructure, CI environment configuration is now visible in test plans.

Summary by Sourcery

Modernize CI by replacing legacy linting and unit test jobs with Testing Farm and TMT-based pipelines, introduce plan/test filtering variables, COMPOSE_NAME matrix, and supporting tmt plans and scripts

New Features:

  • Add tf_tests job leveraging Testing Farm and TMT for executing CI tests from GitLab

Enhancements:

  • Revamp pipeline to use COMPOSE_NAME matrix and introduce CI variables for plan/test filters and FIPS mode
  • Implement download and management of Testing Farm artifacts with cancellation logic on CI failure

Build:

  • Overhaul .gitlab-ci.yml to remove legacy linting and unit test jobs and integrate Testing Farm workflows

Tests:

  • Introduce tmt plans and shell scripts under tmt/plans and tmt/tests for tier1 tests and Python unit tests

Chores:

  • Add pylint disable annotations for invalid-name on DACITE_IMPORT_ERROR and PCS_IMPORT_ERROR variables

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 13, 2025

Reviewer's Guide

This PR modernizes the GitLab CI by replacing legacy linting and unit test jobs with tmt-based plans executed on Testing Farm, exposes environment configuration through CI variables and matrices, and adds corresponding tmt plan and test definitions.

File-Level Changes

Change Details Files
Overhaul of .gitlab-ci.yml to use testing-farm and tmt
  • Removed legacy Python, linter and tier1 trigger jobs
  • Added new CI variables for FIPS, plan/test filters, TFCLI settings
  • Defined a .parallel matrix on COMPOSE_NAME with per-compose variable rules
  • Implemented tf_tests job using testing-farm request with output capture
  • Introduced download_artifacts_from_tf anchor and after_script cancellation logic
.gitlab-ci.yml
Added tmt plans and test orchestration scripts
  • Created tmt/tests scripts for tier1 tests, test list validation, and Python unit tests
  • Added playbook_setup_configs.yml to configure ansible/pcsd in tmt plans
  • Added FMF metadata files under tmt/plans and tmt/tests to define plan and test suites
tmt/tests/run_tier1_test.sh
tmt/tests/check_tier1_test_list.sh
tmt/tests/python_unit_tests.sh
tmt/plans/ansible_versions/playbook_setup_configs.yml
tmt/plans/ansible_versions/ansible_29.fmf
tmt/plans/ansible_versions/ansible_current.fmf
tmt/plans/ansible_versions/main.fmf
tmt/plans/main.fmf
tmt/tests/ignore_tests_file_rhel-8.txt
tmt/tests/linters.fmf
tmt/tests/main.fmf
tmt/tests/python_unit_tests.fmf
tmt/tests/tier1.fmf
Disabled pylint naming warnings for imported error constants
  • Added # pylint: disable=invalid-name comment on DACITE_IMPORT_ERROR and PCS_IMPORT_ERROR assignments
module_utils/ha_cluster_lsr/pcs_api_v2_utils.py
library/pcs_api_v2.py
library/pcs_qdevice_certs.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

else:
HAS_PCS = True
PCS_IMPORT_ERROR = None
PCS_IMPORT_ERROR = None # pylint: disable=invalid-name

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'PCS_IMPORT_ERROR' is not used.
else:
HAS_PCS = True
PCS_IMPORT_ERROR = None
PCS_IMPORT_ERROR = None # pylint: disable=invalid-name

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'PCS_IMPORT_ERROR' is not used.
@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.08%. Comparing base (fab3254) to head (ae6805b).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #321      +/-   ##
==========================================
+ Coverage   88.32%   89.08%   +0.75%     
==========================================
  Files          11       13       +2     
  Lines         891      980      +89     
==========================================
+ Hits          787      873      +86     
- Misses        104      107       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

astroid is the correct name of a python pip package, but codespell
insists that it is a typo. Since astroid is a dependency of pylint, we
actually do not need to install it explicitly.
@tomjelinek tomjelinek merged commit 009d075 into linux-system-roles:main Oct 17, 2025
35 checks passed
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.

2 participants