From 569255d1a89fe543cfdf8e91a241d37ca84610c3 Mon Sep 17 00:00:00 2001 From: Purushottam Sinha Date: Fri, 1 May 2026 22:42:01 +0530 Subject: [PATCH 1/2] [hotfix][runtime-web] Bring *-logs components under eslint enforcement The bare `logs` pattern in `flink-runtime-web/web-dashboard/.eslintignore` uses gitignore semantics and matches a directory of that name at any depth. It was intended for a top-level log-output directory (alongside `*.log` and `npm-debug.log*`) but also captured the source directories `src/app/pages/{job-manager,task-manager}/logs/`. Files under those paths were silently skipped by every eslint invocation: the `lint-staged` pre-commit hook, `npm run lint` in CI, and IDE eslint integrations. Prettier-style drift (and other rule violations) accumulated on those files unnoticed and eventually leaked into an unrelated feature PR as reformat noise. Anchors the pattern at the project root (`logs` -> `/logs`) so it keeps its original intent without shadowing real source dirs, and brings the now-visible files up to the project's lint rules: - Adds `: void` to `ngOnInit` and `reload` in `JobManagerLogsComponent` and `TaskManagerLogsComponent` so they satisfy `@typescript-eslint/explicit-function-return-type` (sibling `ngOnDestroy(): void` was already annotated). - Applies `eslint --fix` output: prettier whitespace, quote style, bracket spacing, `import/order` grouping, and import deduplication. After this, `eslint src --ext .ts,.html` includes the two files and exits 0; future edits go through the same gate as the rest of the codebase. --- flink-runtime-web/web-dashboard/.eslintignore | 2 +- .../logs/job-manager-logs.component.ts | 32 ++++++++--------- .../logs/task-manager-logs.component.ts | 36 +++++++++---------- 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/flink-runtime-web/web-dashboard/.eslintignore b/flink-runtime-web/web-dashboard/.eslintignore index 8a6dedf35589c..d0565f9f5f3a4 100644 --- a/flink-runtime-web/web-dashboard/.eslintignore +++ b/flink-runtime-web/web-dashboard/.eslintignore @@ -5,7 +5,7 @@ tsc-out dist # Logs -logs +/logs *.log npm-debug.log* diff --git a/flink-runtime-web/web-dashboard/src/app/pages/job-manager/logs/job-manager-logs.component.ts b/flink-runtime-web/web-dashboard/src/app/pages/job-manager/logs/job-manager-logs.component.ts index 9593722885250..000f7faf043b3 100644 --- a/flink-runtime-web/web-dashboard/src/app/pages/job-manager/logs/job-manager-logs.component.ts +++ b/flink-runtime-web/web-dashboard/src/app/pages/job-manager/logs/job-manager-logs.component.ts @@ -17,29 +17,27 @@ */ import { ChangeDetectorRef, Component, OnInit, ChangeDetectionStrategy, OnDestroy, Inject } from '@angular/core'; -import { ConfigService, JobManagerService } from '@flink-runtime-web/services'; -import { EditorOptions } from 'ng-zorro-antd/code-editor'; +import { FormsModule } from '@angular/forms'; +import { of, Subject } from 'rxjs'; +import { catchError, takeUntil } from 'rxjs/operators'; + +import { AddonCompactComponent } from '@flink-runtime-web/components/addon-compact/addon-compact.component'; +import { AutoResizeDirective } from '@flink-runtime-web/components/editor/auto-resize.directive'; import { flinkEditorOptions } from '@flink-runtime-web/components/editor/editor-config'; -import {of, Subject} from 'rxjs'; -import {catchError, takeUntil} from 'rxjs/operators'; import { JOB_MANAGER_MODULE_CONFIG, JOB_MANAGER_MODULE_DEFAULT_CONFIG, JobManagerModuleConfig } from '@flink-runtime-web/pages/job-manager/job-manager.config'; -import {NzCodeEditorModule} from "ng-zorro-antd/code-editor"; -import {AutoResizeDirective} from "@flink-runtime-web/components/editor/auto-resize.directive"; -import {FormsModule} from "@angular/forms"; -import { - AddonCompactComponent -} from "@flink-runtime-web/components/addon-compact/addon-compact.component"; +import { ConfigService, JobManagerService } from '@flink-runtime-web/services'; +import { EditorOptions, NzCodeEditorModule } from 'ng-zorro-antd/code-editor'; @Component({ - selector: 'flink-job-manager-logs', - templateUrl: './job-manager-logs.component.html', - styleUrls: ['./job-manager-logs.component.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [NzCodeEditorModule, AutoResizeDirective, FormsModule, AddonCompactComponent] + selector: 'flink-job-manager-logs', + templateUrl: './job-manager-logs.component.html', + styleUrls: ['./job-manager-logs.component.less'], + changeDetection: ChangeDetectionStrategy.OnPush, + imports: [NzCodeEditorModule, AutoResizeDirective, FormsModule, AddonCompactComponent] }) export class JobManagerLogsComponent implements OnInit, OnDestroy { public readonly downloadName = `jobmanager_log`; @@ -60,7 +58,7 @@ export class JobManagerLogsComponent implements OnInit, OnDestroy { this.downloadUrl = `${this.configService.BASE_URL}/jobmanager/log`; } - public ngOnInit() { + public ngOnInit(): void { this.reload(); } @@ -69,7 +67,7 @@ export class JobManagerLogsComponent implements OnInit, OnDestroy { this.destroy$.complete(); } - public reload() { + public reload(): void { this.loading = true; this.cdr.markForCheck(); this.jobManagerService diff --git a/flink-runtime-web/web-dashboard/src/app/pages/task-manager/logs/task-manager-logs.component.ts b/flink-runtime-web/web-dashboard/src/app/pages/task-manager/logs/task-manager-logs.component.ts index d2ca9a7468912..b8cff88bd8d95 100644 --- a/flink-runtime-web/web-dashboard/src/app/pages/task-manager/logs/task-manager-logs.component.ts +++ b/flink-runtime-web/web-dashboard/src/app/pages/task-manager/logs/task-manager-logs.component.ts @@ -17,29 +17,27 @@ */ import { ChangeDetectorRef, Component, OnInit, ChangeDetectionStrategy, OnDestroy, Inject } from '@angular/core'; -import {catchError, takeUntil} from 'rxjs/operators'; -import { ConfigService, TaskManagerService } from '@flink-runtime-web/services'; -import { EditorOptions } from 'ng-zorro-antd/code-editor'; -import {of, Subject} from 'rxjs'; +import { FormsModule } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; +import { of, Subject } from 'rxjs'; +import { catchError, takeUntil } from 'rxjs/operators'; + +import { AddonCompactComponent } from '@flink-runtime-web/components/addon-compact/addon-compact.component'; +import { AutoResizeDirective } from '@flink-runtime-web/components/editor/auto-resize.directive'; +import { ModuleConfig } from '@flink-runtime-web/core/module-config'; import { TASK_MANAGER_MODULE_CONFIG, - TASK_MANAGER_MODULE_DEFAULT_CONFIG, + TASK_MANAGER_MODULE_DEFAULT_CONFIG } from '@flink-runtime-web/pages/task-manager/task-manager.config'; -import {ModuleConfig} from "@flink-runtime-web/core/module-config"; -import {NzCodeEditorModule} from "ng-zorro-antd/code-editor"; -import {AutoResizeDirective} from "@flink-runtime-web/components/editor/auto-resize.directive"; -import {FormsModule} from "@angular/forms"; -import { - AddonCompactComponent -} from "@flink-runtime-web/components/addon-compact/addon-compact.component"; +import { ConfigService, TaskManagerService } from '@flink-runtime-web/services'; +import { EditorOptions, NzCodeEditorModule } from 'ng-zorro-antd/code-editor'; @Component({ - selector: 'flink-task-manager-logs', - templateUrl: './task-manager-logs.component.html', - styleUrls: ['./task-manager-logs.component.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - imports: [NzCodeEditorModule, AutoResizeDirective, FormsModule, AddonCompactComponent] + selector: 'flink-task-manager-logs', + templateUrl: './task-manager-logs.component.html', + styleUrls: ['./task-manager-logs.component.less'], + changeDetection: ChangeDetectionStrategy.OnPush, + imports: [NzCodeEditorModule, AutoResizeDirective, FormsModule, AddonCompactComponent] }) export class TaskManagerLogsComponent implements OnInit, OnDestroy { public editorOptions: EditorOptions; @@ -61,7 +59,7 @@ export class TaskManagerLogsComponent implements OnInit, OnDestroy { this.editorOptions = moduleConfig.editorOptions || TASK_MANAGER_MODULE_DEFAULT_CONFIG.editorOptions; } - public ngOnInit() { + public ngOnInit(): void { this.taskManagerId = this.activatedRoute.parent!.snapshot.params.taskManagerId; this.downloadUrl = `${this.configService.BASE_URL}/taskmanagers/${this.taskManagerId}/log`; this.downloadName = `taskmanager_${this.taskManagerId}_log`; @@ -73,7 +71,7 @@ export class TaskManagerLogsComponent implements OnInit, OnDestroy { this.destroy$.complete(); } - public reload() { + public reload(): void { this.loading = true; this.cdr.markForCheck(); this.taskManagerService From 6b0b1601ebff63fc24d9a9fa3030bf3592bef44b Mon Sep 17 00:00:00 2001 From: Purushottam Sinha Date: Sun, 3 May 2026 00:17:44 +0530 Subject: [PATCH 2/2] [hotfix][runtime-web] Anchor remaining .eslintignore artifact dirs Following review feedback on the parent commit: `tsc-out` and `dist` in `flink-runtime-web/web-dashboard/.eslintignore` use the same unanchored gitignore semantics that `logs` did, so they would also match a directory of that name at any nesting depth. No source dirs collide with them today, but anchoring at the project root keeps the three top-level artifact dirs (`/logs`, `/tsc-out`, `/dist`) consistent and closes the same footgun for the future. --- flink-runtime-web/web-dashboard/.eslintignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flink-runtime-web/web-dashboard/.eslintignore b/flink-runtime-web/web-dashboard/.eslintignore index d0565f9f5f3a4..aa93ecd4c6834 100644 --- a/flink-runtime-web/web-dashboard/.eslintignore +++ b/flink-runtime-web/web-dashboard/.eslintignore @@ -1,8 +1,8 @@ .idea gen web -tsc-out -dist +/tsc-out +/dist # Logs /logs