Skip to content

Commit

Permalink
chore(orchestrator): backport all orchestrator commits since release 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
batzionb committed Nov 12, 2024
1 parent b43da73 commit e5549d0
Showing 154 changed files with 7,280 additions and 5,890 deletions.
8 changes: 8 additions & 0 deletions .changeset/stale-experts-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@janus-idp/backstage-plugin-orchestrator-form-react": patch
"@janus-idp/backstage-plugin-orchestrator-form-api": patch
"@janus-idp/backstage-plugin-orchestrator-backend": patch
"@janus-idp/backstage-plugin-orchestrator": patch
---

backport all orchestrator commits since release 1.2
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# comma delimited path of files to exclude from copy/paste duplicate checking
sonar.cpd.exclusions=packages/cli/src/lib/bundler/scalprumConfig.ts
sonar.cpd.exclusions=plugins/orchestrator-common/src/generated/**,packages/cli/src/lib/bundler/scalprumConfig.ts
2 changes: 0 additions & 2 deletions plugins/orchestrator-backend/.eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions plugins/orchestrator-backend/.lintstagedrc.json

This file was deleted.

12 changes: 0 additions & 12 deletions plugins/orchestrator-backend/.prettierignore

This file was deleted.

20 changes: 0 additions & 20 deletions plugins/orchestrator-backend/.prettierrc.js

This file was deleted.

512 changes: 237 additions & 275 deletions plugins/orchestrator-backend/CHANGELOG.md

Large diffs are not rendered by default.

62 changes: 5 additions & 57 deletions plugins/orchestrator-backend/dev/index.ts
Original file line number Diff line number Diff line change
@@ -1,61 +1,9 @@
import {
createServiceBuilder,
ServerTokenManager,
UrlReader,
} from '@backstage/backend-common';
import { DiscoveryService, LoggerService } from '@backstage/backend-plugin-api';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
import { CatalogApi } from '@backstage/catalog-client';
import { Config } from '@backstage/config';
import { ServerPermissionClient } from '@backstage/plugin-permission-node';
import { createBackend } from '@backstage/backend-defaults';

import { Server } from 'http';
import { orchestratorPlugin } from '../src/plugin';

import { createRouter } from '../src/routerWrapper';
const backend = createBackend();

export interface ServerOptions {
port: number;
enableCors: boolean;
logger: LoggerService;
config: Config;
discovery: DiscoveryService;
catalogApi: CatalogApi;
urlReader: UrlReader;
scheduler: PluginTaskScheduler;
}
backend.add(orchestratorPlugin);

export async function startStandaloneServer(
options: ServerOptions,
): Promise<Server> {
const logger = options.logger.child({ service: 'orchestrator-backend' });
logger.debug('Starting application server...');

const permissions = ServerPermissionClient.fromConfig(options.config, {
discovery: options.discovery,
tokenManager: ServerTokenManager.noop(),
});

const router = await createRouter({
logger,
config: options.config,
discovery: options.discovery,
catalogApi: options.catalogApi,
urlReader: options.urlReader,
scheduler: options.scheduler,
permissions: permissions,
});

let service = createServiceBuilder(module)
.setPort(options.port)
.addRouter('/orchestrator', router);
if (options.enableCors) {
service = service.enableCors({ origin: 'http://localhost:3000' });
}

return await service.start().catch(err => {
logger.error(err);
process.exit(1);
});
}

module.hot?.accept();
backend.start();
21 changes: 5 additions & 16 deletions plugins/orchestrator-backend/dist-dynamic/package.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"types": "src/index.ts",
"private": true,
"publishConfig": {
"access": "public"
},
@@ -23,16 +22,12 @@
"require": "./dist/index.cjs.js",
"default": "./dist/index.cjs.js"
},
"./alpha": {
"require": "./dist/alpha.cjs.js",
"default": "./dist/alpha.cjs.js"
},
"./package.json": "./package.json"
},
"homepage": "https://red.ht/rhdh",
"repository": {
"type": "git",
"url": "git+https://github.com/janus-idp/backstage-plugins.git",
"url": "https://github.com/janus-idp/backstage-plugins",
"directory": "plugins/orchestrator-backend"
},
"bugs": "https://github.com/janus-idp/backstage-plugins/issues",
@@ -47,8 +42,7 @@
"files": [
"app-config.janus-idp.yaml",
"dist",
"static",
"alpha"
"static"
],
"scripts": {},
"dependencies": {
@@ -58,6 +52,7 @@
"express": "^4.18.2",
"express-promise-router": "^4.1.1",
"fs-extra": "^10.1.0",
"isomorphic-git": "^1.23.0",
"json-schema": "^0.4.0",
"moment": "^2.29.4",
"openapi-backend": "^5.10.5",
@@ -68,22 +63,16 @@
},
"devDependencies": {},
"peerDependencies": {
"@janus-idp/backstage-plugin-rbac-common": "1.9.0",
"@janus-idp/backstage-plugin-audit-log-node": "1.4.1",
"@backstage/backend-app-api": "^0.8.0",
"@janus-idp/backstage-plugin-rbac-common": "1.9.0",
"@backstage/backend-common": "^0.23.3",
"@backstage/backend-dynamic-feature-service": "^0.2.15",
"@backstage/backend-defaults": "^0.4.1",
"@backstage/backend-plugin-api": "^0.7.0",
"@backstage/backend-tasks": "^0.5.27",
"@backstage/catalog-client": "^1.6.5",
"@backstage/config": "^1.2.0",
"@backstage/core-plugin-api": "^1.9.3",
"@backstage/errors": "^1.2.4",
"@backstage/integration": "^1.13.0",
"@backstage/plugin-auth-node": "^0.4.17",
"@backstage/plugin-catalog-node": "^1.12.4",
"@backstage/plugin-events-backend": "^0.3.9",
"@backstage/plugin-events-node": "^0.3.8",
"@backstage/plugin-permission-common": "^0.8.0",
"@backstage/plugin-permission-node": "^0.8.0",
"@backstage/plugin-scaffolder-backend": "^1.23.0",
Loading

0 comments on commit e5549d0

Please sign in to comment.