Skip to content

Show workflow version difference - #1503

Merged
sadeemsaleh merged 26 commits into
masterfrom
jingqi-difference-between-workflow
Jun 7, 2022
Merged

sadeemsaleh merged 26 commits into
masterfrom
jingqi-difference-between-workflow

Conversation

@jessieeeovo

@jessieeeovo jessieeeovo commented Apr 22, 2022 •

Copy link
Copy Markdown
Contributor
  • calculate the different between two versions of a workflow (only modifications and additions are included)
  • use orange background to indicate the difference of operators

Demo:

Additional operator

User editing workflow:
Screen Shot 2022-04-18 at 2 47 12 PM
Workflow in version system:
Screen Shot 2022-04-18 at 2 47 39 PM

The same operator with modified properties:

User editing workflow:
Screen Shot 2022-06-01 at 10 41 50 PM
Workflow in version system:
Screen Shot 2022-06-01 at 10 45 08 PM

Deleted operator:

User editing workflow:
Screen Shot 2022-06-01 at 10 41 50 PM
Workflow in version system:
Screen Shot 2022-06-01 at 10 44 17 PM

@sadeemsaleh sadeemsaleh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left minor comments on the structure. Will review the logic after the changes

@Yicong-Huang

Copy link
Copy Markdown
Contributor

@jessieeeovo I just want to leave a comment that let me finish #1479 before merging this PR. I will do that soon.

@Xiao-zhen-Liu

Copy link
Copy Markdown
Contributor

Discussion 2022.05.12: @sadeemsaleh WIP.

@Yicong-Huang Yicong-Huang changed the title Difference between workflows Show workflow version difference Jun 5, 2022
@sadeemsaleh
sadeemsaleh merged commit abe50a9 into master Jun 7, 2022
@sadeemsaleh
sadeemsaleh deleted the jingqi-difference-between-workflow branch June 7, 2022 20:41
@ethand605 ethand605 mentioned this pull request Aug 15, 2022
3 of 7 tasks
sadeemsaleh added a commit that referenced this pull request Oct 5, 2022
- [x] fix issue that the file doesn't exist when running the APP. either manually create it and add it to the PR, or write a piece of code to handle creating the file for the first time

This PR introduces Texera engine version to each workflow execution. The engine version is a hash code created automatically when the Texera is run. The engine version is not shown in the front end but can be checked in the sql for now.
The database schema has changed -- a new column "environment_version" is added to the table workflow_executions. The corresponding ALTER TABLE command is: `ALTER TABLE workflow_executions ADD COLUMN environment_version VARCHAR(128) NOT NULL`.

- [x] need to test if the version is changed, PR #1503 will highlight the label.

Co-authored-by: Liqin Ye <[email protected]>
Co-authored-by: sadeem <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
* calculate the different between two versions of a workflow (only modifications and additions are included)
* use orange background to indicate the difference of operators

## Demo:
### Additional operator
User editing workflow:
<img width="869" alt="Screen Shot 2022-04-18 at 2 47 12 PM" src="https://user-images.githubusercontent.com/56903646/164644466-ddd2858c-9244-4f32-8066-927d0434a588.png">
Workflow in version system:
<img width="1440" alt="Screen Shot 2022-04-18 at 2 47 39 PM" src="https://user-images.githubusercontent.com/56903646/164644762-9a9ab55d-8862-4956-906a-9c9681990c7e.png">

### The same operator with modified properties:
User editing workflow:
<img width="777" alt="Screen Shot 2022-06-01 at 10 41 50 PM" src="https://user-images.githubusercontent.com/56903646/171560911-52cb7285-beff-411e-ad5c-75db967f11d6.png">
Workflow in version system:
<img width="1229" alt="Screen Shot 2022-06-01 at 10 45 08 PM" src="https://user-images.githubusercontent.com/56903646/171561225-86499367-b701-4280-b6eb-31861bd46d59.png">


### Deleted operator:
User editing workflow:
<img width="777" alt="Screen Shot 2022-06-01 at 10 41 50 PM" src="https://user-images.githubusercontent.com/56903646/171560911-52cb7285-beff-411e-ad5c-75db967f11d6.png">
Workflow in version system:
<img width="777" alt="Screen Shot 2022-06-01 at 10 44 17 PM" src="https://user-images.githubusercontent.com/56903646/171561098-2d669f65-d3b0-427b-a1d9-fa2fec4328e9.png">

Co-authored-by: sadeemsaleh <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
- [x] fix issue that the file doesn't exist when running the APP. either manually create it and add it to the PR, or write a piece of code to handle creating the file for the first time

