Skip to content

feat(docs): automate compatibility and workspace table updates#7605

Open
Ayushmore1214 wants to merge 4 commits intobackstage:mainfrom
Ayushmore1214:main
Open

feat(docs): automate compatibility and workspace table updates#7605
Ayushmore1214 wants to merge 4 commits intobackstage:mainfrom
Ayushmore1214:main

Conversation

@Ayushmore1214
Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

This PR automates the updating of workspace and compatibility tables, addressing #7583.

Previously, these tables had to be generated manually via local scripts, leading to stale documentation. This introduces a GitHub workflow that can be triggered on-demand to run the scripts, inject the fresh tables directly into the markdown files, and open a PR with the changes.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@Ayushmore1214 Ayushmore1214 requested a review from a team as a code owner February 14, 2026 14:07
@Ayushmore1214 Ayushmore1214 requested review from awanlin and removed request for a team February 14, 2026 14:07
Signed-off-by: Ayushmore1214 <ayushmore42595@gmail.com>
Copy link
Copy Markdown
Contributor

@awanlin awanlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this started @Ayushmore1214, left a few comments for you to help get it moving forward. I'd rebase first as you have some conflicts, please don't close this PR, it's a great chance to learn and improve your git skills if you hit issues.

As for the CI error, that's an odd one, let see if after the rebase it just fixes itself. 👍

Comment thread scripts/list-workspaces-for-docs.js Outdated
}

const table = args.includes('--table');
const table = arrayToTable(backendFeatureReports);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this I would expect the flags to keep working the way they do but you would simply add a --save flag and then follow the same logic as what is done here:

