-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add a subcommand into diff processor to detect missing docs #11156
base: main
Are you sure you want to change the base?
add a subcommand into diff processor to detect missing docs #11156
Conversation
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
@shuyama1 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
Found some bugs already, need some rework. |
a2f2de7
to
12ea5d1
Compare
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
12ea5d1
to
0e9ec45
Compare
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
@GoogleCloudPlatform/terraform-team @shuyama1 This PR has been waiting for review for 2 weeks. Please take a look! Use the label |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
@iyabchen, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days. Please address any comments or change requests, or re-request review from a core reviewer if no action is required. This notification can be disabled with the |
Sorry for the delay! I just returned from vacation and am reviewing it now! |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. Errors
|
/gcbrun |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
@iyabchen, this PR is waiting for action from you. If no action is taken, this PR will be closed in 14 days. Please address any comments or change requests, or re-request review from a core reviewer if no action is required. This notification can be disabled with the |
I apologize for the delay in my review. I'm currently in another round of detailed review. Please ignore this message. Thank you for your patience! |
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.
Mostly looks good, some minor comments asking for more clarify and unit test coverages.
|
||
type MissingDocField struct { | ||
Field string | ||
Section string |
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 assume section indicates if this field is in argument or attribute section, IIRC? Can you add a small comment for it?
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.
Section is removed since not differentiate argument and attribute now.
return ret, nil | ||
} | ||
|
||
func isAttribute(fieldDiff diff.FieldDiff) bool { |
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 might be reading this wrong - it seems that we still count the non-top level computed fields as attributes?
I’m starting to wonder that even if we only run the missing doc detector on newly added fields, inconsistencies in how attributes and arguments are divided in existing resource docs could still lead to issues(?), like for subfields added to existing objects. What are your thoughts on this?
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.
Decided to not differentiate between argument and attribute, since finding some fields not conforming to that rule, eg. terraform_labels.
@iyabchen, this PR is waiting for action from you. If no action is taken, this PR will be closed in 2 weekdays. Please address any comments or change requests, or re-request review from a core reviewer if no action is required. This notification can be disabled with the |
@iyabchen, this PR is being closed due to inactivity. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
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.
LGTM overall! Thanks for putting in the work. Sorry for the delay in reviewing and merging—I’ve been a bit short on time to monitor CI changes. I’ll test it out this afternoon, and if everything goes well, I’ll merge it.
Next steps:
- add the missing doc detector logic for the datasource (PR in progress)
- surface this detector in the diff-report
hashicorp/terraform-provider-google#14743
Part 1 - add missing docs command into diff-processor to detect new fields or new resource without doc. This only covers resource, NOT data sources.
params
field does not have that in the description)Release Note Template for Downstream PRs (will be copied)