This PR introduces Texera engine version to each workflow execution. The engine version is a hash code created automatically when the Texera is run. The engine version is not shown in the front end but can be checked in the sql for now.
The database schema has changed -- a new column "environment_version" is added to the table workflow_executions. The corresponding ALTER TABLE command is: `ALTER TABLE workflow_executions ADD COLUMN environment_version VARCHAR(128) NOT NULL`.

- [x] need to test if the version is changed, PR apache#1503 will highlight the label.

Co-authored-by: Liqin Ye <[email protected]>
Co-authored-by: sadeem <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 26, 2026
…9706)

### What changes were proposed in this PR?

Remove code that nothing uses, or that repeats what the code next to it
already does, from the workflow version service, the versions list, the
workspace menu, the dashboard list item, the computing-unit picker and
the image build workflow (**+42/−165 lines**). There is no behavior
change.

- **Version history:** `WorkflowVersionService.displayWorkflowVersions`
and its only caller, `MenuComponent.onClickGetAllVersions`, which no
template has bound since apache#2500 removed the button's click handler. Their
two spec cases go with them.
- **Version differences:** `getWorkflowsDifference` loops over a
configurable list of element types that has held only `operators` since
apache#1503 added it, with an ID-field map that names a type the loop never
visits. It now compares operators directly.
- The bracket highlighting for links of deleted operators, written
twice, becomes one helper.
- The versions list's two expand loops, identical but for the value they
set, become one.
- The unused `Element` and `WorkflowContentKeys` aliases go, and the URL
constant that only the spec imported becomes file-local.
- **List item:** `ListItemComponent` only ever sets `editingDescription`
to false, and its template has had no `#descriptionInput` since apache#4212
replaced the inline editor. The flag, its class binding and style, and
the view query go. `CardItemComponent` keeps its own, live copy.
- **Computing-unit picker:** three pieces go.
- An unused `ShareAccessComponent` import; its dialog left this
component in apache#4331.
  - A doubled `userPackages` assignment.
- A `skippedMessages` list that nothing fills, with the block that would
print it.
- **Image builds:** the AMD64 and ARM64 jobs build inside Docker, so
their JDK, sbt launcher and coursier cache setup and their
`JAVA_OPTS`/`JVM_OPTS` go. The JOOQ job, which does run sbt, keeps its
setup.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Version history: apache#1343 (2021-09-28); version
differences: apache#1503 (2022-06-07), the second bracket block apache#5285
(2026-06-05), the versions list apache#1444 (2022-02-15); list item: apache#2819
(2024-09-07); picker: apache#3508 (2025-07-07) and apache#4902 (2026-05-12); image
builds: apache#4055 (2025-11-21) |
| Usage removed by | Version history: apache#2500 (2024-03-24) removed the
button that called it. List item: apache#4212 (2026-02-18) replaced the inline
description editor. Picker import: apache#4331 (2026-04-09) moved the share
dialog out. Everything else: unused since introduction. |

As of 2026-11-25:
- The element-type list has held a single type for over 4 years.
- The version-history handler has had no caller for over two and a half
years.
- The image jobs have set up a JDK they never use for a year.
- The list item's edit state has been unreachable for 9 months, and the
picker's import has been unused for over 7 months.
- The skipped-message list has stayed empty for the 6 months since it
was added.

### Any related issues, documentation, discussions?

Closes apache#9705.

### How was this PR tested?

Ran on this branch and on `main` at `fd0e2d5338` (Windows 11; Node 24
with Yarn 4.14.1):

```bash
cd frontend
npx ng test --watch=false --include='**/workflow-version.service.spec.ts' --include='**/menu.component.spec.ts' --include='**/versions-list.component.spec.ts' --include='**/list-item.component.spec.ts' --include='**/computing-unit-selection.component.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
npx ngc -p src/tsconfig.app.json --noEmit
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src | grep -E '\.(ts|html)$')
```

- **Frontend:** the five specs run 478 tests on this branch and 480 on
`main`, all passing. The two extra on `main` are the deleted methods'
own cases; every other test keeps its name and outcome. Both typechecks,
the AOT compile, prettier-eslint and ESLint pass.
- **Workflow:** `build-and-push-images.yml` parses, both image jobs keep
their Docker steps, and only the JOOQ job sets up a JDK. The image jobs
themselves run only after merge.

To re-check, both commands return no hits on this branch:

```bash
git grep -nwE "displayWorkflowVersions|onClickGetAllVersions|skippedMessages|ELEMENT_TYPES_IN_WORKFLOW_DIFF_CALC|ID_FILED_FOR_ELEMENTS_CONFIG" -- frontend/src
git grep -nw editingDescription -- frontend/src/app/dashboard/component/user/list-item/list-item.component.ts frontend/src/app/dashboard/component/user/list-item/list-item.component.html
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants