Add root volume size column to order by clause in CloudInstanceTypeStateIngestor.php#2056
Merged
eiffel777 merged 3 commits intoubccr:mainfrom Jul 8, 2025
Merged
Conversation
aaronweeden
approved these changes
Jul 8, 2025
aaronweeden
pushed a commit
to aaronweeden/xdmod
that referenced
this pull request
Jul 8, 2025
…-order Add root volume size column to order by clause in CloudInstanceTypeStateIngestor.php
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
There exists a scenario that when you
This scenario produces an
Integrity Constraint Violationerror onmodw_cloud.instance_type.The cause of this is multiple rows in
modw_cloud.instance_type_stagingthat have the sameresource_id, instance_type, num_cores, memory_mb, start time, and disk_gb. When theCloudInstanceTypeStateIngestorruns it uses the order of the rows to check for changes to an instance type over time. Adding thedisk_gbcolumn to the order ensures that rows withresource_id, instance_type, num_cores, memory_mb, start time, and disk_gbthe same are collapsed into the same row whenCloudInstanceTypeStateIngestoris run and prevents theIntegrity Constraint Violationerror.Tests performed
Tested on xdmod-dev where I first ran into the issue.
Checklist: