Skip to content
Merged
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
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineConfig({
{ text: "Examples", link: "/examples/" },
{ text: "Overlay Testing", link: "/overlay/" },
{
text: "v2.1.18",
text: "v2.1.25",
items: [{ text: "Changelog", link: "/changelog" }],
},
],
Expand Down
9 changes: 8 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

All notable changes to this project will be documented in this file.

## [2.1.24] - Current
## [2.1.25] - Current

### Fixed

- Disable the Intelligent Assistant flavour by default in operator E2E deployments, matching Helm. Workspaces can enable it explicitly through `spec.flavours` in their subscription override.
- Fix operator restart helpers to select Deployment metadata rather than Pod-only labels.

## [2.1.24]

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@red-hat-developer-hub/e2e-test-utils",
"version": "2.1.24",
"version": "2.1.25",
"description": "Test utilities for RHDH E2E tests",
"license": "Apache-2.0",
"repository": {
Expand Down
3 changes: 3 additions & 0 deletions src/deployment/rhdh/config/operator/subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: Backstage
metadata:
name: developer-hub
spec:
flavours:
- name: intelligent-assistant
enabled: false
application:
appConfig:
configMaps:
Expand Down
13 changes: 10 additions & 3 deletions src/deployment/rhdh/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,18 @@ export class RHDHDeployment {
: "app.kubernetes.io/instance in (redhat-developer-hub,developer-hub)";
}

private get _deploymentLabelSelector(): string {
// The operator's rhdh.redhat.com/app label is on Pods, not Deployment metadata.
return this.deploymentConfig.method === "operator"
? "app.kubernetes.io/name=backstage,app.kubernetes.io/instance=developer-hub"
: this._labelSelector;
}

async rolloutRestart(): Promise<void> {
this._log(
`Restarting RHDH deployment in namespace ${this.deploymentConfig.namespace}...`,
);
await $`oc rollout restart deployment -l ${this._labelSelector} -n ${this.deploymentConfig.namespace}`;
await $`oc rollout restart deployment -l ${this._deploymentLabelSelector} -n ${this.deploymentConfig.namespace}`;
this._log(
`RHDH deployment restarted successfully in namespace ${this.deploymentConfig.namespace}`,
);
Expand All @@ -387,9 +394,9 @@ export class RHDHDeployment {
*/
async scaleDownAndRestart(): Promise<void> {
const namespace = this.deploymentConfig.namespace;
await $`oc scale deployment -l ${this._labelSelector} --replicas=0 -n ${namespace}`;
await $`oc scale deployment -l ${this._deploymentLabelSelector} --replicas=0 -n ${namespace}`;
await $`oc wait --for=delete pod -l ${this._labelSelector} -n ${namespace} --timeout=120s || true`;
await $`oc scale deployment -l ${this._labelSelector} --replicas=1 -n ${namespace}`;
await $`oc scale deployment -l ${this._deploymentLabelSelector} --replicas=1 -n ${namespace}`;
}

async waitUntilReady(timeout: number = 500): Promise<void> {
Expand Down
Loading