Skip to content

ci: modernize CI pipeline and add example validation#412

Open
AswaniSahoo wants to merge 1 commit into
kubeedge:mainfrom
AswaniSahoo:ci/modernize-python-matrix
Open

ci: modernize CI pipeline and add example validation#412
AswaniSahoo wants to merge 1 commit into
kubeedge:mainfrom
AswaniSahoo:ci/modernize-python-matrix

Conversation

@AswaniSahoo
Copy link
Copy Markdown

What this PR does

Modernizes the CI pipeline and adds a new example validation job to catch configuration and syntax errors in examples before they are merged.

Changes

CI Pipeline Updates (.github/workflows/main.yaml):

  • Update Python test matrix from [3.7, 3.8, 3.9] to [3.9, 3.10, 3.11, 3.12]
    • 3.7, 3.8 are EOL (June 2023, October 2024 respectively)
    • 3.9 is retained as minimum for backward compatibility (EOL October 2025)
    • 3.10-3.12 are currently supported by the Python Software Foundation
  • Update actions/checkout from v3 to v4 and actions/setup-python from v3 to v5 (v3 uses deprecated Node.js 16 runtime)
  • Replace hardcoded pip==24.0 with pip install --upgrade pip
  • Apply --max-positional-arguments=10 universally for pylint (no longer needs Python version conditional since all matrix entries now install pylint >= 3.3.0, see Pylint Errors Due to Compatibility Issues with Pylint3.9 #157)
  • Add new example-validation job that:
    • Validates all 37 benchmarkingjob.yaml files are parseable
    • Checks all 542 example Python files for syntax errors
    • Verifies core ianvs package can be imported after installation

Minimum Python Version (setup.py):

  • Update python_requires from ">=3.6" to ">=3.9"
  • Update version assertion to match

YAML Bug Fix (examples/cifar100/fci_ssl/fedavg/benchmarkingjob.yaml):

  • Fix syntax error on line 17: algorithms:condaalgorithms: (accidental concatenation, discovered during local validation testing)

Local Verification

Ran validation locally before submitting:

YAML:   37/37 files passed (after fixing the pre-existing error)
Python: 542/542 files passed - no syntax errors

Relationship to #230

This addresses the CI pipeline component of the Comprehensive Example Restoration initiative:

"Build a CI pipeline testing examples with GitHub Actions against multiple Python versions, critical Ianvs/upstream updates, and block PRs that break validated examples"

Fixes #411

@kubeedge-bot kubeedge-bot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label May 2, 2026
@kubeedge-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AswaniSahoo
To complete the pull request process, please assign jaypume after the PR has been reviewed.
You can assign the PR to them by writing /assign @jaypume in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot
Copy link
Copy Markdown
Collaborator

Welcome @AswaniSahoo! It looks like this is your first PR to kubeedge/ianvs 🎉

@kubeedge-bot kubeedge-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 2, 2026
@AswaniSahoo AswaniSahoo force-pushed the ci/modernize-python-matrix branch from 8730f80 to 1eee2e6 Compare May 2, 2026 22:41
@kubeedge-bot kubeedge-bot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label May 2, 2026
@AswaniSahoo AswaniSahoo force-pushed the ci/modernize-python-matrix branch from 1eee2e6 to c186479 Compare May 2, 2026 22:43
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the minimum Python version requirement to 3.9 in setup.py and corrects a syntax error in the benchmarkingjob.yaml configuration. Feedback was provided to replace the assert statement for the Python version check with an explicit if condition and sys.exit() to ensure the check is not bypassed when running Python with optimization flags.

Comment thread setup.py Outdated
- Update Python matrix from [3.7, 3.8, 3.9] to [3.9, 3.10, 3.11, 3.12]

- Update actions/checkout v3->v4, actions/setup-python v3->v5

- Replace hardcoded pip==24.0 with pip install --upgrade pip

- Add example-validation job (YAML, Python syntax, import checks)

- Update python_requires from >=3.6 to >=3.9 in setup.py

- Fix YAML syntax error in cifar100/fci_ssl/fedavg/benchmarkingjob.yaml

Signed-off-by: AswaniSahoo <aswanisahoo1012@gmail.com>
@AswaniSahoo AswaniSahoo force-pushed the ci/modernize-python-matrix branch from c186479 to 07d229b Compare May 8, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI/CD] Modernize CI Pipeline: Update Python Matrix, Actions Versions, and Add Example Validation

2 participants