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

Blank aggregator connections are not created #3488

Closed
binaek opened this issue May 29, 2023 · 4 comments
Closed

Blank aggregator connections are not created #3488

binaek opened this issue May 29, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@binaek
Copy link
Contributor

binaek commented May 29, 2023

If an aggregator connection does not have any underlying connection at the outset, it is not created - even after connections are added which satisfy the aggregator search pattern

@binaek binaek added the bug Something isn't working label May 29, 2023
@sidr0cker
Copy link

Configured my aggregator file to target all aws connections prior to configuring any connections.
Screenshot 2023-05-29 at 3 01 13 PM

@sidr0cker
Copy link

Even though I have a single aws connection configured, I cannot query my aggregator.
Screenshot 2023-05-29 at 3 02 59 PM

@binaek
Copy link
Contributor Author

binaek commented May 29, 2023

Because the aggregator.spc file is created before the connections.spc file, during the time of creation, the search pattern in the aggregators is not resolving to any connections - therefore, the schema for the aggregator connection is not created in the service.

@pskrbasu
Copy link
Contributor

Steps to reproduce(in a fresh steampipe install):

  • install was plugin
  • steampipe service start(keep running)
  • add an aggregator connection in a file aws_agg.spc
connection "all_aws" {
  type        = "aggregator"
  plugin      = "aws"
  connections = ["*"]
}
  • do not add any other connections
  • steampipe query
  • will show a warning that connections = ["*"] isn't met as there are no other aws connections.
  • select * from all_aws.aws_account - should return empty
  • throws error: relation all_aws not found

Now,

  • add a connection in a file aws.spc
connection "aws" {
  plugin    = "aws"
  regions   = ["*"]
  profile   = "whatever"
}
  • now the aggregator connection(all_aws) should have a connection to aggregate
  • no more warnings
  • select * from all_aws.aws_account - should return values
  • throws error: relation all_aws not found

This is because the schema for the aggregator connection is not created in the service.

Creating an aws connection first does not cause this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants