codeant-ai-for-open-source[bot] commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3230652426


##########
docs/scripts/manage-versions.mjs:
##########
@@ -211,16 +370,19 @@ function removeVersion(section, version) {
 function printUsage() {
   console.log(`
 Usage:
-  node scripts/manage-versions.js add <section> <version>
+  node scripts/manage-versions.js add <section> <version> [--skip-generate]
   node scripts/manage-versions.js remove <section> <version>
 
 Where:
-  - section: 'docs', 'developer_portal', or 'components'
+  - section: 'docs', 'developer_docs', 'admin_docs', or 'components'
   - version: version string (e.g., '1.2.0', '2.0.0')
+  - --skip-generate: skip refreshing auto-generated docs before snapshotting
+                     (use when you've already placed a fresh databases.json
+                     from CI and want to preserve it)
 
 Examples:
   node scripts/manage-versions.js add docs 2.0.0
-  node scripts/manage-versions.js add developer_portal 1.3.0
+  node scripts/manage-versions.js add developer_docs 1.3.0
   node scripts/manage-versions.js remove components 1.0.0

Review Comment:
   **Suggestion:** The CLI help text points users to 
`scripts/manage-versions.js`, but this repository only contains 
`scripts/manage-versions.mjs`. Copy-pasting these commands from `--help` will 
fail with a module-not-found error and break manual release operations. Update 
the usage/examples to the actual `.mjs` entrypoint. [api mismatch]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Docs version-cut CLI help shows unusable example commands.
   - ⚠️ Manual docs release may fail with module-not-found error.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. From the repository root, change into the docs directory: `cd docs` 
(docs/package.json
   at docs/package.json:1-43 defines the docs tooling and confirms this is the 
working
   directory).
   
   2. Run the version management script without required arguments: `node
   scripts/manage-versions.mjs` (entrypoint located at 
docs/scripts/manage-versions.mjs,
   confirmed via LS of docs/scripts).
   
   3. The script reaches `printUsage()` in 
docs/scripts/manage-versions.mjs:31-48 (as read
   via the tool), which prints usage lines containing `node 
scripts/manage-versions.js ...`,
   including `node scripts/manage-versions.js add <section> <version> 
[--skip-generate]` and
   example commands like `node scripts/manage-versions.js add docs 2.0.0`.
   
   4. Copy-paste one of the printed example commands, e.g. `node 
scripts/manage-versions.js
   add docs 2.0.0`, and run it from the docs directory; Node attempts to execute
   `scripts/manage-versions.js`, but LS of docs/scripts shows only 
manage-versions.mjs (no
   manage-versions.js present), so the command fails with a module-not-found / 
ENOENT error
   instead of performing the version cut.
   ```
   </details>
   
   [Fix in 
Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt=This%20is%20a%20comment%20left%20during%20a%20code%20review.%0A%0A%2A%2APath%3A%2A%2A%20docs%2Fscripts%2Fmanage-versions.mjs%0A%2A%2ALine%3A%2A%2A%20373%3A386%0A%2A%2AComment%3A%2A%2A%0A%09%2AApi%20Mismatch%3A%20The%20CLI%20help%20text%20points%20users%20to%20%60scripts%2Fmanage-versions.js%60%2C%20but%20this%20repository%20only%20contains%20%60scripts%2Fmanage-versions.mjs%60.%20Copy-pasting%20these%20commands%20from%20%60--help%60%20will%20fail%20with%20a%20module-not-found%20error%20and%20break%20manual%20release%20operations.%20Update%20the%20usage%2Fexamples%20to%20the%20actual%20%60.mjs%60%20entrypoint.%0A%0AValidate%20the%20correctness%20of%20the%20flagged%20issue.%20If%20correct%2C%20How%20can%20I%20resolve%20this%3F%20If%20you%20propose%20a%20fix%2C%20implement%20it%20and%20please%20make%20it%20concise.%0AOnce%20fix%20is%20implemented%2C%20also%20check%20other%20comments%20on%20the%20same%20PR%2C%20and%2
 
0ask%20user%20if%20the%20user%20wants%20to%20fix%20the%20rest%20of%20the%20comments%20as%20well.%20if%20said%20yes%2C%20then%20fetch%20all%20the%20comments%20validate%20the%20correctness%20and%20implement%20a%20minimal%20fix%0A)
 | [Fix in VSCode 
Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt=This%20is%20a%20comment%20left%20during%20a%20code%20review.%0A%0A%2A%2APath%3A%2A%2A%20docs%2Fscripts%2Fmanage-versions.mjs%0A%2A%2ALine%3A%2A%2A%20373%3A386%0A%2A%2AComment%3A%2A%2A%0A%09%2AApi%20Mismatch%3A%20The%20CLI%20help%20text%20points%20users%20to%20%60scripts%2Fmanage-versions.js%60%2C%20but%20this%20repository%20only%20contains%20%60scripts%2Fmanage-versions.mjs%60.%20Copy-pasting%20these%20commands%20from%20%60--help%60%20will%20fail%20with%20a%20module-not-found%20error%20and%20break%20manual%20release%20operations.%20Update%20the%20usage%2Fexamples%20to%20the%20actual%20%60.mjs%60%20entrypoint.%0A%0AValidate%20the%20correctness%20of%20the%20flagged%20issue.%20
 
If%20correct%2C%20How%20can%20I%20resolve%20this%3F%20If%20you%20propose%20a%20fix%2C%20implement%20it%20and%20please%20make%20it%20concise.%0AOnce%20fix%20is%20implemented%2C%20also%20check%20other%20comments%20on%20the%20same%20PR%2C%20and%20ask%20user%20if%20the%20user%20wants%20to%20fix%20the%20rest%20of%20the%20comments%20as%20well.%20if%20said%20yes%2C%20then%20fetch%20all%20the%20comments%20validate%20the%20correctness%20and%20implement%20a%20minimal%20fix%0A)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** docs/scripts/manage-versions.mjs
   **Line:** 373:386
   **Comment:**
        *Api Mismatch: The CLI help text points users to 
`scripts/manage-versions.js`, but this repository only contains 
`scripts/manage-versions.mjs`. Copy-pasting these commands from `--help` will 
fail with a module-not-found error and break manual release operations. Update 
the usage/examples to the actual `.mjs` entrypoint.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39837&comment_hash=8fd0d0edc884c77e25ea7457a89c8faf431ee2edc0e3ddadc699764491846abe&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39837&comment_hash=8fd0d0edc884c77e25ea7457a89c8faf431ee2edc0e3ddadc699764491846abe&reaction=dislike'>👎</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to