-
Notifications
You must be signed in to change notification settings - Fork 456
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
feat(cli): Include provider info in cdktf debug #3190
Conversation
ee92c9b
to
b0ed0dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I can see that you would want to re-use the existing list logic this solution is a bit unclean.
- it uses the handler function
providerList
directly, which is intended to be hooked into yargs, which is not ideal - it changes the return value of this function from
void
tovoid | Provider[]
(not sure of the correct type of allProviders, but you get the idea). That's not ideal since it's now unclear what is returned, a caller would need to guess or look into the function, leading to an implicit contract being formed here - there is already a nice abstraction that gives you all providers:
manager.allProviders()
, you could use that - there is a central function to collect all debug information, it would be nice if everything print in debug is fetched in
collectDebugInformation
. - IMHO it does not need to be as pretty as the table we normally sent for debugging, having a new line seperated list of
- hashicorp/[email protected] (pre-built, version 5.3.3)
would be good enough
934e67a
to
8ede93e
Compare
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Related issue
Fixes #2190
Description
Includes provider info (local and prebuilt) into
cdktf debug
.cdktf debug
cdktf debug --json
Checklist