if (save) {
if (!config.reportPath) {
console.error(`--save is not supported for this role (${role})`);
process.exit(4);
}
await fs.writeFile(
config.reportPath,
(
await fs.readFile(config.reportPath, 'utf8')
).replace(
/<!-- This table is automatically generated by the list-feature script -->[\s\S]*<!-- end of table -->/,
`<!-- This table is automatically generated by the list-feature script -->
${arrayToTable(reports)}
<!-- end of table -->`,

> [!NOTE]
> The "supported" column means the plugin has support for the New Frontend System, if the "alpha" column is "true" that means that the support is exported under the `/alpha` path.

<!-- This table is automatically generated by the list-feature script -->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect these comments to stay in place as they are needed when the script tries to update this the next time around.

| @backstage-community/plugin-stack-overflow | frontend-plugin | true | 1.47.2 | true | [README](https://github.com/backstage/community-plugins/blob/master/workspaces/stack-overflow/plugins/stack-overflow/README.md) |
| @backstage-community/plugin-stackstorm | frontend-plugin | | 1.47.2 | | [README](https://github.com/backstage/community-plugins/blob/master/workspaces/stackstorm/plugins/stackstorm/README.md) |
| @backstage-community/plugin-tech-insights | frontend-plugin | true | 1.47.2 | true | [README](https://github.com/backstage/community-plugins/blob/master/workspaces/tech-insights/plugins/tech-insights/README.md) |
| @backstage-community/plugin-tech-insights-maturity | frontend-plugin | | 1.47.2 | | [README](https://github.com/backstage/community-plugins/blob/master/workspaces/tech-insights/plugins/tech-insights-maturity/README.md) |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with this one.

| @backstage-community/plugin-vault | frontend-plugin | true | 1.43.2 | true | [README](https://github.com/backstage/community-plugins/blob/master/workspaces/vault/plugins/vault/README.md) |
| @backstage-community/plugin-wheel-of-names | frontend-plugin | | 1.43.2 | | [README](https://github.com/backstage/community-plugins/blob/master/workspaces/wheel-of-names/plugins/wheel-of-names/README.md) |
| @backstage-community/plugin-xcmetrics | frontend-plugin | | 1.42.3 | | [README](https://github.com/backstage/community-plugins/blob/master/workspaces/xcmetrics/plugins/xcmetrics/README.md) |
## Generating Table
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me to just removed this entirely but add a section to the workflow docs describing the workflow and the process: https://github.com/backstage/community-plugins/blob/main/docs/workflows.md

Comment thread docs/README.md
@@ -17,227 +17,212 @@ The Compatibility folder contains the following items:

## Workspaces and Their Plugins
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect to see this table being wrapped in a comment like this:

<!-- This table is automatically generated by the list-workspaces-for-docs script --> Table Contents <!-- end of table -->

Comment thread docs/compatibility/compatibility.md Outdated
@@ -5,116 +5,111 @@
The following table lists what version of Backstage each workspace is currently compatible with. The Backstage version listed for each workspace is determined by looking at the `backstage.json` file at the root of each workspace. The badges are using the [Shields.io Dynamic JSON Badge](https://shields.io/badges/dynamic-json-badge) feature and are kept up to date automatically (when the page loads it will do this check against the file as it is on the `main` branch).

> [!NOTE]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this, I mention documenting the workflow in the docs in another similar comment

Comment thread docs/compatibility/compatibility.md Outdated
| [vault](https://github.com/backstage/community-plugins/tree/main/workspaces/vault) | ![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbackstage%2Fcommunity-plugins%2Fmain%2Fworkspaces%2Fvault%2Fbackstage.json&query=%24.version&label=Backstage%20Version) |
| [wheel-of-names](https://github.com/backstage/community-plugins/tree/main/workspaces/wheel-of-names) | ![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbackstage%2Fcommunity-plugins%2Fmain%2Fworkspaces%2Fwheel-of-names%2Fbackstage.json&query=%24.version&label=Backstage%20Version) |
| [xcmetrics](https://github.com/backstage/community-plugins/tree/main/workspaces/xcmetrics) | ![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbackstage%2Fcommunity-plugins%2Fmain%2Fworkspaces%2Fxcmetrics%2Fbackstage.json&query=%24.version&label=Backstage%20Version) |
> This table is automatically updated by the `update-docs-tables` workflow.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect to see this table being wrapped in a comment like this:

<!-- This table is automatically generated by the list-compatibility script --> Table Contents <!-- end of table -->

node scripts/list-workspaces-for-docs.js

echo "🔄 Updating Compatibility Tables..."
node scripts/list-compatibility.js
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be 3 scripts called here, you are missing running list-feature.js

cc @backstage/community-plugins-maintainers
branch: "auto/docs-table-update"
base: main
delete-branch: true No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a new line to the bottom of this file

- `docs/compatibility/compatibility.md`
- `docs/compatibility/new-frontend-system.md`

cc @backstage/community-plugins-maintainers
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this as we get automatically assigned based on the CODEOWNERS file. Also, as we will trigger it manually the person who did will be expecting it to generate 👍

Signed-off-by: Ayush More <ayushmore42595@gmail.com>
Signed-off-by: Ayushmore1214 <ayushmore42595@gmail.com>
Copy link
Copy Markdown
Contributor

@awanlin awanlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Ayushmore1214, I gave this another review, I'm not sure that's what you wanted to not yet as some of the comments look unresolved. Sorry about that. Going forward please just ping me so I know if I should review or not 👍

Comment thread scripts/list-workspaces-for-docs.js Outdated
}

const table = args.includes('--table');
// --- AWANLIN'S REQUESTED LOGIC ---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this, we don't need it in the final script.

// Use the Regex replacement method requested in the PR
const newContent = fileContent.replace(
/[\s\S]*/,
`\n${tableContent}\n`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an improvement but does this actually work? You removed the comments form the docs itself so my gut say no. I'd really suggest taking a deep dive into how scripts/list-feature.j works as that's the ideal pattern the script should follow.

Comment thread scripts/list-workspaces-for-docs.js Outdated
console.error(error.stack || error);
process.exit(1);
});
}); No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a new line, please?

Comment thread .github/workflows/update-docs-tables.yml
@Ayushmore1214
Copy link
Copy Markdown
Contributor Author

@awanlin sorry for late follow up on this been busy last 4-5 days will push the changes by end of this week!

Signed-off-by: Ayush More <ayushmore42595@gmail.com>
@awanlin
Copy link
Copy Markdown
Contributor

awanlin commented Mar 21, 2026

Hi @Ayushmore1214, ready for review?

@Ayushmore1214
Copy link
Copy Markdown
Contributor Author

Yes it is!

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

@github-actions github-actions Bot added the stale label Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants