[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-25 Thread Timo Walther (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746844#comment-17746844
 ] 

Timo Walther commented on FLINK-32560:
--

Thanks for considering my feedback. And thanks for the nice summary [~rskraba]. 
Class-level annotations sound like a nice trade-off between annotating 
everything vs. annotating only entry points.

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-24 Thread Xintong Song (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746725#comment-17746725
 ] 

Xintong Song commented on FLINK-32560:
--

Thanks, [~rskraba]. Your proposal sounds good to me. The purpose of this PR is 
indeed to get more attentions on the deprecation of Scala APIs, rather than 
legalizing its removal in 2.0.

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-24 Thread Ryan Skraba (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746431#comment-17746431
 ] 

Ryan Skraba commented on FLINK-32560:
-

Hello -- I tend to agree that the PR is over-annotated!  This was a bit of 
fastidious work to make sure that we met "the Letter of the Law" for 
deprecating every exposed API.  This case is slightly different because we're 
dropping the entire module (as opposed to _guiding_ the developer from one 
method or class to another).  I think the intention is pretty well met by 
deprecating the entrypoints.

Adding the class-level annotations for 1.18 could be the compromise, especially 
because the Scala API is less maintained and tested we can expect it to degrade 
over time, but I have no objection to just closing the PR.

Taking this into account, I propose:
* We consider the current state (the entrypoints already deprecated) to be 
sufficient for removing the Scala API in 2.0, and this PR is just to give some 
*extra* heads up to developers.
* Avoid deprecating methods, only classes, regardless of explicit visibility 
annotations on annotations.
* Prefer the {{@scala.deprecated}} annotation on Scala code, but don't worry 
too much about it.  My common tooling (IntelliJ) treats them as the same.  As a 
scala dev, I prefer the scala annotation on scala code.  Scaladoc notes both, 
but puts the scala annotation in a separate "Deprecated" section.

Regardless, spotless breaks up the link to the FLIP-265 and it's not rendered 
correctly in scaladoc APIs.  This is an easy fix.

If we agree on this, I can update the PR, or we can leave it all as it is!

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-24 Thread Xintong Song (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746312#comment-17746312
 ] 

Xintong Song commented on FLINK-32560:
--

[~twalthr],

Crossposting your comment here in order to keep the discussions at one place.
{quote}TBH I'm questioning this PR. We only deprecated the entry points to the 
API because we wanted to keep the API usable while it still exists. Nobody 
wants to develop in an API where every single method is deprecated. I'm fine 
maybe with class-level deprecations if we need more of those. But spamming the 
codebase with deprecations while everyones knows that the entire API will be 
removed, is not very helpful. It will also spam CI/CD logs with hundreds of 
warnings.
{quote}
I see your point, but I tend to think this differently. Technically speaking, 
yes, by deprecating the entry points we implicitly send the message that all 
Scala APIs are deprecated. However, that requires users to carefully read the 
deprecation message, which many of the users don't from my experience. IMHO, 
trying to catch the attention of the careless users is probably more important 
than not disturbing the users who insists to work with the deprecated Scala API.
{quote}I'm fine maybe with class-level deprecations if we need more of those.
{quote}
+1. There are many methods annotated because they have different API stability 
from the containing class. E.g., the class is annotated as `@Public` while some 
of its methods are annotated as `@PublicEvolving`. For such methods, I think 
it's good enough to mark deprecation at the class level.

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-24 Thread Timo Walther (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17746289#comment-17746289
 ] 

Timo Walther commented on FLINK-32560:
--

[~xtsong] please consider [my 
comment|https://github.com/apache/flink/pull/23006#pullrequestreview-1543006419]
 in the PR around this topic.

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-11 Thread Ryan Skraba (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17742015#comment-17742015
 ] 

Ryan Skraba commented on FLINK-32560:
-

OK -- taking a quick look at the current work, I'll take a look at all modules 
outside of table-planner and add the following annotation and comment *every 
single time*:

{code}
/**
 * @deprecated
 *   All Flink Scala APIs are deprecated and will be removed in a future Flink 
version version. You
 *   can still build your application in Scala, but you should move to the Java 
version of either
 *   the DataStream and/or Table API.
 * @see
 *   https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support;>
 *   FLIP-265 Deprecate and remove Scala API support
 */
@Deprecated
{code}

There's also some {{@Public}} scala code in flink-hadoop-compatibility, and 
even if {{table-planner}} isn't in scope yet, the {{table-table-api-scala}} and 
{{table-table-api-scala-bridge}} are likely also candidates for clean-up.

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-11 Thread Xintong Song (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17741973#comment-17741973
 ] 

Xintong Song commented on FLINK-32560:
--

The help is very much welcomed. Thanks [~rskraba] and [~Sergey Nuyanzin].

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-11 Thread Sergey Nuyanzin (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17741950#comment-17741950
 ] 

Sergey Nuyanzin commented on FLINK-32560:
-

thanks for volunteering [~rskraba] 

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Assignee: Ryan Skraba
>Priority: Blocker
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32560) Properly deprecate all Scala APIs

2023-07-11 Thread Ryan Skraba (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17741949#comment-17741949
 ] 

Ryan Skraba commented on FLINK-32560:
-

I can probably help out here!

> Properly deprecate all Scala APIs
> -
>
> Key: FLINK-32560
> URL: https://issues.apache.org/jira/browse/FLINK-32560
> Project: Flink
>  Issue Type: Sub-task
>  Components: API / Scala
>Reporter: Xintong Song
>Priority: Blocker
> Fix For: 1.18.0
>
>
> We agreed to drop Scala API support in FLIP-265 [1], and have tried to 
> deprecate them in FLINK-29740. Also, both user documentation and roadmap[2] 
> shows that scala API supports are deprecated. However, none of the APIs in 
> `flink-streaming-scala` are annotated with `@Deprecated` atm, and only 
> `ExecutionEnvironment` and `package` are marked `@Deprecated` in 
> `flink-scala`.
> [1] 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-265+Deprecate+and+remove+Scala+API+support
> [2] https://flink.apache.org/roadmap/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)