Group by fixes action files#2248
Open
kylershih0614 wants to merge 5 commits into
Open
Conversation
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
Edited configuration/etl/etl_action_defs.d folder to abide by SQL strict mode.
Added "processorbucket_id", "gpubucket_id" fields in configuration/etl/etl_action_defs.d/jobs/hpc-aggregation-day.json.
Added "sp.organization_id", "act.account_id" fields in configuration/etl/etl_action_defs.d/cloud_generic/instance.json.
Wrapped date and times in MIN() inside of configuration/etl/etl_action_defs.d/cloud_generic/instance_type.json and added "description" as a field in the group by.
Added "raw.project_name" field in configuration/etl/etl_action_defs.d/cloud_openstack/account.json.
Added "act.account_id", "sp.organization_id" fields in configuration/etl/etl_action_defs.d/cloud_openstack/instance.json.
Wrapped the denominator inside of configuration/etl/etl_action_defs.d/jobs/hpc-aggregation-day.json with a NULLIF().
Wrapped the denominator inside of configuration/etl/etl_action_defs.d/jobs/hpc-aggregation.json with a NULLIF() and added "processorbucket_id", "gpubucket_id" fields.
Added rs.memory_mb, rs.vcpus fields to the SQL group by in configuration/etl/etl_sql.d/cloud_common/resource_specification_end_day.sql.
Motivation and Context
This change was addressing the ONLY_FULL_GROUP_BY error when running individual tests on these files. This solves the issue of these action files failing when tested with FULL_GROUP_BY turned on. The records fields were not all in the group by sections and they need to be added to abide by ONLY_FULL_GROUP_BY.
Tests performed
When running the automated test suite with ONLY_FULL_GROUP_BY turned on, the tests fail.
I tested my changes using this individual test php /usr/share/xdmod/tools/etl/etl_overseer.php -a xdmod.<pipeline_name> .<name_of_action> -v debug
I tested every single one of the files that had a group by statement in configuration/etl/etl_action_defs.d with the aforementioned command and all of them passed without issue.
Checklist: