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

Failed to populate column 'akas' in aws_health_affected_entity, panic runtime error 😱 #2183

Closed
dalenewman opened this issue May 4, 2024 · 5 comments · Fixed by #2189
Closed
Assignees
Labels
bug Something isn't working

Comments

@dalenewman
Copy link

Describe the bug
When I select * from aws.aws_health_affected_entity I get the error:

ERROR:  rpc error: code = Unknown desc = aws: failed to populate column 'akas': rpc error: code = Internal desc = transform EnsureStringArray failed with panic runtime error: invalid memory address or nil pointer dereference 

Steampipe version (steampipe -v)
Example: v0.22.2

Plugin version (steampipe plugin list)
Example: v0.137.0

To reproduce
When I select * from aws.aws_health_affected_entity I get the error:

ERROR:  rpc error: code = Unknown desc = aws: failed to populate column 'akas': rpc error: code = Internal desc = transform EnsureStringArray failed with panic runtime error: invalid memory address or nil pointer dereference 

Expected behavior
It should return some results, because I have 21 records from select * from aws.aws_health_event with lots of open and upcoming events.

Additional context
I am querying against an AWS gov-cloud account.

@dalenewman dalenewman added the bug Something isn't working label May 4, 2024
@ParthaI ParthaI self-assigned this May 5, 2024
@ParthaI
Copy link
Contributor

ParthaI commented May 6, 2024

Hi @dalenewman, I'm sorry to hear about the issues you're encountering. Unfortunately, I was unable to make the DescribeEvents API call in our test environment since our current plan is Basic, and only Business or Enterprise plans can access the AWS Health API.

I've made some updates in the branch issue-2183, including adding a few log statements to the plugin code to help us delve deeper into the issues.

Could you please run the query with the log level set to Debug using the changes in the issue-2183 branch, and then share the plugin logs from the folder ~/.steampipe/logs/plugin-*.log (after removing any sensitive information)?

Here are the steps to run the query with the changes pushed to the branch issue-2183:

  • Clone the repository: git clone https://github.com/turbot/steampipe-plugin-aws.git
  • Change to the directory: cd steampipe-plugin-aws
  • Switch to the branch: git checkout issue-2183
  • Build the plugin: make
  • Set the log level: export SP_LOG=DEBUG
  • Execute the query: select * from aws_health_affected_entity

Thanks for your help!

@dalenewman
Copy link
Author

Attached
plugin-2024-05-06.log

@ParthaI
Copy link
Contributor

ParthaI commented May 6, 2024

Hello @dalenewman, thank you for providing the log details.

I've made another commit to the issue-2183 branch that includes updates to the code to address the nil pointer dereference error.

Could you please pull the latest changes from the issue-2183 branch into your local environment and attempt to run the query again after building the plugin locally?

Before you run the query, ensure that all Steampipe processes are terminated.
Additionally, if you don't encounter any errors, could you please share the results for the query select * from aws_health_affected_entity where akas is null;? Be sure to remove any sensitive information beforehand. I would like to understand the result set that might be contributing to the issue.

Thank you!

@dalenewman
Copy link
Author

dalenewman commented May 7, 2024

Attached Results. Looks like an EC2 operational issue. It has no akas, nor arn.
affected-entity-with-akas-null.csv
corresponding-event.csv

image

@ParthaI
Copy link
Contributor

ParthaI commented May 8, 2024

Thank you, @dalenewman, for providing the information. From the results, I can see that if we have an operational issue entity, there will not be an ARN for it. I believe the fix appears to be effective. I'll proceed with some code cleanup in the branch and prepare it for review. Thanks again for your assistance!

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
2 participants