Skip to content
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

changing account, instance and instance_type tables to have global un… #1272

Merged

Conversation

eiffel777
Copy link
Contributor

This PR fixes the below error seen on metrics-dev

2020-03-27 04:12:58 [warning] SQL warnings on table 'account' generated by action xdmod.jobs-cloud-common.CloudUnknownDimensionInitializer
2020-03-27 04:12:58 [warning] Warning   1062    Duplicate entry '1' for key 'autoincrement_key'
2020-03-27 04:12:58 [warning] SQL warnings on table 'instance' generated by action xdmod.jobs-cloud-common.CloudUnknownDimensionInitializer
2020-03-27 04:12:58 [warning] Warning   1062    Duplicate entry '1' for key 'increment_key'
2020-03-27 04:12:58 [warning] SQL warnings on table 'instance_type' generated by action xdmod.jobs-cloud-common.CloudUnknownDimensionInitializer
2020-03-27 04:12:58 [warning] Warning   1062    Duplicate entry '1' for key 'increment_key'

This was caused by changing the autoincrement keys of the instance, instance_type and account tables to a singe column autoincrement key in #3333. The fix involves moving the making of the unknown dimension values for those tables into their own action that will add a global unknown value with a resource_id of -1 and an id column with the value 1.

Tests performed

Ran test suite in docker and manually tested that no warning showed up when ingesting cloud files and running the xdmod.jobs-cloud-common.CloudUnknownDimensionInitializer action

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@eiffel777 eiffel777 added bug Bugfixes Category:Cloud Cloud Realm labels Mar 27, 2020
@eiffel777 eiffel777 added this to the 9.0.0 milestone Mar 27, 2020
@eiffel777 eiffel777 self-assigned this Mar 27, 2020
@eiffel777 eiffel777 merged commit baf6eae into ubccr:xdmod9.0 Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes Category:Cloud Cloud Realm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants