You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/05/02 18:54:51 UTC
[PR] docs: cut 6.1.0 versions for docs, admin_docs, developer_docs, components [superset]
rusackas opened a new pull request, #39837:
URL: https://github.com/apache/superset/pull/39837
### SUMMARY
Cuts a `6.1.0` snapshot for all four versioned Docusaurus sections (`docs`, `admin_docs`, `developer_docs`, `components`), and cleans up several stale references and orphans accumulated since the last version cut.
**Versioning behavior**: `lastVersion` stays at `current` for every section, so the canonical URLs (`/docs/...`, `/admin-docs/...`, `/developer-docs/...`, `/components/...`) continue to render content from `master`. The `current` version is now consistently labeled "Next" with an `unreleased` banner, and `6.1.0` is a historical pin.
**Component playground**: previously `disabled: true` in `versions-config.json`, now enabled and versioned. Plugin block in `docusaurus.config.ts` was already gated only by the `disabled` flag, so no other code changes were needed to bring it back online.
**`developer_portal` → `developer_docs` rename**: the section was renamed at some earlier point but the rename was never finished. This PR cleans up the leftovers:
- `package.json`: `version:add:developer_portal` / `version:remove:developer_portal` → `version:add:developer_docs` / `version:remove:developer_docs` (also added `version:add:admin_docs` / `version:remove:admin_docs` since those didn't exist either).
- `scripts/manage-versions.mjs`: usage strings.
- `src/theme/DocVersionBadge/index.js`: the versioned-section list referenced `'tutorials'` and `'developer_portal'`, neither of which are real plugin ids. Replaced with the actual ids: `default`, `components`, `admin_docs`, `developer_docs`. **Side effect**: the version dropdown badge now actually renders on `admin_docs` and `developer_docs`, where it was previously inert.
- `src/theme/DocVersionBanner/index.js`: comment + dead `tutorials` branch.
- `DOCS_CLAUDE.md`, `README.md`: documentation updated.
- `docusaurus.config.ts:681-684`: `/developer_portal/* → /developer-docs/*` URL backward-compat redirect **left intact**.
**`fixVersionedImports` generalization**: `manage-versions.mjs` had a hard-coded list of two specific files in the `docs` section that needed `../../src/` → `../../../src/` rewriting after a version cut. I generalized it to walk every section's snapshot dir. This caught `admin_docs/configuration/country-map-tools.mdx` and `components/ui-components/button.mdx` — previous version cuts on those sections would have shipped broken imports.
**Orphans removed**:
- `developer_portal_versions.json` (empty array, leftover from the rename)
- `tutorials_versions.json` (`["1.0.0"]`, no `tutorials` plugin exists anywhere)
- `components/versions.json` and `developer_docs/versions.json` (empty `[]` files accidentally tracked inside content directories — Docusaurus was snapshotting them into versioned content too)
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (versioning change; surfaces existing content under new URL paths)
### TESTING INSTRUCTIONS
```bash
cd docs
yarn install
yarn start
```
Verify:
1. The version dropdown badge appears on all four sections (`/docs/...`, `/admin-docs/...`, `/developer-docs/...`, `/components/...`) and includes both `Next` and `6.1.0`.
2. The canonical URL for each section (without a version segment) renders the `current` content with the "unreleased" banner, matching the latest source.
3. Adding `/6.1.0` to any section URL renders the historical snapshot with no banner.
4. `/developer_portal/*` URLs still redirect to `/developer-docs/*`.
5. `country-map-tools.mdx` (admin_docs) and `button.mdx` (components) render correctly under the `6.1.0` snapshot — the import-path rewrites must have applied.
6. Re-cutting a future version with `node scripts/manage-versions.mjs add <section> <version>` works end-to-end and the import-fixer catches relevant files.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238496829
##########
docs/scripts/manage-versions.mjs:
##########
@@ -30,9 +30,11 @@ const __dirname = path.dirname(__filename);
const CONFIG_FILE = path.join(__dirname, '..', 'versions-config.json');
// Parse command line arguments
-const args = process.argv.slice(2);
+const rawArgs = process.argv.slice(2);
+const skipGenerate = rawArgs.includes('--skip-generate');
+const args = rawArgs.filter((a) => a !== '--skip-generate');
const command = args[0]; // 'add' or 'remove'
-const section = args[1]; // 'docs', 'developer_portal', or 'components'
+const section = args[1]; // 'docs', 'developer_docs', or 'components'
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Outdated Comment</b></div>
<div id="fix">
The inline comment for the `section` variable lists supported values but omits 'admin_docs', which is now a valid section per the updated usage message.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
const section = args[1]; // 'docs', 'developer_docs', 'admin_docs', or 'components'
````
</div>
</details>
</div>
<small><i>Code Review Run #9013c2</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
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>
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Incorrect File Extension</b></div>
<div id="fix">
The usage message and examples incorrectly reference 'manage-versions.js' instead of the actual file name 'manage-versions.mjs', which could confuse users copying commands.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
- node scripts/manage-versions.js add <section> <version> [--skip-generate]
- node scripts/manage-versions.js remove <section> <version]
+ node scripts/manage-versions.mjs add <section> <version> [--skip-generate]
+ node scripts/manage-versions.mjs remove <section> <version]
Where:
- 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_docs 1.3.0
+ node scripts/manage-versions.mjs add docs 2.0.0
+ node scripts/manage-versions.mjs add developer_docs 1.3.0
- node scripts/manage-versions.js remove components 1.0.0
+ node scripts/manage-versions.mjs remove components 1.0.0
`);
}
```
</div>
</details>
</div>
<small><i>Code Review Run #9013c2</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #39837:
URL: https://github.com/apache/superset/pull/39837
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs: cut 6.1.0 versions for docs, admin_docs, developer_docs, components [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4364508410
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/39837?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 55.38%. Comparing base ([`d23b0ca`](https://app.codecov.io/gh/apache/superset/commit/d23b0cad92051d13324f2f081045a63a741164c1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`752ebd4`](https://app.codecov.io/gh/apache/superset/commit/752ebd47cb038007602e101f48027802c4126cb4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 15 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #39837 +/- ##
==========================================
- Coverage 64.36% 55.38% -8.98%
==========================================
Files 2569 2569
Lines 134626 134630 +4
Branches 31227 31228 +1
==========================================
- Hits 86650 74563 -12087
- Misses 46477 59409 +12932
+ Partials 1499 658 -841
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.67% <ø> (-0.01%)` | :arrow_down: |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.42% <ø> (-0.01%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.50% <ø> (-20.05%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/39837/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/39837?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4446832036
/codeant-review
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3230646963
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
Review Comment:
**Suggestion:** Adding these plugin IDs enables the badge for sections whose URL base paths use hyphens (`/admin-docs`, `/developer-docs`), but the path extraction logic later derives `basePath` from `pluginId` (`/${pluginId}`), which becomes `/admin_docs` and `/developer_docs`. This mismatch prevents correct relative-path extraction and makes version switches jump to section roots instead of the current page. Add a pluginId→routeBasePath mapping (or read routeBasePath from plugin metadata) before enabling these IDs. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Admin docs version switcher loses current page location.
- ⚠️ Developer docs version switching resets navigation to section root.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Observe docs plugin configuration in `docs/docusaurus.config.ts`: the `admin_docs`
plugin is defined with `id: 'admin_docs'` at line 72 and `routeBasePath: 'admin-docs'` at
line 74, and the `developer_docs` plugin is defined with `id: 'developer_docs'` at line
100 and `routeBasePath: 'developer-docs'` at line 102 (verified via Grep output).
2. Navigate to any admin docs page whose URL starts with `/admin-docs/` (served by the
`admin_docs` plugin configured above) so that the React router location pathname is like
`/admin-docs/some/section`, and `useActivePlugin()` in
`docs/src/theme/DocVersionBadge/index.js:33-37` returns `activePlugin.pluginId ===
'admin_docs'`.
3. In `DocVersionBadge`'s `useEffect` at `docs/src/theme/DocVersionBadge/index.js:52-80`,
`basePath` is computed as `pluginId === 'default' ? '/docs' : \`/${pluginId}\``, so for
this page `basePath` becomes `'/admin_docs'` while `pathname` is `'/admin-docs/…'`. The
condition `pathname.includes(basePath)` at line 59 is therefore false, `relativePath`
remains the empty string, and `setVersionedPath('')` is called.
4. When the user opens the version dropdown rendered from `items` in
`docs/src/theme/DocVersionBadge/index.js:82-103` and selects another version, `versionUrl`
is left as `v.path` (line 86) because `versionedPath` is empty, so the browser navigates
to the version's root like `/admin-docs/1.1.0` instead of
`/admin-docs/1.1.0/some/section`, reproducing the behavior where version switches in
`admin_docs`/`developer_docs` jump to section roots instead of preserving the current page
path.
```
</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%2Fsrc%2Ftheme%2FDocVersionBadge%2Findex.js%0A%2A%2ALine%3A%2A%2A%2043%3A44%0A%2A%2AComment%3A%2A%2A%0A%09%2ALogic%20Error%3A%20Adding%20these%20plugin%20IDs%20enables%20the%20badge%20for%20sections%20whose%20URL%20base%20paths%20use%20hyphens%20%28%60%2Fadmin-docs%60%2C%20%60%2Fdeveloper-docs%60%29%2C%20but%20the%20path%20extraction%20logic%20later%20derives%20%60basePath%60%20from%20%60pluginId%60%20%28%60%2F%24%7BpluginId%7D%60%29%2C%20which%20becomes%20%60%2Fadmin_docs%60%20and%20%60%2Fdeveloper_docs%60.%20This%20mismatch%20prevents%20correct%20relative-path%20extraction%20and%20makes%20version%20switches%20jump%20to%20section%20roots%20instead%20of%20the%20current%20page.%20Add%20a%20pluginId%E2%86%92routeBasePath%20mapping%20%28or%20read%20routeBasePath%20from%20plugin%20metadata%29%20before%20enabling%20these%20IDs.
%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%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) | [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%2Fsrc%2Ftheme%2FDocVersionBadge%2Findex.js%0A%2A%2ALine%3A%2A%2A%2043%3A44%0A%2A%2AComment%3A%2A%2A%0A%09%2ALogic%20Error%3A%20Adding%20these%20plugin%20IDs%20enables%20the%20badge%20for%20sections%20whose%20URL%20base%20paths%20use%20hyphens%20%28%60%2Fadmin-docs%60%2C%20%60%2Fd
eveloper-docs%60%29%2C%20but%20the%20path%20extraction%20logic%20later%20derives%20%60basePath%60%20from%20%60pluginId%60%20%28%60%2F%24%7BpluginId%7D%60%29%2C%20which%20becomes%20%60%2Fadmin_docs%60%20and%20%60%2Fdeveloper_docs%60.%20This%20mismatch%20prevents%20correct%20relative-path%20extraction%20and%20makes%20version%20switches%20jump%20to%20section%20roots%20instead%20of%20the%20current%20page.%20Add%20a%20pluginId%E2%86%92routeBasePath%20mapping%20%28or%20read%20routeBasePath%20from%20plugin%20metadata%29%20before%20enabling%20these%20IDs.%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%20ask%20user%20if%20the%20user%20wants%20to%20fix%20the%20rest%20of%20the%20comments%20as%20well.%20if%20said%20yes%2C%20then%20fetch%2
0all%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/src/theme/DocVersionBadge/index.js
**Line:** 43:44
**Comment:**
*Logic Error: Adding these plugin IDs enables the badge for sections whose URL base paths use hyphens (`/admin-docs`, `/developer-docs`), but the path extraction logic later derives `basePath` from `pluginId` (`/${pluginId}`), which becomes `/admin_docs` and `/developer_docs`. This mismatch prevents correct relative-path extraction and makes version switches jump to section roots instead of the current page. Add a pluginId→routeBasePath mapping (or read routeBasePath from plugin metadata) before enabling these IDs.
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=294d25c166be62474d28ed7bb9066fc206cec1e9bef6b8b7e2c5a6c0dde7d76f&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39837&comment_hash=294d25c166be62474d28ed7bb9066fc206cec1e9bef6b8b7e2c5a6c0dde7d76f&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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238611454
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
Review Comment:
Fixed in 8ef030a. Replaced the `'/' + pluginId` derivation with an explicit `PLUGIN_ID_TO_BASE_PATH` map matching `docusaurus.config.ts` (`default` → `/user-docs`, `components` → `/components`, `admin_docs` → `/admin-docs`, `developer_docs` → `/developer-docs`). The previous code was also silently broken for the `default` plugin (assumed `/docs` but actual routeBasePath is `user-docs`) — that's now correct too.
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
Review Comment:
Yep, fixed in 8ef030a — same fix as the other two threads on this file. Added an explicit pluginId → routeBasePath map, removed the underscore/hyphen mismatch for admin_docs / developer_docs, and corrected the pre-existing `default` → `/docs` bug (actual routeBasePath is `user-docs`).
##########
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:
Fixed in 8ef030a. All six `.js` references in `printUsage()` (usage lines + examples) now correctly say `.mjs` — `node scripts/manage-versions.mjs add docs 2.0.0` etc.
##########
docs/scripts/manage-versions.mjs:
##########
@@ -30,9 +30,11 @@ const __dirname = path.dirname(__filename);
const CONFIG_FILE = path.join(__dirname, '..', 'versions-config.json');
// Parse command line arguments
-const args = process.argv.slice(2);
+const rawArgs = process.argv.slice(2);
+const skipGenerate = rawArgs.includes('--skip-generate');
+const args = rawArgs.filter((a) => a !== '--skip-generate');
const command = args[0]; // 'add' or 'remove'
-const section = args[1]; // 'docs', 'developer_portal', or 'components'
+const section = args[1]; // 'docs', 'developer_docs', or 'components'
Review Comment:
Fixed in 8ef030a — same change as the other thread on this line. Inline comment now includes `admin_docs`.
##########
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>
Review Comment:
Fixed in 8ef030a — same change as the other thread on this section. All six occurrences (`add` / `remove` usage lines + four examples) now use `.mjs`.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238646428
##########
docs/src/theme/DocVersionBanner/index.js:
##########
@@ -37,9 +37,8 @@ export default function DocVersionBannerWrapper(props) {
const pluginId = activePlugin?.pluginId;
const [versionedPath, setVersionedPath] = useState('');
- // Only show version selector for tutorials
- // Main docs, components, and developer_portal use the DocVersionBadge component instead
- const isVersioned = pluginId && ['tutorials'].includes(pluginId);
+ // Versioned sections use the DocVersionBadge component instead of this banner
+ const isVersioned = false;
const { preferredVersion } = useDocsPreferredVersion(pluginId);
const versions = useVersions(pluginId);
Review Comment:
Good catch — fixed in cb46726 by deleting the override entirely. With `isVersioned` hard-coded to `false`, every code path below the early-return was unreachable and the imports were just adding weight. The file's own comment already said the badge handles versioned sections, so the override had no remaining purpose. Removing the directory (and the orphaned `styles.module.css`) lets Docusaurus's default `DocVersionBanner` take over — the standard "you are viewing an outdated version" banner — with no visible change. Net: -174 lines.
##########
docs/scripts/manage-versions.mjs:
##########
@@ -121,10 +269,12 @@ function addVersion(section, version) {
banner: 'none'
};
- // Optionally update lastVersion if this is the first non-current version
- if (config[section].onlyIncludeVersions.length === 2) {
- config[section].lastVersion = version;
- }
+ // Note: we deliberately do NOT auto-bump `lastVersion` to the new
+ // version. Superset's docs site keeps `lastVersion: 'current'` so the
+ // canonical URLs (`/docs/...`, `/admin-docs/...`, etc.) always render
+ // master content; cut versions are accessed only via their explicit
+ // version segment. If you want a different policy, edit
Review Comment:
Right — fixed in cb46726. Comment now enumerates the actual canonical forms (`/user-docs/...`, `/admin-docs/...`, `/developer-docs/...`, `/components/...`) and explicitly notes that `/docs/...` is a legacy form handled by per-page redirects in `docusaurus.config.ts`.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4456253352
**Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs: cut 6.1.0 versions for docs, admin_docs, developer_docs, components [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4364502611
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4446497426
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238609637
##########
docs/scripts/manage-versions.mjs:
##########
@@ -211,16 +368,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:
Good catch — fixed in 8ef030a. Updated all six `.js` references in `printUsage()` (two usage lines + four examples) to `.mjs`.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3230637581
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
Review Comment:
**🟠 Architect Review — HIGH**
DocVersionBadge assumes each pluginId directly matches the URL base path (`basePath = '/docs'` for `default`, `basePath = '/${pluginId}'` otherwise), but `admin_docs` and `developer_docs` actually route under `/admin-docs` and `/developer-docs`; as a result, `versionedPath` never resolves for these sections and the version dropdown links to the section root instead of the same page when switching versions.
**Suggestion:** Introduce an explicit pluginId→routeBasePath map (e.g., `default`→`/user-docs`, `admin_docs`→`/admin-docs`, `developer_docs`→`/developer-docs`, `components`→`/components`) and use it when computing `basePath`/`versionedPath`, then verify version-switch behavior on deep pages in all four sections.
[Fix in Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt=This%20is%20an%20%2A%2AArchitect%20%2F%20Logical%20Review%2A%2A%20comment%20left%20during%20a%20code%20review.%20These%20reviews%20are%20first-class%2C%20important%20findings%20%E2%80%94%20not%20optional%20suggestions.%20Do%20NOT%20dismiss%20this%20as%20a%20%27big%20architectural%20change%27%20just%20because%20the%20title%20says%20architect%20review%3B%20most%20of%20these%20can%20be%20resolved%20with%20a%20small%2C%20localized%20fix%20once%20the%20intent%20is%20understood.%0A%0A%2A%2APath%3A%2A%2A%20docs%2Fsrc%2Ftheme%2FDocVersionBadge%2Findex.js%0A%2A%2ALine%3A%2A%2A%2043%3A44%0A%2A%2AComment%3A%2A%2A%0A%09%2AHIGH%3A%20DocVersionBadge%20assumes%20each%20pluginId%20directly%20matches%20the%20URL%20base%20path%20%28%60basePath%20%3D%20%27%2Fdocs%27%60%20for%20%60default%60%2C%20%60basePath%20%3D%20%27%2F%24%7BpluginId%7D%27%60%20otherwise%29%2C%20but%20%60admin_docs%60%20and%20%60developer_docs%60%20actually%20rou
te%20under%20%60%2Fadmin-docs%60%20and%20%60%2Fdeveloper-docs%60%3B%20as%20a%20result%2C%20%60versionedPath%60%20never%20resolves%20for%20these%20sections%20and%20the%20version%20dropdown%20links%20to%20the%20section%20root%20instead%20of%20the%20same%20page%20when%20switching%20versions.%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.%0AIf%20a%20suggested%20approach%20is%20provided%20above%2C%20use%20it%20as%20the%20authoritative%20instruction.%20If%20no%20explicit%20code%20suggestion%20is%20given%2C%20you%20MUST%20still%20draft%20and%20apply%20your%20own%20minimal%2C%20localized%20fix%20%E2%80%94%20do%20not%20punt%20back%20with%20%27no%20suggestion%20provided%2C%20review%20manually%27.%20Keep%20the%20change%20as%20small%20as%20possible%3A%20add%20a%20guard%20clause%2C%20gate%20on%20a%20loading%20state%2C%20reorder%20an%20awa
it%2C%20wrap%20in%20a%20conditional%2C%20etc.%20Do%20not%20refactor%20surrounding%20code%20or%20expand%20scope%20beyond%20the%20finding.%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) | [Fix in VSCode Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt=This%20is%20an%20%2A%2AArchitect%20%2F%20Logical%20Review%2A%2A%20comment%20left%20during%20a%20code%20review.%20These%20reviews%20are%20first-class%2C%20important%20findings%20%E2%80%94%20not%20optional%20suggestions.%20Do%20NOT%20dismiss%20this%20as%20a%20%27big%20architectural%20change%27%20just%20because%20the%20title%20says%20architect%20review%3B%20most%20of%20these%20can%20be%20resolved%20with%20a%20small%2C%20localized%20fix%20once%
20the%20intent%20is%20understood.%0A%0A%2A%2APath%3A%2A%2A%20docs%2Fsrc%2Ftheme%2FDocVersionBadge%2Findex.js%0A%2A%2ALine%3A%2A%2A%2043%3A44%0A%2A%2AComment%3A%2A%2A%0A%09%2AHIGH%3A%20DocVersionBadge%20assumes%20each%20pluginId%20directly%20matches%20the%20URL%20base%20path%20%28%60basePath%20%3D%20%27%2Fdocs%27%60%20for%20%60default%60%2C%20%60basePath%20%3D%20%27%2F%24%7BpluginId%7D%27%60%20otherwise%29%2C%20but%20%60admin_docs%60%20and%20%60developer_docs%60%20actually%20route%20under%20%60%2Fadmin-docs%60%20and%20%60%2Fdeveloper-docs%60%3B%20as%20a%20result%2C%20%60versionedPath%60%20never%20resolves%20for%20these%20sections%20and%20the%20version%20dropdown%20links%20to%20the%20section%20root%20instead%20of%20the%20same%20page%20when%20switching%20versions.%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.%0AIf%20a%20suggest
ed%20approach%20is%20provided%20above%2C%20use%20it%20as%20the%20authoritative%20instruction.%20If%20no%20explicit%20code%20suggestion%20is%20given%2C%20you%20MUST%20still%20draft%20and%20apply%20your%20own%20minimal%2C%20localized%20fix%20%E2%80%94%20do%20not%20punt%20back%20with%20%27no%20suggestion%20provided%2C%20review%20manually%27.%20Keep%20the%20change%20as%20small%20as%20possible%3A%20add%20a%20guard%20clause%2C%20gate%20on%20a%20loading%20state%2C%20reorder%20an%20await%2C%20wrap%20in%20a%20conditional%2C%20etc.%20Do%20not%20refactor%20surrounding%20code%20or%20expand%20scope%20beyond%20the%20finding.%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 an **Architect / Logical Review** comment left during a code review. These reviews are first-class, important findings — not optional suggestions. Do NOT dismiss this as a 'big architectural change' just because the title says architect review; most of these can be resolved with a small, localized fix once the intent is understood.
**Path:** docs/src/theme/DocVersionBadge/index.js
**Line:** 43:44
**Comment:**
*HIGH: DocVersionBadge assumes each pluginId directly matches the URL base path (`basePath = '/docs'` for `default`, `basePath = '/${pluginId}'` otherwise), but `admin_docs` and `developer_docs` actually route under `/admin-docs` and `/developer-docs`; as a result, `versionedPath` never resolves for these sections and the version dropdown links to the section root instead of the same page when switching versions.
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.
If a suggested approach is provided above, use it as the authoritative instruction. If no explicit code suggestion is given, you MUST still draft and apply your own minimal, localized fix — do not punt back with 'no suggestion provided, review manually'. Keep the change as small as possible: add a guard clause, gate on a loading state, reorder an await, wrap in a conditional, etc. Do not refactor surrounding code or expand scope beyond the finding.
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>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3230616490
##########
docs/scripts/manage-versions.mjs:
##########
@@ -211,16 +368,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:
`printUsage()` references `node scripts/manage-versions.js ...`, but the script is `manage-versions.mjs` (and package.json invokes the `.mjs` file). This makes the usage output misleading; update the printed commands/examples to use the correct filename/extension.
##########
docs/scripts/manage-versions.mjs:
##########
@@ -30,9 +30,11 @@ const __dirname = path.dirname(__filename);
const CONFIG_FILE = path.join(__dirname, '..', 'versions-config.json');
// Parse command line arguments
-const args = process.argv.slice(2);
+const rawArgs = process.argv.slice(2);
+const skipGenerate = rawArgs.includes('--skip-generate');
+const args = rawArgs.filter((a) => a !== '--skip-generate');
const command = args[0]; // 'add' or 'remove'
-const section = args[1]; // 'docs', 'developer_portal', or 'components'
+const section = args[1]; // 'docs', 'developer_docs', or 'components'
Review Comment:
The inline comment describing valid `section` values is now outdated: it omits `admin_docs`, which is supported elsewhere in this script and in the usage text. Please update the comment to reflect the full supported set to avoid confusion when maintaining the CLI parsing.
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
].includes(pluginId);
Review Comment:
Now that `admin_docs` and `developer_docs` are treated as versioned, the URL parsing logic later in this component (it derives `basePath` as `/${pluginId}`) won't match their actual `routeBasePath` values (`/admin-docs` and `/developer-docs` in docusaurus.config.ts). This prevents preserving the current page when switching versions for those sections. Use the section's configured routeBasePath (or a mapping from pluginId -> routeBasePath) when computing `basePath`/splitting `pathname`.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4446801678
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs: cut 6.1.0 versions for docs, admin_docs, developer_docs, components [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4372500432
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 5a5a0e70fc1b6806e98c26416ec26a7a509c9a5a |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/69f8c116d7c3ca0008004125 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-39837--superset-docs-preview.netlify.app](https://deploy-preview-39837--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcrJDYAgEADAXvYtunjg0YFl4ILBRF0CaGKMvctvHvOCD3z4BBNAAUvQJ7lschxsZZiioCsJVcoSxW1D3PiMORrrd35mk6sa14GkVKanhjQiDoitrDv4fg) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-39837--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238610632
##########
docs/scripts/manage-versions.mjs:
##########
@@ -30,9 +30,11 @@ const __dirname = path.dirname(__filename);
const CONFIG_FILE = path.join(__dirname, '..', 'versions-config.json');
// Parse command line arguments
-const args = process.argv.slice(2);
+const rawArgs = process.argv.slice(2);
+const skipGenerate = rawArgs.includes('--skip-generate');
+const args = rawArgs.filter((a) => a !== '--skip-generate');
const command = args[0]; // 'add' or 'remove'
-const section = args[1]; // 'docs', 'developer_portal', or 'components'
+const section = args[1]; // 'docs', 'developer_docs', or 'components'
Review Comment:
Valid — fixed in 8ef030a. The inline comment now reads `'docs', 'admin_docs', 'developer_docs', or 'components'` to match the supported set elsewhere in the script.
##########
docs/src/theme/DocVersionBadge/index.js:
##########
@@ -40,8 +40,8 @@ export default function DocVersionBadge() {
const isVersioned = [
'default', // main docs
'components',
- 'tutorials',
- 'developer_portal',
+ 'admin_docs',
+ 'developer_docs',
].includes(pluginId);
Review Comment:
Confirmed — fixed in 8ef030a. The bug is actually broader than this PR: only the `components` plugin has matching pluginId / routeBasePath values. The `default` plugin serves at `/user-docs` (not `/docs` as the old conditional assumed), and `admin_docs` / `developer_docs` use hyphens in their URLs even though the plugin ids use underscores. The pre-existing default-plugin bug was masked by the previous `isVersioned` list referencing stale `tutorials` / `developer_portal` ids that never matched anything — so the broken default branch never executed in practice. Replaced the conditional with an explicit `PLUGIN_ID_TO_BASE_PATH` map covering all four sections; comment points at `docusaurus.config.ts` so the map stays in sync if a routeBasePath ever changes.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238638913
##########
docs/src/theme/DocVersionBanner/index.js:
##########
@@ -37,9 +37,8 @@ export default function DocVersionBannerWrapper(props) {
const pluginId = activePlugin?.pluginId;
const [versionedPath, setVersionedPath] = useState('');
- // Only show version selector for tutorials
- // Main docs, components, and developer_portal use the DocVersionBadge component instead
- const isVersioned = pluginId && ['tutorials'].includes(pluginId);
+ // Versioned sections use the DocVersionBadge component instead of this banner
+ const isVersioned = false;
const { preferredVersion } = useDocsPreferredVersion(pluginId);
const versions = useVersions(pluginId);
Review Comment:
`isVersioned` is hard-coded to `false`, so the early-return condition `if (!isVersioned || ...)` will always short-circuit to the original `DocVersionBanner`, making the custom path extraction + dropdown code below unreachable at runtime while still keeping the extra imports in the bundle. If the intent is to fully deprecate the banner-based version selector, consider deleting the dead code and unused imports/state and making this wrapper a simple pass-through (or removing the override entirely).
##########
docs/scripts/manage-versions.mjs:
##########
@@ -121,10 +269,12 @@ function addVersion(section, version) {
banner: 'none'
};
- // Optionally update lastVersion if this is the first non-current version
- if (config[section].onlyIncludeVersions.length === 2) {
- config[section].lastVersion = version;
- }
+ // Note: we deliberately do NOT auto-bump `lastVersion` to the new
+ // version. Superset's docs site keeps `lastVersion: 'current'` so the
+ // canonical URLs (`/docs/...`, `/admin-docs/...`, etc.) always render
+ // master content; cut versions are accessed only via their explicit
+ // version segment. If you want a different policy, edit
Review Comment:
This comment calls out canonical docs URLs as `/docs/...`, but the Docusaurus config uses `routeBasePath: 'user-docs'` for the main docs plugin (with `/docs/*` handled via redirects). To avoid confusing future maintainers, update the wording to reference `/user-docs/...` as the canonical path (or explicitly mention that `/docs/...` is a legacy redirect).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] chore(docs): clean up version-cutting tooling and finish developer_portal rename [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #39837:
URL: https://github.com/apache/superset/pull/39837#issuecomment-4446801106
/review
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org