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

Intermittent dependency error when loading steampipe-mod-ibm-insights #2062

Closed
kaidaguerre opened this issue May 13, 2022 · 0 comments · Fixed by #2063
Closed

Intermittent dependency error when loading steampipe-mod-ibm-insights #2062

kaidaguerre opened this issue May 13, 2022 · 0 comments · Fixed by #2063
Assignees
Labels
bug Something isn't working

Comments

@kaidaguerre
Copy link
Contributor

workspace parsing fails maybe 1 out of 3 attempts with the error

Error: failed to load workspace: failed to resolve mod dependencies
Dependencies:
   dashboard.ibm_security_group_age_report -> dashboard.ibm_security_group_detail.url_path
   table.dashboard_ibm_security_group_age_report_anonymous_table_0 -> dashboard.ibm_security_group_detail.url_path
     MISSING: dashboard.ibm_security_group_detail

Getting charts steampipe_dashboard_chart /home/runner/work/hub.steampipe.io/hub.steampipe.io/docs-cache/output/mods/github.com/turbot/steampipe-mod-ibm-insights/abb4bd584cd3b6ab1d6ab15212398871a36b9242
Getting Containers steampipe_dashboard_container /home/runner/work/hub.steampipe.io/hub.steampipe.io/docs-cache/output/mods/github.com/turbot/steampipe-mod-ibm-insights/abb4bd584cd3b6ab1d6ab15212398871a36b9242
Error: failed to load workspace: failed to resolve mod dependencies
Dependencies:
   dashboard.ibm_security_group_age_report -> dashboard.ibm_security_group_detail.url_path
   table.dashboard_ibm_security_group_age_report_anonymous_table_0 -> dashboard.ibm_security_group_detail.url_path
     MISSING: dashboard.ibm_security_group_detail

The issue is that the code currently assumes that dependencies can be resolved in 2 passes, which in the ideal case would be true.

However the dependency order generated by the runContext dependency graph is not consistent. In some cases it returns a dependency order which takes 3 passes to resolve.

The solution is to not have a fixed number of passes, but instead continue decoding as long as the number of unresolved dependencies decreases.
i.e. if the number does not decrease, treat the dependencies as unresolveable and fail

@kaidaguerre kaidaguerre added the bug Something isn't working label May 13, 2022
@kaidaguerre kaidaguerre self-assigned this May 13, 2022
@kaidaguerre kaidaguerre changed the title Intermittent depdency error when loading steampipe-mod-ibm-insights Intermittent dependency error when loading steampipe-mod-ibm-insights May 13, 2022
kaidaguerre added a commit that referenced this issue May 13, 2022
… as num deps decreases). Fixes intermittent dependency error when loading steampipe-mod-ibm-insights. Closes #2062
kaidaguerre added a commit that referenced this issue May 16, 2022
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
1 participant