powerpipe icon indicating copy to clipboard operation
powerpipe copied to clipboard

present common dimensions in a standard order

Open judell opened this issue 2 years ago • 10 comments

When I add connection_name as a common dimension, I can get different orderings of common dimensions across controls. Ideally it would always be the same, and would be the order in which I named them in spvars.

image

judell avatar Feb 21 '23 23:02 judell

When you use tag_dimensions they can also show up in an unexpected order.

Given this setup:

variable "common_dimensions" {
  type        = list(string)
  default     = [ "connection_name", "region" ]
}

variable "tag_dimensions" {
  type        = list(string)
  description = "A list of tags to add as dimensions to each control."
  default     = [ "Name", "Project"]
}

I'm seeing rows like:

Cairo aws_mifflin us-west-2 Linux Test

where:

Cairo is the value of a Project tag

aws_mifflin is a connection name

us-west-2 is (obviously) a region

Linux Test is the value of a Name tag

judell avatar Feb 22 '23 20:02 judell

@judell Are you seeing the same ordering errors when running steampipe check benchmark.ec2 (along with any other benchmarks you are testing in)?

I couldn't reproduce the ordering issue through the steampipe check command, but through steampipe dashboard I consistently had 2-3 controls with the additional dimensions in different orders.

I thought there may be an issue due to the lack of alias, so the connection name info would come under the ?column? column, but even adding an alias of connection_name in the locals definition didn't appear to fix it.

cbruno10 avatar Feb 24 '23 20:02 cbruno10

The dashboard UI is using the same logic as the CLI - that is, the order of the non-standard control columns in the results columns are used as the order for the dimensions. In the examples above, the UI is presenting the columns in the order it received them for that control.

Looking into the AWS Thrifty mod it seems like the order should be consistent due to the use of locals to inject them into the queries.

I think we'll need @kaidaguerre to take a look and see why we might be getting different column ordering in the controls sent across the socket to the dashboard UI.

MichaelBurgess avatar Feb 28 '23 14:02 MichaelBurgess

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Apr 30 '23 08:04 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Jun 30 '23 08:06 github-actions[bot]

This issue was closed because it has been stalled for 90 days with no activity.

github-actions[bot] avatar Jul 30 '23 08:07 github-actions[bot]

@kaidaguerre Have you had a chance to look at this issue at all? I'm running into the same issue as @judell where I have a few controls in a benchmark that have the same set of additional dimensions in the same order, but when running them in steampipe dashboard, they can come in different orders.

When I run through steampipe check, the order is preserved and consistent though.

cbruno10 avatar Aug 01 '23 17:08 cbruno10

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Oct 01 '23 08:10 github-actions[bot]

This issue was closed because it has been stalled for 90 days with no activity.

github-actions[bot] avatar Oct 31 '23 08:10 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar May 19 '24 08:05 github-actions[bot]

This issue was closed because it has been stalled for 90 days with no activity.

github-actions[bot] avatar Jun 18 '24 08:06 github-actions[bot]