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-29740][Scala] Mark all Scala APIs as @Deprecated #21176

Merged

Conversation

MartijnVisser
Copy link
Contributor

@MartijnVisser MartijnVisser commented Oct 27, 2022

What is the purpose of the change

  • Mark all Scala APIs as deprecated as the outcome of FLIP-265

Brief change log

  • Mark all Scala APIs as @Deprecated
  • Remove Scala quickstarts, walkthroughs and examples
  • Added deprecation hint to DataStream and Table API overview/API page plus Scala Extension Page

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): yes
  • 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 Oct 27, 2022

CI report:

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

@MartijnVisser MartijnVisser force-pushed the FLINK-29740-deprecate-scala-apis branch from 8fcdf71 to 5c8a4af Compare October 28, 2022 07:30
Copy link
Contributor

@twalthr twalthr left a comment

Choose a reason for hiding this comment

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

I think this PR goes a bit too far. The purpose of a deprecation is to inform users about an outdated class or method. We don't need to deprecate every little corner of an API we if want to drop the entire API anyway. A blog post, an updated roadmap radar, and moving the API web documentation into a dedicated "Legacy APIs" section should be sufficient. Although we deprecate an API, the API should still be usable in an IDE for some time, which is not the case if all API parts are striked through. If at all, we should only deprecate the entry point of the API.

@MartijnVisser MartijnVisser force-pushed the FLINK-29740-deprecate-scala-apis branch from 5c8a4af to 4739db8 Compare October 31, 2022 13:52
@MartijnVisser
Copy link
Contributor Author

If at all, we should only deprecate the entry point of the API.

Following our offline sync on this, I've gone with marking the package (which is what you see if you visit https://nightlies.apache.org/flink/flink-docs-master/api/scala/org/apache/flink/api/scala/index.html) and the ExecutionEnvironment https://nightlies.apache.org/flink/flink-docs-master/api/scala/org/apache/flink/api/scala/ExecutionEnvironment.html as @Deprecated

The one thing I'm still doubting a bit is about the Scala documentation examples: should we add a hint warning to all examples (feels like overkill), a generic hint for each page that contains a Scala example or should we remove the Scala examples?

@syhily
Copy link
Contributor

syhily commented Oct 31, 2022

Does this mean that flink won't support Scala by default?

@MartijnVisser
Copy link
Contributor Author

Does this mean that flink won't support Scala by default?

See https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support -> There won't be dedicated Scala APIs in Flink anymore, but you can still use Scala to write your Flink applications. That's explained in https://flink.apache.org/2022/02/22/scala-free.html

@zentol
Copy link
Contributor

zentol commented Nov 1, 2022

The one thing I'm still doubting a bit is about the Scala documentation examples: should we add a hint warning to all examples (feels like overkill), a generic hint for each page that contains a Scala example or should we remove the Scala examples?

I'd remove the Scala examples and add a warning all pages that are specifically about Scala (like https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/dev/datastream/scala_api_extensions/).

@MartijnVisser MartijnVisser force-pushed the FLINK-29740-deprecate-scala-apis branch from acc64b3 to f092bc7 Compare November 1, 2022 10:25
- Remove Scala tests that relied on Scala examples
- Remove Scala test from `SocketWindowWordCount`
- Remove Scala example testing from CI
… DataStream Overview Page, Table Concepts & Common API page and the DataStream Scala Extensions Page
@MartijnVisser MartijnVisser force-pushed the FLINK-29740-deprecate-scala-apis branch from f092bc7 to bfbd8c0 Compare November 2, 2022 07:57
@MartijnVisser MartijnVisser marked this pull request as ready for review November 2, 2022 07:57
Copy link
Contributor

@zentol zentol left a comment

Choose a reason for hiding this comment

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

The scala quickstart/walkthrough are still referenced in the documentation.

@MartijnVisser
Copy link
Contributor Author

@flinkbot run azure

Copy link
Contributor

@zentol zentol left a comment

Choose a reason for hiding this comment

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

@MartijnVisser MartijnVisser merged commit 5ac290a into apache:master Nov 8, 2022
@MartijnVisser MartijnVisser deleted the FLINK-29740-deprecate-scala-apis branch November 8, 2022 13:33
dchristle pushed a commit to dchristle/flink that referenced this pull request Nov 18, 2022
…ache#21176

* [FLINK-29740][Scala] Remove Scala examples, quickstarts and walkthroughs

* [FLINK-29740][Scala] Mark Scala package and Scala ExecutionEnvironment as @deprecated

* [FLINK-29740][Scala] Remove Scala E2E tests/walkthroughs

- Remove Scala tests that relied on Scala examples
- Remove Scala test from `SocketWindowWordCount`
- Remove Scala example testing from CI

* [FLINK-29740][Scala] Add deprecation hint to the documentation on the DataStream Overview Page, Table Concepts & Common API page and the DataStream Scala Extensions Page

* [FLINK-29740][Scala] Remove Scala quickstart/walkthrough from documentation

* [FLINK-29740][Scala] Add Scala deprecation warning to project configuration overview
akkinenivijay pushed a commit to krisnaru/flink that referenced this pull request Feb 11, 2023
…ache#21176

* [FLINK-29740][Scala] Remove Scala examples, quickstarts and walkthroughs

* [FLINK-29740][Scala] Mark Scala package and Scala ExecutionEnvironment as @deprecated

* [FLINK-29740][Scala] Remove Scala E2E tests/walkthroughs

- Remove Scala tests that relied on Scala examples
- Remove Scala test from `SocketWindowWordCount`
- Remove Scala example testing from CI

* [FLINK-29740][Scala] Add deprecation hint to the documentation on the DataStream Overview Page, Table Concepts & Common API page and the DataStream Scala Extensions Page

* [FLINK-29740][Scala] Remove Scala quickstart/walkthrough from documentation

* [FLINK-29740][Scala] Add Scala deprecation warning to project configuration overview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants