Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions workspaces/orchestrator/.changeset/promote-nfs-stable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
'@red-hat-developer-hub/backstage-plugin-orchestrator': major
'@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets': major
---

**BREAKING**: Graduated the New Frontend System (NFS) orchestrator plugins to stable API.

The NFS plugins (`createFrontendPlugin`) have been promoted from the `./alpha` subpath to the primary `.` entry point. Legacy (OFS) exports have been moved to the new `./legacy` subpath.

For `@red-hat-developer-hub/backstage-plugin-orchestrator`, the `./alpha` subpath now only exports translations. For `@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets`, the `./alpha` subpath has been removed.

**Migration for NFS consumers (previously using `./alpha`):**

```diff
- import orchestratorPlugin, { orchestratorTranslationsModule } from '@red-hat-developer-hub/backstage-plugin-orchestrator/alpha';
- import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/alpha';
+ import orchestratorPlugin, { orchestratorTranslationsModule } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
+ import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets';
```

**Migration for OFS consumers:**

```diff
- import { OrchestratorPage, OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
- import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets';
+ import { OrchestratorPage, OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';
+ import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/legacy';
```

**Migration for dynamic plugin configurations:**

Legacy exports require `module: Legacy` — they are not available on the default module.

```yaml
dynamicPlugins:
frontend:
red-hat-developer-hub.backstage-plugin-orchestrator:
# Legacy exports require `module: Legacy`
dynamicRoutes:
- path: /orchestrator
importName: OrchestratorPage
module: Legacy
```
8 changes: 4 additions & 4 deletions workspaces/orchestrator/docs/static-plugin-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Follow these instructions to install the orchestrator plugin in a Backstage envi

```tsx title="packages/app/src/App.tsx"
/* highlight-add-next-line */
import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';

const routes = (
<FlatRoutes>
Expand All @@ -56,7 +56,7 @@ Follow these instructions to install the orchestrator plugin in a Backstage envi

```tsx title="packages/app/src/components/Root/Root.tsx"
/* highlight-add-next-line */
import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';

export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
Expand Down Expand Up @@ -86,8 +86,8 @@ If your app uses `createApp` from `@backstage/frontend-defaults`, add the orches
import { createApp } from '@backstage/frontend-defaults';
import orchestratorPlugin, {
orchestratorTranslationsModule,
} from '@red-hat-developer-hub/backstage-plugin-orchestrator/alpha';
import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/alpha';
} from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets';

export default createApp({
features: [
Expand Down
2 changes: 1 addition & 1 deletion workspaces/orchestrator/docs/workflows-tab.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To expose workflows directly on the entity page, update
import {
OrchestratorCatalogTab,
IsOrchestratorCatalogTabAvailable,
} from '@red-hat-developer-hub/backstage-plugin-orchestrator';
} from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';

const serviceEntityPage = (
<EntityLayout>
Expand Down
6 changes: 3 additions & 3 deletions workspaces/orchestrator/packages/app-legacy/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
import { UserSettingsPage } from '@backstage/plugin-user-settings';
import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets';
import { OrchestratorPage } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';

Check warning on line 49 in workspaces/orchestrator/packages/app-legacy/src/App.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

'@red-hat-developer-hub/backstage-plugin-orchestrator/legacy' imported multiple times.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugins&issues=AZ_tfW0W5gWIYMRXMbWP&open=AZ_tfW0W5gWIYMRXMbWP&pullRequest=4247
import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/legacy';
import { customAuthProviderPlugin } from 'custom-authentication-provider-module';
import { getThemes } from '@red-hat-developer-hub/backstage-plugin-theme';
import { NotificationsPage } from '@backstage/plugin-notifications';
Expand All @@ -58,7 +58,7 @@
import { entityPage } from './components/catalog/EntityPage';
import { Root } from './components/Root';
import { searchPage } from './components/search/SearchPage';
import { orchestratorTranslations } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import { orchestratorTranslations } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';

Check warning on line 61 in workspaces/orchestrator/packages/app-legacy/src/App.tsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

'@red-hat-developer-hub/backstage-plugin-orchestrator/legacy' imported multiple times.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-plugins&issues=AZ_tfW0W5gWIYMRXMbWQ&open=AZ_tfW0W5gWIYMRXMbWQ&pullRequest=4247

const app = createApp({
apis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import MenuIcon from '@mui/icons-material/Menu';
import GroupIcon from '@mui/icons-material/People';
import SearchIcon from '@mui/icons-material/Search';
import Box from '@mui/material/Box';
import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import { OrchestratorIcon } from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';
import { NotificationsSidebarItem } from '@backstage/plugin-notifications';
import { Administration } from '@backstage-community/plugin-rbac';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import Grid from '@mui/material/Grid';
import {
OrchestratorCatalogTab,
IsOrchestratorCatalogTabAvailable,
} from '@red-hat-developer-hub/backstage-plugin-orchestrator';
} from '@red-hat-developer-hub/backstage-plugin-orchestrator/legacy';

const techdocsContent = (
<EntityTechdocsContent>
Expand Down
4 changes: 2 additions & 2 deletions workspaces/orchestrator/packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import catalogPlugin from '@backstage/plugin-catalog/alpha';
import userSettingsPlugin from '@backstage/plugin-user-settings/alpha';
import orchestratorPlugin, {
orchestratorTranslationsModule,
} from '@red-hat-developer-hub/backstage-plugin-orchestrator/alpha';
import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/alpha';
} from '@red-hat-developer-hub/backstage-plugin-orchestrator';
import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets';
import { rhdhThemeModule } from '@red-hat-developer-hub/backstage-plugin-theme/alpha';
import { navModule } from './modules/nav';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,33 @@ Documentation of implemented widgets can be found in a [orchestratorFormWidgets.

## Deployment

### Static (for development)
### New frontend system (NFS)

In the packages/app/src/App.tsx:
```tsx
import orchestratorFormWidgetsPlugin from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets';

export default createApp({
features: [
// ...
orchestratorFormWidgetsPlugin,
],
});
```
import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets';
...

### Legacy frontend (OFS)

```tsx
import { orchestratorFormWidgetsPlugin } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/legacy';

const app = createApp({
...
plugins: [orchestratorFormWidgetsPlugin],
})
plugins: [orchestratorFormWidgetsPlugin],
});
```

### Dynamic (for RHDH production)

For RHDH production deployments, it is expected that the plugin is exported as a dynamic plugin using RHDH CLI a loaded among the other dynamic frontend plugins.
No explicit configuration is needed.
For RHDH production deployments, it is expected that the plugin is exported as a dynamic plugin using RHDH CLI and loaded among the other dynamic frontend plugins.
No explicit configuration is needed for NFS. Legacy OFS Scalprum consumers should use `module: Legacy`.

## `http-workflow-dev-server` - HTTP server for dynamic widgets development

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"types": "src/index.ts",
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.tsx",
"./legacy": "./src/legacyExports.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"alpha": [
"src/alpha.tsx"
"legacy": [
"src/legacyExports.ts"
],
"package.json": [
"package.json"
Expand Down Expand Up @@ -89,7 +89,8 @@
"scalprum": {
"name": "red-hat-developer-hub.backstage-plugin-orchestrator-form-widgets",
"exposedModules": {
"PluginRoot": "./src/index.ts"
"PluginRoot": "./src/index.ts",
"Legacy": "./src/legacyExports.ts"
}
},
"devDependencies": {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## API Report File for "@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { ApiFactory } from '@backstage/frontend-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { OrchestratorFormApi } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-api';

// Warning: (ae-forgotten-export) The symbol "FormWidgetsApi" needs to be exported by the entry point legacyExports.d.ts
//
// @public
export const orchestratorFormApiFactory: ApiFactory<
OrchestratorFormApi,
FormWidgetsApi,
{
[x: string]: unknown;
}
>;

// @public
export const orchestratorFormWidgetsPlugin: BackstagePlugin<{}, {}, {}>;

// (No @packageDocumentation comment for this package)
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,36 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
import { ApiFactory } from '@backstage/frontend-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { OrchestratorFormApi } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-api';
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';

// Warning: (ae-forgotten-export) The symbol "FormWidgetsApi" needs to be exported by the entry point index.d.ts
//
// @public
export const orchestratorFormApiFactory: ApiFactory<
OrchestratorFormApi,
FormWidgetsApi,
const _default: OverridableFrontendPlugin<
{},
{},
{
[x: string]: unknown;
'api:orchestrator-form-widgets': OverridableExtensionDefinition<{
kind: 'api';
name: undefined;
config: {};
configInput: {};
output: ExtensionDataRef<AnyApiFactory, 'core.api.factory', {}>;
inputs: {};
params: <
TApi,
TImpl extends TApi,
TDeps extends { [name in string]: unknown },
>(
params: ApiFactory<TApi, TImpl, TDeps>,
) => ExtensionBlueprintParams<AnyApiFactory>;
}>;
}
>;

// @public
export const orchestratorFormWidgetsPlugin: BackstagePlugin<{}, {}, {}>;
export default _default;

// (No @packageDocumentation comment for this package)
```

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,32 @@
* limitations under the License.
*/

export {
orchestratorFormWidgetsPlugin,
orchestratorFormApiFactory,
} from './plugin';
import {
ApiBlueprint,
createApiFactory,
createFrontendPlugin,
} from '@backstage/frontend-plugin-api';
import { orchestratorFormApiRef } from '@red-hat-developer-hub/backstage-plugin-orchestrator-form-api';
import { FormWidgetsApi } from './FormWidgetsApi';

const orchestratorFormApi = ApiBlueprint.make({
params: defineParams =>
defineParams(
createApiFactory({
api: orchestratorFormApiRef,
deps: {},
factory: () => new FormWidgetsApi(),
}),
),
});

/**
* Orchestrator Form Widgets plugin for the new frontend system.
* Provides default RJSF widgets (SchemaUpdater, ActiveTextInput, etc.) for the Workflow Execution form.
*
* @public
*/
export default createFrontendPlugin({
pluginId: 'orchestrator-form-widgets',
extensions: [orchestratorFormApi],
});
Loading
Loading