flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-39587][runtime-web] Remove eslint cache from web dashboard lint

Open qiuyanjun888 opened this issue 5 months ago • 2 comments

What is the purpose of the change

This pull request fixes FLINK-39587 by making the web dashboard lint script run ESLint without the persistent cache. This prevents CI lint from tolerating stale prettier/template drift that can be hidden by .eslintcache.

Jira: https://issues.apache.org/jira/browse/FLINK-39587

Brief change log

  • Removed --cache from the web dashboard lint script.
  • Removed --cache from lint:fix so the prescribed auto-fix path also checks/fixes all source files.
  • Ran npm run lint:fix, which produced one scoped stylelint property-order fix in job-exceptions.component.less.

Verifying this change

This change is already covered by the web dashboard lint/build checks and can be verified as follows:

  • node <script check> package.json lint/lint:fix contain no eslint --cache (failed before the change, passed after)
  • npm run lint:fix
  • rm -f .eslintcache && npm run lint
  • npm run build
  • git diff --check

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

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

Documentation

  • Does this pull request introduce a new feature? no

Was generative AI tooling used to co-author this PR?
  • [X] Yes (please specify the tool below)

Generated-by: Hermes Agent (OpenAI GPT-5.5)

qiuyanjun888 avatar Jun 15 '26 05:06 qiuyanjun888

CI report:

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

flinkbot avatar Jun 15 '26 05:06 flinkbot

This PR is focused on runtime-web dashboard lint/style cleanup. There has already been community review/comment, but it still needs maintainer review.

@RocMarshal @xintongsong @Sxnan could you please take a look when you have time and advise whether this approach is acceptable for this area and can move forward?

qiuyanjun888 avatar Jun 26 '26 02:06 qiuyanjun888

Hi @qiuyanjun888, a heads-up on a small overlap. My Angular 21 upgrade (#28593, FLINK-40028) also touches the web-dashboard, and it ran into exactly the drift this PR is meant to catch: regenerating the lockfile bumped prettier within ^2.4.1 (2.6.2 -> 2.8.8), and prettier 2.7+ strips the indentation inside HTML comments, which reformatted the ASF license headers. The --cache masked it locally, so it only surfaced in review.

In other words, had this PR landed first, my CI would have caught the drift during development. The two changes are complementary, and a test-merge of the branches is clean. The only incidental overlap is the identical job-exceptions.component.less property reorder (a stylelint-order autofix that both PRs happen to include).

I've pinned prettier back to 2.6.2 in #28593 so it carries no header churn, but I think your cache removal is the better root-cause fix. No changes needed on your side, just flagging for merge sequencing. Happy for this one to go in first.

MartijnVisser avatar Jun 30 '26 20:06 MartijnVisser