Skip to content

Conversation

@JAVGan
Copy link
Collaborator

@JAVGan JAVGan commented Nov 18, 2024

This commit fixes a bug on update_skus which happens whenever a plan has just a single generation set on SKU.

In the previous versions it was looking only for the SKU ID suffix to determine the default and alternate gen, which was enough for all cases with 2 generations defined but would cause a bug (renaming the SKU ID) whenever a single generation was originally set.

With this fix it looks not only in the SKU ID suffix but also on SKU image type to determine which generation is the default and which is the alternate to prevent renaming the default.

Refers to SPSTRAT-462

@JAVGan
Copy link
Collaborator Author

JAVGan commented Nov 18, 2024

@lslebodn @jajreidy PTAL

This commit fixes a bug on `update_skus` which happens whenever a plan
has just a single generation set on SKU.

In the previous versions it was looking only for the SKU ID suffix to
determine the default and alternate gen, which was enough for all cases
with 2 generations defined but would cause a bug (renaming the SKU ID)
whenever a single generation was originally set.

With this fix it looks not only in the SKU ID suffix but also on SKU
image type to determine which generation is the default and which is the
alternate to prevent renaming the default.

Refers to SPSTRAT-462
Copy link
Collaborator

@jajreidy jajreidy left a comment

Choose a reason for hiding this comment

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

LGTM!

@JAVGan JAVGan merged commit f3e81b7 into main Nov 21, 2024
22 checks passed
@JAVGan JAVGan deleted the genfix branch November 21, 2024 13:39
JAVGan added a commit that referenced this pull request Nov 27, 2024
The PR #68 removed the loop iteration over all SKUs which were not
required for detecting the default/alternate generations for `x64`,
however such iteration is required to detect the `security_type`.

This commit fixes it by creating a dedicated helper function
`_get_security_type` for this purpose only.
JAVGan added a commit that referenced this pull request Nov 27, 2024
The PR #68 removed the loop iteration over all SKUs which were not
required for detecting the default/alternate generations for `x64`,
however such iteration is required to detect the `security_type`.

This commit fixes it by creating a dedicated helper function
`_get_security_type` for this purpose only.
JAVGan added a commit that referenced this pull request Dec 9, 2024
The PR #68 removed the loop iteration over all SKUs which were not
required for detecting the default/alternate generations for `x64`,
however such iteration is required to detect the `security_type`.

This commit fixes it by creating a dedicated helper function
`_get_security_type` for this purpose only.
JAVGan added a commit that referenced this pull request Dec 11, 2024
The PR #68 removed the loop iteration over all SKUs which were not
required for detecting the default/alternate generations for `x64`,
however such iteration is required to detect the `security_type`.

This commit fixes it by creating a dedicated helper function
`_get_security_type` for this purpose only.
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