[
https://issues.apache.org/jira/browse/FLINK-12602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16846636#comment-16846636
]
sunjincheng commented on FLINK-12602:
-------------------------------------
Thank you for confirming this is an issue,and thanks a lot for your double
check. Due to the script check logic is incorrect, most of the outputs are
incorrect.
You are right and I just pointed out the problem of the scala-free check and
not mentioned the final solution which I think we should discuss it.
I tried to understand you and have modified the script a bit and have got the
same results as you mentioned(In my local).
The main changes are as follows:
1) Adds test modules which should be checked:
!flink-fs-tests,!flink-yarn-tests,!flink-tests
2) Marks the modules as infected which depend on scala trasitively or depend on
modules suffixed with `_{scala_version}`
I think we should discuss the rule of how to check whether a module is
scala-free or not.
If I understand you correctly, the rule in your mind may be as follows:
1) All the modules should check the dependencies(excluding the dependencies
introduced by the test code). Regarding to modules flink-fs-tests,
flink-yarn-tests and flink-tests, the dependencies introduced by the test
code should also be checked.
2) The checking rule is whether a module depends on scala trasitively or
depends on modules suffixed with `_{scala_version}`.
Following the above rules, we can get results you mentioned(Only 3 modules with
incorrect artifact id).
Open question:
Currently, all the test code are also released into the repository, such as
http://central.maven.org/maven2/org/apache/flink/flink-avro/1.8.0/flink-avro-1.8.0-tests.jar.
Users can also depend on these jars. My question is why we need to check the
test dependencies for modules flink-fs-tests, flink-yarn-tests and flink-tests,
but not check the test dependencies for other modules?
The solution:
If we follow the rule you mentioned, the change is as follows:
1) Correct the check logic for the script
2) Correct the artifact id for modules: flink-connector-hive,
flink-queryable-state-client-java
3) Add the scala dependencies for the module flink-table-api-scala due we plan
to add the scala code(I discussed with Timo and Aljoscha)
If we should check other test code for other modules, maybe we need more
changes. But it depends on the above open question.
> Correct the flink pom `artifactId` config and scala-free check logic
> --------------------------------------------------------------------
>
> Key: FLINK-12602
> URL: https://issues.apache.org/jira/browse/FLINK-12602
> Project: Flink
> Issue Type: Bug
> Components: Build System
> Affects Versions: 1.9.0
> Reporter: sunjincheng
> Priority: Major
>
> I find a shell issue in `verify_scala_suffixes.sh`(line 145) as follows:
> {code}
> grep "${module}_\d\+\.\d\+</artifactId>" "{}"
> {code}
> This code want to find out all modules that the module's `artifactId` with a
> `scala_binary_version` suffix.
> but the problem is our all `artifactId` value is in the pattern of
> `XXX_${scala.binary.version}`, such as:
> {code}
> <artifactId>flink-tests_${scala.binary.version}</artifactId>
> {code}
> then the result always empty, so this check did not take effect.
> I have already initiated a discussion of the issue. Please check the Mail
> thread here for details.
> http://mail-archives.apache.org/mod_mbox/flink-dev/201905.mbox/%3ccajsjtkw+8mcsc0fvneyaovl_ttrr_uuosx-tfgxj5gfqp1a...@mail.gmail.com%3E
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)