-
Notifications
You must be signed in to change notification settings - Fork 41
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
Read in descriptions for nested properties #1798
Conversation
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.
This looks directionally good.
0bfd7fb
to
db8c664
Compare
db8c664
to
7ea6221
Compare
7ea6221
to
83cf3d8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1798 +/- ##
==========================================
- Coverage 60.60% 60.24% -0.37%
==========================================
Files 303 310 +7
Lines 42348 42682 +334
==========================================
+ Hits 25667 25713 +46
- Misses 15208 15496 +288
Partials 1473 1473 ☔ View full report in Codecov by Sentry. |
func flattenListAttributeKey(attribute string) string { | ||
return strings.ReplaceAll(attribute, ".0", "") | ||
} |
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.
Where do these lists come from? Are they always .0
, never .N
or .1
?
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.
This is an example of a TF schema.TypeList which I believe only ever uses the .0
to access the list elements. I'm admittedly a bit fuzzy on this so I'm happy to be corrected here.
I also searched the p-aws schema as well as upstream/website for any indications of !=.0
and came up with nothing. I know that's not proof and if you want to make this digit-agnostic, we can.
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.
I trust your check. This is the type of information that would make an excellent comment on line 974.
Uses a nested path lookup for properties whose descriptions come to us via entityDocs.Attributes.
Allows for the regex to match against
.
in nested output names.Fixes #1774.
This is a draft so far as there's a few issues here.update: Please see a build of the AWS provider docs, for a schema built with these changes where specific missing fields are now correctly populated:
MQ Broker Instance before
MQ Broker Instance after
Lambda Function Snapstart Before
Lambda Function Snapstart After
Elasticsearch DomainVPCOptions Before
Elasticsearch DomainVPCOptions After
** Notes**
I discovered that a majority of nested property descriptions (at least in AWS) come from what is described as a "fallback" in the code comment, which I edited to add that information.
This fixes this bug where extra bullet points in a property description were attached to the previously-parsed entry.
Before:
After (localhost):
3. However, this may need some more work to properly map multi-nested documentation as seen inmq_broker.instances
which still results in missing descriptions on our end