Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-24737][runtime-web] Update outdated web dependencies #17711

Closed
wants to merge 2 commits into from

Conversation

yangjunhan
Copy link
Contributor

What is the purpose of the change

Update outdated web dependencies and dev-dependencies.
https://issues.apache.org/jira/browse/FLINK-24737

Brief change log

Most dependencies have been updated to the latest versions except Angular (v13) and its dependent Rxjs and TypeScript, etc. According to npm audit, the remaining unresolved dependency vulnerabilities are mainly caused by Angular and should be fixed while bumping it to v13.

Note: Bumping the Angular framework to v13 should be in another PR once NG-Zorro-Antd releases their compatible v13.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

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
  • If yes, how is the feature documented? not applicable

@flinkbot
Copy link
Collaborator

flinkbot commented Nov 8, 2021

CI report:

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

@flinkbot
Copy link
Collaborator

flinkbot commented Nov 8, 2021

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 80fbcfa (Mon Nov 08 08:29:05 UTC 2021)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@MartijnVisser
Copy link
Contributor

@yangjunhan Can you have a look at the failing build and fix it?

@yangjunhan
Copy link
Contributor Author

Can you have a look at the failing build and fix it?

@MartijnVisser Conflicts have been addressed.

@MartijnVisser
Copy link
Contributor

Can you have a look at the failing build and fix it?

@MartijnVisser Conflicts have been addressed.

Thanks @yangjunhan The CI unfortunately still fails and reports:

[INFO] npm ERR! @jest/types not accessible from pretty-format

@yangjunhan
Copy link
Contributor Author

@flinkbot run azure

1 similar comment
@MartijnVisser
Copy link
Contributor

@flinkbot run azure

@MartijnVisser
Copy link
Contributor

@Airblader Could you have a look?

Copy link
Contributor

@Airblader Airblader left a comment

Choose a reason for hiding this comment

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

Thanks for the PR and bringing the dependencies more up to date, @yangjunhan. Overall this looks good to me, but I have a couple questions.

However, it seems that now when making commits unrelated to the UI, there is output that didn't use to exist:

$ git commit …

> [email protected] lint-staged
> lint-staged

→ No staged files match any configured task.

I think this will confuse the majority of developers as most do not work on the UI. Can we do something to restore the old behavior of not producing output unless the commit contains changes to the UI?

@@ -0,0 +1,4 @@
#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use the more portable

#!/usr/bin/env bash

.on('zoom', ({ transform }: SafeAny) => {
const { x, y, k } = transform;
this.zoom = k;
this.zoomEvent.emit(k);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need the additional emit here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seemed to be a mistake while resolving conflicts by rebasing. Let me fix it.

this.zoom = k;
this.zoomEvent.emit(k);
this.containerTransform = transform;
this.transformEvent.emit(transform);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need the additional emit here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above

@yangjunhan
Copy link
Contributor Author

I think this will confuse the majority of developers as most do not work on the UI. Can we do something to restore the old behavior of not producing output unless the commit contains changes to the UI?

@Airblader There is such output because "flink-runtime-web" is introducing husky + lint-staged for linting which essentially uses git hook through pre-commit, and the pre-commit is at the repo level.

One way I can think of to restore the older behavior is triggering npm script lint-staged only when git diff --cached --quiet -- "flink-runtime-web/web-dashboard/*" (maybe written in an independent shell script). Could you think of any other better way to achieve so?

@Airblader
Copy link
Contributor

@yangjunhan I apologize for the late response; I was on vacation over the holidays.

The changes overall look fine to me, except for the open point around the linting output. I think the solution you proposed sounds good, at least I can't think of anything better either.

@yangjunhan
Copy link
Contributor Author

@yangjunhan I apologize for the late response; I was on vacation over the holidays.

The changes overall look fine to me, except for the open point around the linting output. I think the solution you proposed sounds good, at least I can't think of anything better either.

@Airblader Hope you enjoyed your holidays. Since NG-ZORRO-antd recently released its new version, I am considering bumping Runtime-Web directly to Angular v13 and NG-ZORRO-antd v13 in this PR, if that is ok with you and @MartijnVisser .

@MartijnVisser
Copy link
Contributor

@yangjunhan I'm not sure if it's better to make it a separate PR (since we also have https://issues.apache.org/jira/browse/FLINK-24768 open for this) or if we should do it in a separate commit. Let's see what @Airblader says on that. It would be great do have this update in place!

@Airblader
Copy link
Contributor

Airblader commented Jan 14, 2022

I would prefer bumping this in a separate PR using the JIRA issue @MartijnVisser pointed to. I'm happy to review and merge that one as well, of course (no vacation in between this time).

@yangjunhan
Copy link
Contributor Author

I would prefer bumping this in a separate PR using the JIRA issue @MartijnVisser pointed to. I'm happy to review and merge that one as well, of course (no vacation in between this time).

@Airblader No problems! I can do it in a separate PR. Meanwhile, I fixed the linting output problem as we discussed.

Copy link
Contributor

@Airblader Airblader left a comment

Choose a reason for hiding this comment

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

Thanks! I'm rebasing this and letting it run through the CI one more time before merging.

@Airblader Airblader closed this in 3722d3f Jan 17, 2022
niklassemmler pushed a commit to niklassemmler/flink that referenced this pull request Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants