diff --git a/.github/workflows/build-and-push-images.yml b/.github/workflows/build-and-push-images.yml
index 3fd91f37d65..83fa49f2685 100644
--- a/.github/workflows/build-and-push-images.yml
+++ b/.github/workflows/build-and-push-images.yml
@@ -324,8 +324,6 @@ jobs:
max-parallel: 8 # Higher parallelism for native builds
env:
DOCKER_REGISTRY: ${{ needs.set-parameters.outputs.docker_registry }}
- JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
- JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
steps:
- name: Checkout Texera
@@ -333,19 +331,6 @@ jobs:
with:
ref: ${{ needs.set-parameters.outputs.branch }}
- - name: Setup JDK
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: 17
-
- - name: Setup sbt launcher
- uses: sbt/setup-sbt@67d461eba2c4753196c230e02da850757ba4775e # v1.5.14
-
- - uses: coursier/cache-action@95e5b1029b6b86e7bac033ee44a0697d8a527d2d # v8.1.1
- with:
- extraSbtFiles: '["*.sbt", "project/**.{scala,sbt}", "project/build.properties" ]'
-
- name: Download JOOQ generated code
uses: actions/download-artifact@v8
with:
@@ -421,8 +406,6 @@ jobs:
max-parallel: 4 # Lower for QEMU builds
env:
DOCKER_REGISTRY: ${{ needs.set-parameters.outputs.docker_registry }}
- JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
- JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
steps:
- name: Checkout Texera
@@ -430,19 +413,6 @@ jobs:
with:
ref: ${{ needs.set-parameters.outputs.branch }}
- - name: Setup JDK
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: 17
-
- - name: Setup sbt launcher
- uses: sbt/setup-sbt@67d461eba2c4753196c230e02da850757ba4775e # v1.5.14
-
- - uses: coursier/cache-action@95e5b1029b6b86e7bac033ee44a0697d8a527d2d # v8.1.1
- with:
- extraSbtFiles: '["*.sbt", "project/**.{scala,sbt}", "project/build.properties" ]'
-
- name: Download JOOQ generated code
uses: actions/download-artifact@v8
with:
diff --git a/frontend/src/app/dashboard/component/user/list-item/list-item.component.html b/frontend/src/app/dashboard/component/user/list-item/list-item.component.html
index 205cbe6c8dc..674848f4fb9 100644
--- a/frontend/src/app/dashboard/component/user/list-item/list-item.component.html
+++ b/frontend/src/app/dashboard/component/user/list-item/list-item.component.html
@@ -21,8 +21,7 @@
[nzBodyStyle]="{padding: '3px'}"
class="list-item-card"
[class.selected]="entry.checked"
- [class.has-button-group]="isPrivateSearch"
- [class.editing-description]="editingDescription">
+ [class.has-button-group]="isPrivateSearch">
{
expect(workflowPersistService.updateWorkflowDescription).toHaveBeenCalledWith(1, newDescription);
expect(component.entry.description).toBe(newDescription);
- expect(component.editingDescription).toBe(false);
});
it("should handle error when updating workflow description", () => {
@@ -162,7 +161,6 @@ describe("ListItemComponent", () => {
expect(workflowPersistService.updateWorkflowDescription).toHaveBeenCalledWith(1, newDescription);
expect(component.entry.description).toBe("Old Description");
- expect(component.editingDescription).toBe(false);
});
describe("Form View toggle", () => {
diff --git a/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts b/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts
index 5f35b3d2896..ffe2631addf 100644
--- a/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts
+++ b/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts
@@ -90,9 +90,7 @@ export class ListItemComponent implements OnChanges {
public canShare: boolean = false;
@Input() currentUid: number | undefined;
@ViewChild("nameInput") nameInput!: ElementRef;
- @ViewChild("descriptionInput") descriptionInput!: ElementRef;
editingName = false;
- editingDescription = false;
renderedDescription = "";
likeCount: number = 0;
@@ -328,8 +326,6 @@ export class ListItemComponent implements OnChanges {
private setEditingState(propertyName: "name" | "description", state: boolean): void {
if (propertyName === "name") {
this.editingName = state;
- } else if (propertyName === "description") {
- this.editingDescription = state;
}
}
diff --git a/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.spec.ts b/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.spec.ts
index 2f1cb167203..c00b17d142d 100644
--- a/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.spec.ts
+++ b/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.spec.ts
@@ -22,7 +22,7 @@ import { HttpClientTestingModule, HttpTestingController } from "@angular/common/
import { firstValueFrom } from "rxjs";
import { take, toArray } from "rxjs/operators";
-import { WORKFLOW_VERSIONS_API_BASE_URL, WorkflowVersionService } from "./workflow-version.service";
+import { WorkflowVersionService } from "./workflow-version.service";
import { WorkflowActionService } from "../../../../workspace/service/workflow-graph/model/workflow-action.service";
import { WorkflowPersistService } from "../../../../common/service/workflow-persist/workflow-persist.service";
import { UndoRedoService } from "../../../../workspace/service/undo-redo/undo-redo.service";
@@ -203,14 +203,6 @@ describe("WorkflowVersionService", () => {
});
});
- // ─── displayWorkflowVersions ──────────────────────────────────────────────
-
- it("displayWorkflowVersions unhighlights whatever is currently highlighted", () => {
- service.displayWorkflowVersions();
- expect(highlightedSpy.getCurrentHighlights).toHaveBeenCalled();
- expect(highlightedSpy.unhighlightElements).toHaveBeenCalledWith(["a", "b"]);
- });
-
// ─── displayReadonlyWorkflow ──────────────────────────────────────────────
describe("displayReadonlyWorkflow", () => {
@@ -524,7 +516,7 @@ describe("WorkflowVersionService", () => {
it("retrieveVersionsOfWorkflow GETs /version/{wid}", async () => {
const entries: WorkflowVersionEntry[] = [{ vId: 1, creationTime: 0, content: "{}", importance: false }];
const pending = firstValueFrom(service.retrieveVersionsOfWorkflow(42));
- const req = http.expectOne(`${API}/${WORKFLOW_VERSIONS_API_BASE_URL}/42`);
+ const req = http.expectOne(`${API}/version/42`);
expect(req.request.method).toBe("GET");
req.flush(entries);
expect(await pending).toEqual(entries);
@@ -532,7 +524,7 @@ describe("WorkflowVersionService", () => {
it("retrieveWorkflowByVersion parses a string `content` into an object", async () => {
const pending = firstValueFrom(service.retrieveWorkflowByVersion(42, 7));
- const req = http.expectOne(`${API}/${WORKFLOW_VERSIONS_API_BASE_URL}/42/7`);
+ const req = http.expectOne(`${API}/version/42/7`);
expect(req.request.method).toBe("GET");
req.flush({
...buildWorkflow(),
@@ -551,7 +543,7 @@ describe("WorkflowVersionService", () => {
next: () => (nextCalled = true),
complete: () => (completed = true),
});
- http.expectOne(`${API}/${WORKFLOW_VERSIONS_API_BASE_URL}/42/7`).flush(null);
+ http.expectOne(`${API}/version/42/7`).flush(null);
expect(nextCalled).toBe(false);
expect(completed).toBe(true);
});
@@ -559,7 +551,7 @@ describe("WorkflowVersionService", () => {
it("cloneWorkflowVersion POSTs to /version/clone/{vid} with the displayed id", async () => {
service.setDisplayParticularVersion(true, 11, 12);
const pending = firstValueFrom(service.cloneWorkflowVersion());
- const req = http.expectOne(`${API}/${WORKFLOW_VERSIONS_API_BASE_URL}/clone/11`);
+ const req = http.expectOne(`${API}/version/clone/11`);
expect(req.request.method).toBe("POST");
expect(req.request.body).toEqual({ displayedVersionId: 12 });
req.flush(99);
diff --git a/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.ts b/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.ts
index c44c3430719..c22ed0a82ae 100644
--- a/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.ts
+++ b/frontend/src/app/dashboard/service/user/workflow-version/workflow-version.service.ts
@@ -24,7 +24,7 @@ import { Workflow, WorkflowContent } from "../../../../common/type/workflow";
import { WorkflowPersistService } from "../../../../common/service/workflow-persist/workflow-persist.service";
import { UndoRedoService } from "../../../../workspace/service/undo-redo/undo-redo.service";
import { isEqual } from "lodash";
-import { OperatorLink, OperatorPredicate, Point } from "../../../../workspace/types/workflow-common.interface";
+import { OperatorPredicate } from "../../../../workspace/types/workflow-common.interface";
import { WorkflowVersionEntry } from "../../../type/workflow-version-entry";
import { AppSettings } from "../../../../common/app-setting";
import { filter, map } from "rxjs/operators";
@@ -32,22 +32,12 @@ import { WorkflowUtilService } from "../../../../workspace/service/workflow-grap
import { HttpClient } from "@angular/common/http";
-export const WORKFLOW_VERSIONS_API_BASE_URL = "version";
+const WORKFLOW_VERSIONS_API_BASE_URL = "version";
-type WorkflowContentKeys = keyof WorkflowContent;
-type Element = OperatorLink | OperatorPredicate | Point;
type DifferentOpIDsList = {
[key in "modified" | "added" | "deleted"]: string[];
};
-// only element types specified in this list are consider when calculating the difference between workflows
-const ELEMENT_TYPES_IN_WORKFLOW_DIFF_CALC: Partial[] = ["operators"];
-// it maps a name of the element type to its ID field name used in WorkflowContent
-const ID_FILED_FOR_ELEMENTS_CONFIG: { [key: string]: string } = {
- operators: "operatorID",
- commentBoxes: "commentBoxID",
-};
-
@Injectable({
providedIn: "root",
})
@@ -66,11 +56,6 @@ export class WorkflowVersionService {
private http: HttpClient
) {}
- public displayWorkflowVersions(): void {
- // unhighlight all the current highlighted operators and links
- const elements = this.workflowActionService.getJointGraphWrapper().getCurrentHighlights();
- this.workflowActionService.getJointGraphWrapper().unhighlightElements(elements);
- }
public setDisplayParticularVersion(flag: boolean, versionId?: number, displayedVersionId?: number): void {
if (flag) {
if (versionId != undefined) {
@@ -126,15 +111,19 @@ export class WorkflowVersionService {
differentOpIDsList.modified.map(id => this.highlightOpBoundary(id, "255,118,20,0.5"));
differentOpIDsList.added.map(id => this.highlightOpBoundary(id, "0,255,0,0.5"));
+ this.updateDeletedLinkBrackets(differentOpIDsList, "255,0,0,0.5");
+ }
+
+ private updateDeletedLinkBrackets(differentOpIDsList: DifferentOpIDsList, color: string) {
if (differentOpIDsList.deleted.length > 0) {
const tempWorkflow = this.workflowActionService.getTempWorkflow();
if (tempWorkflow != undefined) {
for (const link of tempWorkflow.content.links) {
if (differentOpIDsList.deleted.includes(link.source.operatorID) && link.target.operatorID != undefined) {
- this.highlightOpBracket(link.target.operatorID, "255,0,0,0.5", "left-");
+ this.highlightOpBracket(link.target.operatorID, color, "left-");
}
if (differentOpIDsList.deleted.includes(link.target.operatorID) && link.source.operatorID != undefined) {
- this.highlightOpBracket(link.source.operatorID, "255,0,0,0.5", "right-");
+ this.highlightOpBracket(link.source.operatorID, color, "right-");
}
}
}
@@ -157,60 +146,35 @@ export class WorkflowVersionService {
.attr("path." + position + "boundary/stroke", "rgba(" + color + ")");
}
- // TODO: the logic of the function will be refined later
public getWorkflowsDifference(workflowContent1: WorkflowContent, workflowContent2: WorkflowContent) {
- let eleType;
this.operatorPropertyDiff = {};
const difference: DifferentOpIDsList = { added: [], modified: [], deleted: [] };
- // get a list of element types that are changed between versions
- const eleTypeWithDiffList: WorkflowContentKeys[] = [];
- for (eleType of ELEMENT_TYPES_IN_WORKFLOW_DIFF_CALC) {
- if (!isEqual(workflowContent1[eleType], workflowContent2[eleType])) {
- eleTypeWithDiffList.push(eleType);
- }
+ if (isEqual(workflowContent1.operators, workflowContent2.operators)) {
+ return difference;
}
- for (eleType of eleTypeWithDiffList) {
- if (ELEMENT_TYPES_IN_WORKFLOW_DIFF_CALC.includes(eleType)) {
- let eleID;
- // return an object with key: ID of the element, value: detailed content of the element
- let getEleIDMap = function (workflowContent: WorkflowContent, eleType: WorkflowContentKeys) {
- const elements = workflowContent[eleType] as Element[];
- const eleIDtoContentMap: { [key: string]: Element } = {};
- for (const element of elements) {
- eleIDtoContentMap[element[ID_FILED_FOR_ELEMENTS_CONFIG[eleType] as keyof Element]] = element;
- }
- return eleIDtoContentMap;
- };
-
- const eleIDtoContentMap1 = getEleIDMap(workflowContent1, eleType);
- const eleIDtoContentMap2 = getEleIDMap(workflowContent2, eleType);
-
- for (eleID of Object.keys(eleIDtoContentMap2)) {
- if (!Object.keys(eleIDtoContentMap1).includes(eleID)) {
- // there is an addition if the element ID exist in historical but not current workflow version
- difference.added.push(eleID);
- } else {
- // there might be a modification if the element ID exist in both historical and current workflow versions
- if (!isEqual(eleIDtoContentMap1[eleID], eleIDtoContentMap2[eleID])) {
- // if the contents in two workflow versions are different for the same element ID
- difference.modified.push(eleID);
- if (eleType == "operators") {
- this.operatorPropertyDiff[eleID] = this.getOperatorsDifference(
- eleIDtoContentMap1[eleID] as OperatorPredicate,
- eleIDtoContentMap2[eleID] as OperatorPredicate
- );
- }
- }
- }
- }
+ const operatorsById = (workflow: WorkflowContent): Record => {
+ const operators: Record = {};
+ for (const operator of workflow.operators) {
+ operators[operator.operatorID] = operator;
+ }
+ return operators;
+ };
+
+ const firstById = operatorsById(workflowContent1);
+ const secondById = operatorsById(workflowContent2);
+ for (const id of Object.keys(secondById)) {
+ if (!Object.hasOwn(firstById, id)) {
+ difference.added.push(id);
+ } else if (!isEqual(firstById[id], secondById[id])) {
+ difference.modified.push(id);
+ this.operatorPropertyDiff[id] = this.getOperatorsDifference(firstById[id], secondById[id]);
+ }
+ }
- for (eleID of Object.keys(eleIDtoContentMap1)) {
- if (!Object.keys(eleIDtoContentMap2).includes(eleID)) {
- // there is a deletion if the element ID exist in current but not historical workflow version
- difference.deleted.push(eleID);
- }
- }
+ for (const id of Object.keys(firstById)) {
+ if (!Object.hasOwn(secondById, id)) {
+ difference.deleted.push(id);
}
}
return difference;
@@ -293,19 +257,7 @@ export class WorkflowVersionService {
this.highlightOpBoundary(id, "0,0,0,0");
}
- if (differentOpIDsList.deleted.length > 0) {
- const tempWorkflow = this.workflowActionService.getTempWorkflow();
- if (tempWorkflow != undefined) {
- for (const link of tempWorkflow.content.links) {
- if (differentOpIDsList.deleted.includes(link.source.operatorID) && link.target.operatorID != undefined) {
- this.highlightOpBracket(link.target.operatorID, "0,0,0,0", "left-");
- }
- if (differentOpIDsList.deleted.includes(link.target.operatorID) && link.source.operatorID != undefined) {
- this.highlightOpBracket(link.source.operatorID, "0,0,0,0", "right-");
- }
- }
- }
- }
+ this.updateDeletedLinkBrackets(differentOpIDsList, "0,0,0,0");
this.operatorPropertyDiff = {};
}
diff --git a/frontend/src/app/workspace/component/left-panel/versions-list/versions-list.component.ts b/frontend/src/app/workspace/component/left-panel/versions-list/versions-list.component.ts
index 7aca366a9d6..5dd7b0c622d 100644
--- a/frontend/src/app/workspace/component/left-panel/versions-list/versions-list.component.ts
+++ b/frontend/src/app/workspace/component/left-panel/versions-list/versions-list.component.ts
@@ -80,14 +80,9 @@ export class VersionsListComponent implements OnInit {
if (this.versionsList == undefined) {
return;
}
- if (!$event) {
- while (++index < this.versionsList.length && !this.versionsList[index].importance) {
- this.versionsList[index].expand = false;
- }
- } else {
- while (++index < this.versionsList.length && !this.versionsList[index].importance) {
- this.versionsList[index].expand = true;
- }
+ const expand = !!$event;
+ while (++index < this.versionsList.length && !this.versionsList[index].importance) {
+ this.versionsList[index].expand = expand;
}
}
diff --git a/frontend/src/app/workspace/component/menu/menu.component.spec.ts b/frontend/src/app/workspace/component/menu/menu.component.spec.ts
index 58678647955..38000aabd8b 100644
--- a/frontend/src/app/workspace/component/menu/menu.component.spec.ts
+++ b/frontend/src/app/workspace/component/menu/menu.component.spec.ts
@@ -1216,14 +1216,6 @@ describe("MenuComponent", () => {
});
describe("version history", () => {
- it("onClickGetAllVersions delegates to workflowVersionService.displayWorkflowVersions", () => {
- const displaySpy = vi.spyOn(workflowVersionService, "displayWorkflowVersions").mockImplementation(() => {});
-
- component.onClickGetAllVersions();
-
- expect(displaySpy).toHaveBeenCalledTimes(1);
- });
-
it("closeParticularVersionDisplay delegates to workflowVersionService", () => {
const closeSpy = vi.spyOn(workflowVersionService, "closeParticularVersionDisplay").mockImplementation(() => {});
diff --git a/frontend/src/app/workspace/component/menu/menu.component.ts b/frontend/src/app/workspace/component/menu/menu.component.ts
index 6c86831c5dc..f876cd3e762 100644
--- a/frontend/src/app/workspace/component/menu/menu.component.ts
+++ b/frontend/src/app/workspace/component/menu/menu.component.ts
@@ -1067,10 +1067,6 @@ export class MenuComponent implements OnInit, OnDestroy {
});
}
- onClickGetAllVersions() {
- this.workflowVersionService.displayWorkflowVersions();
- }
-
private handleWorkflowVersionDisplay(): void {
this.workflowVersionService
.getDisplayParticularVersionStream()
diff --git a/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts b/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts
index 24fc466bc1c..6fb26a65bcd 100644
--- a/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts
+++ b/frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts
@@ -36,7 +36,6 @@ import { WorkflowExecutionsService } from "../../../dashboard/service/user/workf
import { ExecuteWorkflowService } from "../../service/execute-workflow/execute-workflow.service";
import { WorkflowExecutionsEntry } from "../../../dashboard/type/workflow-executions-entry";
import { ExecutionState } from "../../types/execute-workflow.interface";
-import { ShareAccessComponent } from "../../../dashboard/component/user/share-access/share-access.component";
import { GuiConfigService } from "../../../common/service/gui-config.service";
import { ComputingUnitActionsService } from "../../../common/service/computing-unit/computing-unit-actions/computing-unit-actions.service";
import {
@@ -1260,7 +1259,7 @@ export class ComputingUnitSelectionComponent implements OnInit {
.pipe(untilDestroyed(this))
.subscribe({
next: pkgs => {
- env.userPackages = env.userPackages = this.parsePackageRows(pkgs);
+ env.userPackages = this.parsePackageRows(pkgs);
this.cdr.detectChanges();
},
error: (e: unknown) => console.error("Failed to refresh user packages", e),
@@ -1313,8 +1312,6 @@ export class ComputingUnitSelectionComponent implements OnInit {
const userPackageNames = new Set(env.userPackages.map(pkg => pkg.name.trim().toLowerCase()));
- const skippedMessages: string[] = [];
-
const packageArray =
env.newPackages
?.filter(pkg => pkg.name?.trim())
@@ -1335,13 +1332,6 @@ export class ComputingUnitSelectionComponent implements OnInit {
})
.map(pkg => `${pkg.name.trim()}${pkg.versionOp}${(pkg.version ?? "").trim()}`) ?? [];
- if (skippedMessages.length > 0) {
- this.pves[index].pipOutput = `${this.pves[index].pipOutput ?? ""}` + skippedMessages.join("\n") + "\n";
-
- this.updatePrettyPipOutput(index);
- this.scrollToBottomOfPipModal(index);
- }
-
if (packageArray.length === 0) {
this.pves[index].newPackages = [];
this.pves[index].isInstalling = false;