Skip to content

Update Python supported versions for cloud-governance#956

Merged
ebattat merged 1 commit into
redhat-performance:mainfrom
pragya811:python-upgrade
Dec 2, 2025
Merged

Update Python supported versions for cloud-governance#956
ebattat merged 1 commit into
redhat-performance:mainfrom
pragya811:python-upgrade

Conversation

@pragya811

@pragya811 pragya811 commented Dec 2, 2025

Copy link
Copy Markdown
Member

Type of change

Note: Fill x in []

  • bug
  • enhancement
  • documentation
  • dependencies

Description

Remove support for Python 3.8 and 3.9 and add for 3.13 and 3.14

  1. Ran pytest with versions 3.13 and 3.14:
Pasted Graphic Pasted Graphic 1
  1. Ran docker container using python3.13-slim and python3.14-slim
(.venv2) pragchau:cloud-governance (main) % docker images
REPOSITORY         TAG         IMAGE ID       CREATED          SIZE
cloud-governance   3.13        323f57d2c17b   20 seconds ago   1.85GB
cloud-governance   3.14        d2bf2afec4a7   2 hours ago      1.88GB
python             3.13-slim   326df678c20c   2 weeks ago      201MB
python             3.14-slim   0aecac02dc3d   2 weeks ago      202MB
(.venv2) pragchau:cloud-governance (main) % docker run \
  --rm \
  -e AWS_ACCESS_KEY_ID="${ACCESS_KEY_ID}" \
  -e AWS_SECRET_ACCESS_KEY="${SECRET_ACCESS_KEY}" \
  -e AWS_DEFAULT_REGION="${REGION}" \
  -e policy="${POLICY}" \
  -e policy_output="${POLICY_OUTPUT}" \
  -e RUNNER_PATH="/tmp" \
  -v "$(pwd):/app" \
  --workdir /app \
  cloud-governance:3.13 \
  /bin/bash -c "
    PYTHONPATH=. python cloud_governance/main/main.py
  "
  from pkg_resources import resource_filename
[WARNING] 2025-12-02 12:57:56,423 None - Method name: main , Start time: 2025-12-02 12:57:56 
[INFO] 2025-12-02 12:57:56,423 None - Method name: main {}
[INFO] 2025-12-02 12:57:56,423 None - Running polices: ['instance_idle']
[INFO] 2025-12-02 12:57:56,425 None - CloudName=AWS, account=***, policy=instance_idle, dry_run=True
[INFO] 2025-12-02 12:57:56,492 None - Running the instance_idle in Region: us-east-2
[INFO] 2025-12-02 12:58:02,957 None - key: InstanceIdle, count: 0, []

For 3.14:

(.venv1) pragchau:cloud-governance (python-upgrade) % docker run \
  --rm \
  -e AWS_ACCESS_KEY_ID="${ACCESS_KEY_ID}" \
  -e AWS_SECRET_ACCESS_KEY="${SECRET_ACCESS_KEY}" \
  -e AWS_DEFAULT_REGION="${REGION}" \
  -e policy="${POLICY}" \
  -e policy_output="${POLICY_OUTPUT}" \
  -e RUNNER_PATH="/tmp" \
  -v "$(pwd):/app" \
  --workdir /app \
  cloud-governance:3.14 \
  /bin/bash -c "
    PYTHONPATH=. python cloud_governance/main/main.py
  "

  from pkg_resources import resource_filename
[WARNING] 2025-12-02 13:37:37,265 None - Method name: main , Start time: 2025-12-02 13:37:37 
[INFO] 2025-12-02 13:37:37,265 None - Method name: main {}
[INFO] 2025-12-02 13:37:37,266 None - Running polices: ['instance_idle']
[INFO] 2025-12-02 13:37:37,267 None - CloudName=AWS, account=**, policy=instance_idle, dry_run=True
[INFO] 2025-12-02 13:37:37,404 None - Running the instance_idle in Region: us-east-2
[INFO] 2025-12-02 13:37:44,030 None - key: InstanceIdle, count: 0, []

For security reasons, all pull requests need to be approved first before running any automated CI

@pragya811 pragya811 requested review from ebattat and inntran December 2, 2025 13:39
@pragya811 pragya811 self-assigned this Dec 2, 2025
@pragya811 pragya811 added the ok-to-test PR ok to test label Dec 2, 2025

@inntran inntran left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should keep 3.9, 3.13, 3.14.
Since we are using OS supplied Python, it's better to check which version of Python does an OS provides.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think CentOS Stream 8 has Python 3.14.

@ebattat ebattat merged commit dc170f1 into redhat-performance:main Dec 2, 2025
18 checks passed
ebattat added a commit that referenced this pull request Dec 2, 2025
ebattat added a commit that referenced this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test PR ok to test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants