You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/15 15:31:21 UTC

[GitHub] [flink] gaborgsomogyi opened a new pull request, #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

gaborgsomogyi opened a new pull request, #21515:
URL: https://github.com/apache/flink/pull/21515

   ## What is the purpose of the change
   
   Flink now throws exception in command line tools:
   ```
   $ flink
   ...
   java.lang.IllegalArgumentException: 1 > 0
   	at java.base/java.util.Arrays.copyOfRange(Arrays.java:3990)
   	at java.base/java.util.Arrays.copyOfRange(Arrays.java:3950)
   	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1170)
   ```
   In this PR I've fixed it.
   
   ## Brief change log
   
   Fixed the exception.
   
   ## Verifying this change
   
   * New unit test
   * Manually, build Flink and start `flink` command. The tool must print usage.
   
   ## 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gaborgsomogyi commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1353274190

   cc @gyfora 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gaborgsomogyi commented on a diff in pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on code in PR #21515:
URL: https://github.com/apache/flink/pull/21515#discussion_r1050881230


##########
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java:
##########
@@ -1149,6 +1150,11 @@ public int parseAndRun(String[] args) {
 
     /** Submits the job based on the arguments. */
     public static void main(final String[] args) {
+        System.exit(mainInternal(args));

Review Comment:
   Added.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gyfora merged pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gyfora merged PR #21515:
URL: https://github.com/apache/flink/pull/21515


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1353279627

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c247028cdd1b17ddf75bc471e8a7d8dc47a357ef",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c247028cdd1b17ddf75bc471e8a7d8dc47a357ef",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c247028cdd1b17ddf75bc471e8a7d8dc47a357ef UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gaborgsomogyi commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1354383325

   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gyfora commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gyfora commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1366773913

   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gyfora commented on a diff in pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gyfora commented on code in PR #21515:
URL: https://github.com/apache/flink/pull/21515#discussion_r1049796201


##########
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java:
##########
@@ -1149,6 +1150,11 @@ public int parseAndRun(String[] args) {
 
     /** Submits the job based on the arguments. */
     public static void main(final String[] args) {
+        System.exit(mainInternal(args));

Review Comment:
   We need to change this to
   ```
    int retCode = 31;
    try {
    retCode = mainInternal();
   } finallly{System.exit(retCode)}
   ```
   to preserve the original behavior I think.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gyfora commented on a diff in pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gyfora commented on code in PR #21515:
URL: https://github.com/apache/flink/pull/21515#discussion_r1049796201


##########
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java:
##########
@@ -1149,6 +1150,11 @@ public int parseAndRun(String[] args) {
 
     /** Submits the job based on the arguments. */
     public static void main(final String[] args) {
+        System.exit(mainInternal(args));

Review Comment:
   We need to change this to
   ```
    int retCode = 31;
    try {
    retCode = mainInternal();
   } finallly{System.exit(retCode)}
   
   to preserve the original behavior I think.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gaborgsomogyi commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1353417077

   Ci is dying again:
   ```
   [ERROR]   The project org.apache.flink:flink-connector-gcp-pubsub:1.17-SNAPSHOT (/home/vsts/work/1/s/flink-connectors/flink-connector-gcp-pubsub/pom.xml) has 4 errors
   [ERROR]     Non-resolvable import POM: Could not transfer artifact com.google.cloud:google-cloud-bom:pom:0.131.0 from/to google-maven-central (https://maven-central-eu.storage-download.googleapis.com/maven2/): Connect to maven-central-eu.storage-download.googleapis.com:443 [maven-central-eu.storage-download.googleapis.com/74.125.193.128] failed: Connection timed out (Connection timed out) @ com.google.cloud:libraries-bom:8.1.0, /home/vsts/work/1/.m2/repository/com/google/cloud/libraries-bom/8.1.0/libraries-bom-8.1.0.pom, line 196, column 19 -> [Help 2]
   [ERROR]     'dependencies.dependency.version' for com.google.cloud:google-cloud-core:jar is missing. @ org.apache.flink:flink-connector-gcp-pubsub:[unknown-version], /home/vsts/work/1/s/flink-connectors/flink-connector-gcp-pubsub/pom.xml, line 62, column 15
   [ERROR]     'dependencies.dependency.version' for com.google.cloud:google-cloud-pubsub:jar is missing. @ org.apache.flink:flink-connector-gcp-pubsub:[unknown-version], /home/vsts/work/1/s/flink-connectors/flink-connector-gcp-pubsub/pom.xml, line 68, column 15
   [ERROR]     'dependencies.dependency.version' for com.google.api.grpc:grpc-google-cloud-pubsub-v1:jar is missing. @ org.apache.flink:flink-connector-gcp-pubsub:[unknown-version], /home/vsts/work/1/s/flink-connectors/flink-connector-gcp-pubsub/pom.xml, line 74, column 15
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gaborgsomogyi commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1353417733

   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gaborgsomogyi commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gaborgsomogyi commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1354659669

   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] gyfora commented on pull request #21515: [FLINK-30429][client] Fix IllegalArgumentException when no argument in flink executable

Posted by GitBox <gi...@apache.org>.
gyfora commented on PR #21515:
URL: https://github.com/apache/flink/pull/21515#issuecomment-1366000815

   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org