Bug 2093047

Summary: Dynamic Plugins: Generated API markdown duplicates `checkAccess` and `useAccessReview` doc
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Andrew Ballantyne <aballant>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.11CC: yapei
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Version: 4.11.0-0.nightly-2022-05-25-193227 Cluster ID: eeeae192-88ac-44f2-b21e-1671aa9aee1a Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Last Closed: 2022-08-10 11:16:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Samuel Padgett 2022-06-02 19:35:57 UTC
Opening this as a medium severity bug as it might be a problem in the doc generation which could cause other issues.

Steps to reproduce:

1. cd frontend/packages/console-dynamic-plugin-sdk/
2. yarn run generate-doc
3. View frontend/packages/console-dynamic-plugin-sdk/generated/doc/api.md

Results:

`checkAccess` and `useAccessReview` are repeated in the generated markdown. (I have the generated doc in a gist here as well: https://gist.github.com/spadgett/0ddefd7ab575940334429200f4f7219a).

We're also generating doc for `_usePrometheusPoll` which appears to be an internal function. This might be a problem with the doc generation or something we've (unintentionally?) exposed.

Comment 1 Andrew Ballantyne 2022-06-13 16:02:12 UTC
*** Bug 2096359 has been marked as a duplicate of this bug. ***

Comment 2 Andrew Ballantyne 2022-06-13 16:03:27 UTC
This issue should look to remove `_usePrometheusPoll` (but keeping the non underscore `usePromethusPoll` function)

Comment 6 Yadan Pei 2022-06-21 01:45:01 UTC
1. cd frontend/packages/console-dynamic-plugin-sdk/
2. yarn run generate-doc
3. View frontend/packages/console-dynamic-plugin-sdk/generated/doc/api.md

`checkAccess`, `useAccessReview` and `useAccessReviewAllowed ` are generated only onceļ¼Œ only `usePromethusPoll` function is kept in generated markdown, the issue is fixed

Comment 7 errata-xmlrpc 2022-08-10 11:16:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069