-
Notifications
You must be signed in to change notification settings - Fork 2
Replace 2024.1 upper constraint with 2025.1 #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @MaxBed4d, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request aims to synchronize the project's Python dependency management with the latest OpenStack release cycle. By updating the upper constraints file to Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this 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 correctly updates the OpenStack upper constraints version from 2024.1 to 2025.1 across multiple roles. My review focuses on improving maintainability by addressing the repeated hardcoding of the constraints URL. I've suggested using a common Ansible variable to define the URL in a single place, which will simplify future updates. I also found an outdated code comment that should be updated.
| os_container_clusters_templates: [] | ||
| # Upper constraints file for installation of python dependencies. | ||
| os_container_clusters_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_container_clusters_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_container_clusters_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"|
|
||
| # Upper constraints file for installation of Python dependencies. | ||
| os_deploy_templates_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_deploy_templates_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_deploy_templates_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"|
|
||
| # Use Caracal upper constraints | ||
| os_images_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_images_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on the preceding line (15), # Use Caracal upper constraints, is now outdated. The 2024.1 release corresponded to Caracal, but this has been updated to 2025.1. To prevent confusion, please update this comment. Using a more generic description like Upper constraints file for installation of Python dependencies. would be more robust for future updates.
|
|
||
| # Use Caracal upper constraints | ||
| os_images_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_images_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_images_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"|
|
||
| # Upper constraints file for installation of Python dependencies. | ||
| os_networks_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_networks_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_networks_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"| os_openstacksdk_version: | ||
| # Upper constraints file for installation of openstacksdk. | ||
| os_openstacksdk_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_openstacksdk_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_openstacksdk_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"| - role: stackhpc.openstack.os_projects | ||
| os_projects_venv: "~/os-projects-venv" | ||
| os_projects_upper_constraints_file: "https://releases.openstack.org/constraints/upper/2024.1" | ||
| os_projects_upper_constraints_file: "https://releases.openstack.org/constraints/upper/2025.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example hardcodes the upper constraints URL. To align with best practices for maintainability (as suggested for the role defaults), consider updating this example to use a variable for the URL. This demonstrates a more robust configuration pattern to users.
For example:
- name: Ensure OpenStack projects are registered
hosts: localhost
vars:
upper_constraints_url: "https://releases.openstack.org/constraints/upper/2025.1"
roles:
- role: stackhpc.openstack.os_projects
os_projects_venv: "~/os-projects-venv"
os_projects_upper_constraints_file: "{{ upper_constraints_url }}"
# ... rest of the config| # 'quotas': Optional dict mapping quota names to their values. | ||
| os_projects: [] # noqa var-naming[no-role-prefix] | ||
| os_projects_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_projects_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_projects_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"| os_ratings_venv: | ||
| # Upper constraints file for installation of Python dependencies. | ||
| os_ratings_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_ratings_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_ratings_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"|
|
||
| # A file or URL containing Python upper constraints. | ||
| os_volumes_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1 | ||
| os_volumes_upper_constraints_file: https://releases.openstack.org/constraints/upper/2025.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, this hardcoded URL can be made overridable by a common variable. This centralizes the configuration and simplifies future updates.
os_volumes_upper_constraints_file: "{{ os_upper_constraints_file | default('https://releases.openstack.org/constraints/upper/2025.1') }}"
Simple update of the upper constraint file from
2024.1to2025.1