Skip to content

Commit bad7cb0

Browse files
fix(orchestrator): improved devMode, revert last yaml change (#408)
1 parent ebf64b9 commit bad7cb0

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-orchestrator-backend': patch
3+
---
4+
5+
updated dev mode to remove git configuration from the workflow repo, added checks for cloning path

workspaces/orchestrator/app-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ orchestrator:
148148
# path: ./.devModeTemp/db_persistence # this will be under packages/backend
149149
workflowsSource:
150150
gitRepositoryUrl: https://github.com/parodos-dev/backstage-orchestrator-workflows
151-
# Override this in your own app-config.local.yaml; it should refer to a directory in the user's home directory.
152-
# localPath: /home/<username>/tmp/orchestrator
151+
localPath: ./.devModeTemp/repository # this will be under packages/backend
153152
dataIndexService:
154153
url: http://localhost:8899

workspaces/orchestrator/plugins/orchestrator-backend/src/service/DevModeService.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ export class DevModeService {
249249
}
250250

251251
public async loadDevWorkflows() {
252-
if (!this.connection?.repoUrl) {
252+
if (!this.connection?.repoUrl || !this.connection?.resourcesPath) {
253253
this.logger.info(
254-
'No Git repository configured. Skipping dev workflows loading.',
254+
'No Git repository or path configured. Skipping dev workflows loading.',
255255
);
256256
return;
257257
}
@@ -264,5 +264,7 @@ export class DevModeService {
264264
}
265265

266266
await this.gitService.clone(this.connection.repoUrl, localPath);
267+
// Remove .git to avoid any submodule issues
268+
await fs.rm(join(localPath, '.git'), { recursive: true, force: true });
267269
}
268270
}

0 commit comments

Comments
 (0)