Skip to content

[FLINK-38899][runtime-web] Introduce the Rescales/History sub-page for streaming jobs with the adaptive scheduler enabled#27874

Open
och5351 wants to merge 2 commits intoapache:masterfrom
och5351:FLINK-38899
Open

[FLINK-38899][runtime-web] Introduce the Rescales/History sub-page for streaming jobs with the adaptive scheduler enabled#27874
och5351 wants to merge 2 commits intoapache:masterfrom
och5351:FLINK-38899

Conversation

@och5351
Copy link
Copy Markdown

@och5351 och5351 commented Apr 1, 2026

What is the purpose of the change

  • [FLINK-38899][runtime-web] Introduce the Rescales/History sub-page for streaming jobs with the adaptive scheduler enabled
  • The pr is not blocked by FLIP-495 completion and is independent sub-task in FLIP-487.

Brief change log

Adds the 'Rescales/History' tab and 'HistoryDetail' subpage in relation to [FLINK-38897][Runtime/REST] Introduce /jobs/:jobid/rescales/config endpoint to REST API #27580.

Dependent PRs

Rescales History Tab

image

Rescales HistoryDetail page

image

Verifying this change

Reference
#27826

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Apr 1, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@RocMarshal RocMarshal self-assigned this Apr 1, 2026
Copy link
Copy Markdown
Contributor

@RocMarshal RocMarshal left a comment

Choose a reason for hiding this comment

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

Hi, @och5351 Thank you for your hard work.

LGTM on the whole, just a few of comments.
PTAL in your free time :)

Comment on lines +21 to +48
export interface RescalesHistory {
rescaleUuid: string;
resourceRequirementsUuid: string;
rescaleAttemptId: number;
vertices: object;
slots: object;
schedulerStates: unknown[];
startTimestampInMillis: number;
endTimestampInMillis: number;
terminalState: string;
triggerCause: string;
terminatedReason: string;
expand?: boolean;
}

export interface RescalesDetailHistory {
rescaleUuid: string;
resourceRequirementsUuid: string;
rescaleAttemptId: number;
vertices: { [vertexId: string]: RescaleVertex };
slots: { [slotSharingGroupId: string]: RescaleSlot };
schedulerStates: SchedulerState[];
startTimestampInMillis: number;
endTimestampInMillis: number;
terminalState: string;
triggerCause: string;
terminatedReason: string;
}
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.

  • What about renaming it to JobRescaleDetails(keep the same name as backend REST part)
  • What about merging the two interface into one for reusing( The corresponding class in backend is one class.)?
export interface JobRescaleDetails {
  rescaleUuid: string;
  resourceRequirementsUuid: string;
  rescaleAttemptId: number;
  vertices?: { [vertexId: string]: VertexParallelismRescaleInfo };
  slots?: { [slotSharingGroupId: string]: SlotSharingGroupRescaleInfo };
  schedulerStates?: SchedulerState[];
  startTimestampInMillis: number;
  endTimestampInMillis: number;
  terminalState: string;
  triggerCause: string;
  terminatedReason: string;
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi @RocMarshal!

Thank you for the review :)

Regarding your first question about renaming to JobRescaleDetails:
That sounds great! I'll make that change and request your review again.

Regarding your second question about merging the two interfaces:
You make a good point. However, I think they should remain separate because they're used
for different API endpoints. JobRescaleDetails can extend JobRescaleHistory since:

  • JobRescaleHistory: /jobs/:jobid/rescales/history
  • JobRescaleDetails: /jobs/:jobid/rescales/details/:rescaleuuid

Does that approach work for you?

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.

Thanks @och5351

I compared this with the implementations of other existing frontend pages, and perhaps we can take a balanced approach.

Based on your idea, we can use inheritance to separate the two interfaces.

However, we may need to slightly differentiate the naming:

  • RescalesHistory → BriefJobRescaleDetails, since “xxHistory” sounds like a collection composed of multiple objects.
  • RescalesHistories → RescalesHistory, for the same reason, and it also better aligns with the abstraction level used by the backend when handling this data.
  • RescalesDetailHistory → JobRescaleDetails (extends BriefJobRescaleDetails)

Pls let me know your opinon.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@RocMarshal
Thank you for considering my suggestions!

I agree with your naming approach. The revised names make much more sense
and better reflect the actual data structure:

  • BriefJobRescaleDetails (for RescalesHistory)
  • RescalesHistory (for RescalesHistories)
  • JobRescaleDetails (for RescalesDetailHistory)

I'll make these changes and push a new commit for review.

Once all reviews are complete, I'll squash all the commits together.

@och5351
Copy link
Copy Markdown
Author

och5351 commented Apr 2, 2026

Hi, @RocMarshal !
Could you please review this one more time?

Thank you.

fe05b76

…r streaming jobs with the adaptive scheduler enabled
…r streaming jobs with the adaptive scheduler enabled - Temporary commit for review (Changed the `expand` and `styles` in the job-rescales.component.html.)
@RocMarshal
Copy link
Copy Markdown
Contributor

I checked UI of the PR locally with #27705.

checked:

  • Refresh button related logic and correctness
  • Rescales page showing logic
  • The table basic information showing logic, like tooltip, table headers, columns...,etc.

LGTM +1 on the whole just a few of issues:

  • highlighted in the Fig.
image image
  • When I click the Rescales/History from Rescales/Configuration page, the new Rescales/History page did not request the /jobs/:jobid/rescales/history interface, We expect that in this case, the corresponding API can be requested again.

Thanks @och5351 for the hard work.
I conducted some manual tests locally and found some minor issues, PTAL next week:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants