Skip to content

DON'T REVIEW. Fix JSON generator for 5.2#1956

Draft
srbarrios wants to merge 4 commits intomasterfrom
fix-json-generator
Draft

DON'T REVIEW. Fix JSON generator for 5.2#1956
srbarrios wants to merge 4 commits intomasterfrom
fix-json-generator

Conversation

@srbarrios
Copy link
Copy Markdown
Member

This pull request refactors how Uyuni Tools SLES repository data is structured and processed in the v52_nodes.py module. The main improvement is the transition from using sets of repository paths to using dictionaries with descriptive keys for each repository. This change enhances clarity, maintainability, and future extensibility of the repository data. Additionally, the logic in the get_v52_static_and_client_tools function is updated to accommodate this new structure and improve error handling.

Repository data structure improvements:

  • Changed v52_uyuni_tools_sles_repos and v52_uyuni_tools_sles_repos_beta from Dict[str, Set[str]] to Dict[str, Dict[str, str]], using descriptive keys for each repository path to improve readability and maintainability. [1] [2]
  • Updated import statements to include Tuple from typing to support new function signatures.

Function signature and logic updates:

  • Modified the return type of get_v52_static_and_client_tools to use Tuple[Dict[str, Dict[str, str]], Dict[str, Set[str]]] for better type safety and clarity.
  • Refactored the logic in get_v52_static_and_client_tools to:
    • Properly handle the new dictionary structure for Uyuni Tools repos,
    • Add error handling for invalid variants,
    • Separate static and dynamic maintenance repositories based on path content.

@srbarrios srbarrios self-assigned this Mar 25, 2026
@srbarrios srbarrios requested review from a team and Copilot March 25, 2026 15:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the MLM/Uyuni Tools repository definitions for version 5.2 in v52_nodes.py, changing the SLES repo mappings from sets of paths to dictionaries keyed by descriptive repo names and updating get_v52_static_and_client_tools to merge repos using the new structure.

Changes:

  • Converted v52_uyuni_tools_sles_repos and v52_uyuni_tools_sles_repos_beta from Dict[str, Set[str]] to Dict[str, Dict[str, str]] with descriptive keys.
  • Updated get_v52_static_and_client_tools to handle the new repo structure and to split repos into static vs dynamic buckets based on path content.
  • Updated typing imports/signatures to reflect the new return and repo structures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread jenkins_pipelines/scripts/json_generator/repository_versions/v52_nodes.py Outdated
Comment thread jenkins_pipelines/scripts/json_generator/repository_versions/v52_nodes.py Outdated
…52_nodes.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread jenkins_pipelines/scripts/json_generator/repository_versions/v52_nodes.py Outdated
Comment thread jenkins_pipelines/scripts/json_generator/repository_versions/v52_nodes.py Outdated
Copy link
Copy Markdown
Contributor

@maximenoel8 maximenoel8 left a comment

Choose a reason for hiding this comment

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

This change is breaking the alignment with 5.1.
Either we change 5.1 too or we keep the list.

@srbarrios srbarrios dismissed maximenoel8’s stale review March 26, 2026 14:48

Changes has been reverted.

@srbarrios srbarrios marked this pull request as draft March 26, 2026 16:02
@srbarrios srbarrios changed the title Fix JSON generator for 5.2 DON'T REVIEW. Fix JSON generator for 5.2 Mar 26, 2026
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.

3 participants