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

Steampipe commands do not always respect requirements in mod.sp require section #1711

Closed
cbruno10 opened this issue Mar 18, 2022 · 0 comments · Fixed by #1712
Closed

Steampipe commands do not always respect requirements in mod.sp require section #1711

cbruno10 opened this issue Mar 18, 2022 · 0 comments · Fixed by #1712
Assignees
Labels
bug Something isn't working

Comments

@cbruno10
Copy link
Contributor

cbruno10 commented Mar 18, 2022

Describe the bug
Based on testing Steampipe and plugin requirements in mod.sp, sometimes the dependency is respected, other times not.

steampipe version requirements

If I have:

mod "my_mod" {
  # hub metadata
  title       = "My Mod"
  description = "My mod"

  require {
    steampipe = "0.13.3"
  }
}

And my Steampipe version is v0.13.2-rc.0, the following happens for each command:

  • steampipe dashboard - The dashboard server starts OK (not expected), but when I try to load any dashboard or report, the server crashes with:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x60 pc=0x1036a9650]

goroutine 72 [running]:
github.com/turbot/steampipe/dashboard/dashboardexecute.(*LeafRun).Execute(0x14000121900, {0x103e76a20, 0x140006fa0c0})
	/home/runner/work/steampipe/steampipe/dashboard/dashboardexecute/leaf_run.go:118 +0x1a0
created by github.com/turbot/steampipe/dashboard/dashboardexecute.(*DashboardContainerRun).Execute
	/home/runner/work/steampipe/steampipe/dashboard/dashboardexecute/container_run.go:116 +0x26c
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x60 pc=0x1036a9650]

goroutine 44 [running]:
github.com/turbot/steampipe/dashboard/dashboardexecute.(*LeafRun).Execute(0x1400074db00, {0x103e76a20, 0x140006fa0c0})
	/home/runner/work/steampipe/steampipe/dashboard/dashboardexecute/leaf_run.go:118 +0x1a0
created by github.com/turbot/steampipe/dashboard/dashboardexecute.(*DashboardContainerRun).Execute
	/home/runner/work/steampipe/steampipe/dashboard/dashboardexecute/container_run.go:116 +0x26c
  • steampipe query - The interactive session starts ok (not expected), and I can run queries
  • steampipe check all - The checks are not run and an error message is returned, e.g., Error: steampipe version 0.13.2-rc.0 does not satisfy mod.my_mod which requires version 0.13.3 (expected)

plugin version requirements

If I have:

mod "my_mod" {
  # hub metadata
  title       = "My Mod"
  description = "My mod"

  require {
    plugin "gcp" {
      version = "0.21.0"
    }
  }
}

And my GCP plugin version is v0.20.0, the following happens for each command:

  • steampipe dashboard - The dashboard server starts OK (not expected), but when I try to load any dashboard or report, the server crashes with:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x60 pc=0x104ea9650]

goroutine 102 [running]:
github.com/turbot/steampipe/dashboard/dashboardexecute.(*LeafRun).Execute(0x14000858400, {0x105676a20, 0x14000d07440})
	/home/runner/work/steampipe/steampipe/dashboard/dashboardexecute/leaf_run.go:118 +0x1a0
created by github.com/turbot/steampipe/dashboard/dashboardexecute.(*DashboardContainerRun).Execute
	/home/runner/work/steampipe/steampipe/dashboard/dashboardexecute/container_run.go:116 +0x26c
  • steampipe query - The interactive session does not start and returns an error (expected):
Error: 1 mod plugin requirement not satisfied.

  turbot/gcp  0.20.0  →  0.21.0
  • steampipe check all - The checks are not run and an error message is returned (expected):
Error: 1 mod plugin requirement not satisfied.

  turbot/gcp  0.20.0  →  0.21.0

Steampipe version (steampipe -v)
v0.13.2-rc.0

To reproduce
Please see above

Expected behavior
Steampipe should not allow me to run the dashboard, query, or check commands, and possibly others, if the mod requirements are not met

Additional context
Add any other context about the problem here.

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