Skip to content

Commit 01ac7ea

Browse files
authored
docs: clarify auto-discovery behavior and fix user guide accuracy (#2036)
* docs: clarify auto-discovery, remove stale guidance, fix examples - Explain where automatic discovery works and where it does not - Document single-quote literal matching for workflow regexps input - Position manual PRs as a fallback, not a preferred workflow - Remove outdated frontend plugin / Scalprum configuration section - Rewrite integrity-check and compatibility-check explanations - Replace fixed monthly/quarterly cadence with signal-based updates - Clarify plugin removal must delete the entire workspace folder - Fix Backstage Compatibility wiki link - Document commit SHA usage for multi-plugin workspaces in source.json - Ground major-version update guidance in practical workflow - Fix patch example rationales (Yarn Berry globs, dynamic plugin imports) - Update plugins-regexps references to workspace-discovery-include/exclude Jira: RHIDP-12661 Made-with: Cursor * docs: remove scalprum-config.json remnant and fix cadence label - Remove last scalprum-config.json reference from overlay example in 02-export-tools.md - Update Responsibilities Overview table to say "When compatibility signals appear" instead of "Monthly/Quarterly" Made-with: Cursor * docs: include workspace e2e validation in owner testing steps Expand plugin owner test guidance to include workspace e2e validation (when available) and link to the getting-started testing workflow section. Made-with: Cursor
1 parent 9f3fcf6 commit 01ac7ea

6 files changed

Lines changed: 176 additions & 228 deletions

user-guide/01-getting-started.md

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ The `rhdh-plugin-export-overlays` repository serves as a **metadata and automati
3232
```
3333
rhdh-plugin-export-overlays/
3434
├── versions.json # Target versions (Backstage, Node, CLI)
35-
├── plugins-regexps # Auto-discovery scope patterns
35+
├── workspace-discovery-include # Auto-discovery scope patterns
36+
├── workspace-discovery-exclude # Workspaces excluded from auto-discovery
3637
├── workspaces/ # One folder per source workspace
3738
│ └── [workspace-name]/
3839
│ ├── source.json # Source repository reference
@@ -43,9 +44,7 @@ rhdh-plugin-export-overlays/
4344
│ │ └── *.patch
4445
│ ├── plugins/ # Plugin-specific overrides (optional)
4546
│ │ └── [plugin-name]/
46-
│ │ ├── overlay/
47-
│ │ ├── app-config.dynamic.yaml
48-
│ │ └── scalprum-config.json
47+
│ │ └── overlay/
4948
│ └── smoke-tests/ # Smoke test configuration (optional)
5049
│ ├── test.env
5150
│ └── app-config.test.yaml
@@ -144,20 +143,60 @@ spec:
144143
- [`@roadiehq/`](https://github.com/RoadieHQ/roadie-backstage-plugins) – Roadie Backstage Plugins
145144
2. Plugin is compatible with the target Backstage version
146145

146+
### How Automatic Discovery Works
147+
148+
The overlay repository runs an automated workflow (`update-plugins-repo-refs.yaml`) twice daily. It scans npm registries for new releases of packages matching the scope patterns defined in the `workspace-discovery-include` file:
149+
150+
- `@backstage-community/`
151+
- `@red-hat-developer-hub/`
152+
- `@roadiehq/`
153+
154+
When a new release is found, the workflow creates or updates a PR with the necessary `source.json`, `plugins-list.yaml`, and `metadata/*.yaml` changes.
155+
156+
#### Where automatic discovery works
157+
158+
Automatic discovery works for plugins published under the scopes listed above. If a new package version is published to npm under one of those scopes, the workflow will detect it and propose an update.
159+
160+
#### Where automatic discovery does not work
161+
162+
- **Plugins outside the supported scopes** (e.g., `@pagerduty/`, `@dynatrace/`, or any other third-party namespace) are not scanned. These must be added manually.
163+
- **Workspaces listed in `workspace-discovery-exclude`** are skipped entirely by the scheduled run.
164+
- **Unpublished or pre-release versions** that are not yet on npm will not be discovered.
165+
- **New workspaces** are only proposed when the scheduled workflow has the `allow-workspace-addition` flag enabled; otherwise only existing workspaces receive updates.
166+
147167
### Option 1: Automatic Discovery (Preferred)
148168

149-
Plugins under supported scopes are auto-discovered daily. If your plugin was recently published, wait for the automation to create a PR.
169+
If your plugin is published under a supported scope, wait for the daily automation to create a PR. No action is needed on your part.
150170

151171
### Option 2: Trigger Workflow Manually
152172

173+
You can trigger the discovery workflow on demand. The `regexps` input accepts either a regular expression or a literal package name.
174+
175+
**Wrapping a value in single quotes** tells the workflow to treat it as an exact (literal) package name rather than a regular expression. This is the recommended approach when you want to target a specific plugin package directly, because it avoids accidentally matching other packages with similar names.
176+
153177
```bash
154-
# Requires write access to the repository
178+
# Target a single package by exact name (recommended — note the single quotes)
155179
gh workflow run update-plugins-repo-refs.yaml \
156-
-f regexps="@backstage-community/plugin-your-plugin" \
180+
-f regexps="'@backstage-community/plugin-your-plugin'" \
181+
-f single-branch="main"
182+
183+
# Target multiple packages matching a regex pattern (no quotes)
184+
gh workflow run update-plugins-repo-refs.yaml \
185+
-f regexps="@backstage-community/plugin-catalog-backend-module-.*" \
186+
-f single-branch="main"
187+
```
188+
189+
You can also scope the run to a specific workspace:
190+
191+
```bash
192+
gh workflow run update-plugins-repo-refs.yaml \
193+
-f workspace-path="workspaces/your-workspace" \
157194
-f single-branch="main"
158195
```
159196

160-
### Option 3: Manual PR
197+
### Option 3: Manual PR (Fallback)
198+
199+
Manual PRs should be reserved for situations where automatic discovery does not apply — for example, plugins outside the supported scopes or workspaces that require nonstandard setup. Prefer Options 1 or 2 whenever possible.
161200

162201
1. **Create workspace folder:**
163202

user-guide/02-export-tools.md

Lines changed: 9 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -134,53 +134,6 @@ When working with Pull Requests, use these comment commands:
134134

135135
---
136136

137-
## Frontend Plugin Configuration
138-
139-
Frontend plugins often require additional configuration files.
140-
141-
### app-config.dynamic.yaml
142-
143-
Defines route bindings, dynamic routes, and mount points:
144-
145-
```yaml
146-
backstage.plugin-techdocs:
147-
routeBindings:
148-
targets:
149-
- importName: techdocsPlugin
150-
bindings:
151-
- bindTarget: catalogPlugin.externalRoutes
152-
bindMap:
153-
viewTechDoc: techdocsPlugin.routes.docRoot
154-
dynamicRoutes:
155-
- path: /docs
156-
importName: TechDocsIndexPage
157-
menuItem:
158-
icon: docs
159-
text: Docs
160-
mountPoints:
161-
- mountPoint: entity.page.docs/cards
162-
importName: EntityTechdocsContent
163-
```
164-
165-
**Location:** `workspaces/[workspace]/plugins/[plugin-name]/app-config.dynamic.yaml`
166-
167-
### scalprum-config.json
168-
169-
Defines the Scalprum module configuration:
170-
171-
```json
172-
{
173-
"name": "backstage.plugin-api-docs-module-protoc-gen-doc",
174-
"exposedModules": {
175-
"PluginRoot": "./src/api.ts"
176-
}
177-
}
178-
```
179-
180-
**Location:** `workspaces/[workspace]/plugins/[plugin-name]/scalprum-config.json`
181-
182-
---
183-
184137
## Overlays vs Patches
185138

186139
| Feature | Overlay | Patch |
@@ -200,11 +153,10 @@ Defines the Scalprum module configuration:
200153

201154
```
202155
workspaces/backstage/plugins/api-docs-module-protoc-gen-doc/
203-
├── overlay/
204-
│ ├── package.json
205-
│ └── src/
206-
│ └── api.ts
207-
└── scalprum-config.json
156+
└── overlay/
157+
├── package.json
158+
└── src/
159+
└── api.ts
208160
```
209161
210162
### When to Use Patches
@@ -234,14 +186,14 @@ See [06 - Patch Management](./06-patch-management.md) for details.
234186

235187
### Integrity Check Failures
236188

237-
**Symptom:** `Integrity check failed for package X`
189+
**Symptom:** Workflow logs show an integrity mismatch for a package.
238190

239-
**Cause:** The `package.json` in the source repo doesn't match the overlay's expectations.
191+
**Cause:** The export process verifies that the `package.json` fields in the checked-out source match the metadata declared in the overlay (e.g., package name, version). A mismatch usually means `source.json:repo-ref` points to a different version than what `metadata/*.yaml:spec.version` declares.
240192

241193
**Solution:**
242-
1. Verify `source.json` points to the correct `repo-ref`
243-
2. Check if the source `package.json` was modified
244-
3. If intentional, consider using `--no-integrity-check` (document why)
194+
1. Verify `source.json:repo-ref` points to the correct tag or commit
195+
2. Confirm that `spec.version` and `spec.packageName` in your metadata files match the source `package.json` at that ref
196+
3. If the mismatch is intentional (e.g., a patch changes the version), document the reason in the PR
245197

246198
### Missing Dependencies
247199

user-guide/03-plugin-owner-responsibilities.md

Lines changed: 30 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You are a plugin owner if you:
1919
| Area | Frequency | Criticality |
2020
|------|-----------|-------------|
2121
| Metadata synchronization | Every release | 🔴 High |
22-
| Backstage version updates | Monthly/Quarterly | 🔴 High |
22+
| Backstage version updates | When compatibility signals appear | 🔴 High |
2323
| Patch maintenance | As needed | 🟡 Medium |
2424
| Test validation | Every PR | 🔴 High |
2525
| Deprecation communication | As needed | 🟡 Medium |
@@ -52,24 +52,26 @@ See [04 - Metadata Synchronization](./04-metadata-synchronization.md) for detail
5252

5353
---
5454

55-
### 2. Update Backstage Versions Regularly
55+
### 2. Keep Backstage Versions Compatible
5656

57-
The target platform tracks Backstage releases. Your plugin must remain compatible.
57+
The target platform tracks Backstage releases. Your plugin must remain compatible with the version declared in `versions.json`.
5858

59-
**Minimum cadence:**
59+
Rather than following a fixed calendar cadence, watch for concrete signals that an update is needed:
6060

61-
| Update Type | Frequency | Action Required |
62-
|-------------|-----------|-----------------|
63-
| Target version | Monthly | Verify compatibility with new Backstage release |
64-
| Minimum version | Quarterly | Update `supportedVersions` in metadata |
65-
| Major version | As released | Full compatibility testing |
61+
- The [Backstage Compatibility Report](https://github.com/redhat-developer/rhdh-plugin-export-overlays/wiki/Backstage-Compatibility-Report) shows your workspace as incompatible
62+
- A new platform release branch is being created and your plugin blocks it
63+
- Automated discovery PRs fail the compatibility check for your workspace
64+
- Upstream has released a version built against the current target Backstage version
6665

67-
**Process:**
66+
**When any of these signals appear:**
6867

6968
1. Check the target Backstage version in `versions.json`
70-
2. Verify your plugin works with that version
71-
3. Update `repo-backstage-version` in `source.json`
69+
2. Find a plugin release compatible with that version
70+
3. Update `repo-ref` and `repo-backstage-version` in `source.json`
7271
4. Update `supportedVersions` in metadata files
72+
5. Test with `/publish` and `/smoketest`, and run workspace E2E validation when available for that workspace
73+
74+
See [01 - Getting Started: Testing Your Plugin](./01-getting-started.md#testing-your-plugin) for test workflow details.
7375

7476
See [05 - Version Updates](./05-version-updates.md) for detailed procedures.
7577

@@ -119,22 +121,23 @@ Notify downstream users when:
119121

120122
---
121123

122-
## Monthly Maintenance Checklist
124+
## Maintenance Checklist
123125

124-
Use this checklist each month:
126+
Use this checklist when updating your plugin (triggered by a compatibility signal, a new upstream release, or a platform version bump):
125127

126128
```markdown
127-
## Monthly Plugin Maintenance - [Plugin Name] - [Month/Year]
129+
## Plugin Maintenance - [Plugin Name] - [Date]
128130

129131
### Version Check
130-
- [ ] Verified plugin compatibility with current target Backstage version
131-
- [ ] Updated `source.json:repo-backstage-version` if needed
132-
- [ ] Updated `metadata/*.yaml:spec.backstage.supportedVersions` if needed
132+
- [ ] Checked target Backstage version in versions.json
133+
- [ ] Found a plugin release compatible with the target version
134+
- [ ] Updated `source.json:repo-ref` and `repo-backstage-version`
135+
- [ ] Updated `metadata/*.yaml:spec.version` and `spec.backstage.supportedVersions`
133136

134137
### Metadata Check
135-
- [ ] Verified `spec.version` matches source `package.json:version`
136138
- [ ] Verified `spec.packageName` matches source `package.json:name`
137139
- [ ] Reviewed and updated `appConfigExamples` if configuration changed
140+
- [ ] Updated metadata links (source, issues, docs) if needed
138141

139142
### Patch Check
140143
- [ ] Verified all patches apply cleanly to current source
@@ -150,37 +153,6 @@ Use this checklist each month:
150153

151154
---
152155

153-
## Quarterly Maintenance Checklist
154-
155-
Use this checklist each quarter:
156-
157-
```markdown
158-
## Quarterly Plugin Maintenance - [Plugin Name] - [Quarter/Year]
159-
160-
### Compatibility Review
161-
- [ ] Reviewed Backstage changelog for breaking changes
162-
- [ ] Tested plugin with minimum supported platform version
163-
- [ ] Tested plugin with current platform version
164-
- [ ] Updated `supportedVersions` range
165-
166-
### Dependency Audit
167-
- [ ] Reviewed embedded packages (--embed-package)
168-
- [ ] Checked for security advisories in dependencies
169-
- [ ] Updated suppressed native packages if needed
170-
171-
### Documentation Review
172-
- [ ] Updated metadata links (source, issues, docs)
173-
- [ ] Reviewed and updated description/title
174-
- [ ] Checked `appConfigExamples` accuracy
175-
176-
### Cleanup
177-
- [ ] Removed obsolete patches
178-
- [ ] Removed obsolete overlay files
179-
- [ ] Archived any deprecated plugin variants
180-
```
181-
182-
---
183-
184156
## Handling Plugin Deprecation
185157

186158
When deprecating a plugin:
@@ -193,24 +165,21 @@ spec:
193165
# Add deprecation notice
194166
```
195167

196-
### 2. Comment Out in plugins-list.yaml
197-
198-
```yaml
199-
# plugins/my-deprecated-plugin: ==> Deprecated: Use new-plugin instead
200-
```
201-
202-
### 3. Communicate to Users
168+
### 2. Communicate to Users
203169

204170
- Open an issue documenting the deprecation
205171
- Provide migration path to replacement plugin
206172
- Set a timeline for removal (typically 2 release cycles)
207173

208-
### 4. Remove After Grace Period
174+
### 3. Remove After Grace Period
175+
176+
When the grace period ends, remove the workspace entirely:
209177

210-
- Delete metadata files
211-
- Remove from `plugins-list.yaml`
178+
- Delete the workspace folder (including `source.json`, `plugins-list.yaml`, metadata files, and any patches)
212179
- Document removal in release notes
213180

181+
> **Important:** Simply commenting out entries in `plugins-list.yaml` or removing metadata files while keeping the workspace folder is not sufficient. If the workspace folder and `source.json` remain, automatic discovery will detect the plugin again and propose re-adding it. To permanently remove a plugin, delete the entire workspace directory.
182+
214183
---
215184

216185
## Getting Help
@@ -219,7 +188,7 @@ spec:
219188
|-------|-------------|
220189
| Build failures | Check workflow logs, open issue |
221190
| Patch conflicts | See [06 - Patch Management](./06-patch-management.md) |
222-
| Compatibility questions | Check [Backstage Compatibility wiki](https://github.com/redhat-developer/rhdh-plugin-export-overlays/wiki) |
191+
| Compatibility questions | Check the [Backstage Compatibility Report](https://github.com/redhat-developer/rhdh-plugin-export-overlays/wiki/Backstage-Compatibility-Report) |
223192
| Process questions | Open a discussion or issue |
224193

225194
---

0 commit comments

Comments
 (0)