Skip to content

Fix Rocky minor version strict typing#2174

Merged
Alex-Welsh merged 1 commit intostackhpc/2025.1from
fix-rocky-minor-version-type
Feb 25, 2026
Merged

Fix Rocky minor version strict typing#2174
Alex-Welsh merged 1 commit intostackhpc/2025.1from
fix-rocky-minor-version-type

Conversation

@Alex-Welsh
Copy link
Member

I ran the pulp-repo-sync.yml and got a very long error trace that ended like this:

No variable found with this name: stackhpc_pulp_repo_doca_2_9_1_rhel9_7_version 

After a bit of fishing, I found that the issue was I had set:
stackhpc_pulp_repo_rocky_9_minor_version: 7
and not
stackhpc_pulp_repo_rocky_9_minor_version: '7'
i.e. the minor version was an integer, not a string.
That meant this this lookup failed:

stackhpc_pulp_doca_version_matrix:
    "6": 2.9.3
    "7": 3.2.1

Fixed by a string filter on the lookup. Same fix applied to other instances where the minor version is used

@Alex-Welsh Alex-Welsh requested a review from a team as a code owner February 24, 2026 15:47
@Alex-Welsh Alex-Welsh requested a review from elelaysh February 24, 2026 15:49
Copy link
Contributor

@elelaysh elelaysh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix

Copy link
Contributor

@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 addresses a bug where an integer-typed Rocky minor version caused a lookup failure in dictionaries with string keys. The changes correctly apply the | string filter to the version variable before using it as a dictionary key. My review includes a suggestion to improve the robustness of one of the lookups by using the .get() method to provide a default value, which corrects a subtle issue with the current use of the default filter.

@Alex-Welsh Alex-Welsh merged commit 357c170 into stackhpc/2025.1 Feb 25, 2026
40 of 42 checks passed
@Alex-Welsh Alex-Welsh deleted the fix-rocky-minor-version-type branch February 25, 2026 12:35
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