-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing nil check on docInfo for doc discovery (#1522)
This change adds a nil check on docInfo for handling of missing docs settings, without which an upgrade in GCP panicked on creation of a new resource whose docs could not be found. With this change, `getDocsForResource` behaves in the following way: 1. Check if `PULUMI_MISSING_DOCS_ERROR` is set to true - if no, continue with a warning 2. if yes, verify the resource has any docs info - if no, return a docs error as per env var setting 3. if yes, there is docs info, check if `AllowMissing` is set to true - if no, return a docs error as docs are missing and we expect an error as per env var setting 4. if yes, continue with a warning, as we allow docs to be missed.
- Loading branch information
Showing
2 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters