[jira] [Comment Edited] (CASSANDRA-15623) When running CQLSH with STDIN input, exit with error status code if script fails
[ https://issues.apache.org/jira/browse/CASSANDRA-15623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17087004#comment-17087004 ] Michael Semb Wever edited comment on CASSANDRA-15623 at 4/19/20, 1:34 PM: -- [~djoshi], [~jrwest], looks like this broke ~25 cqlsh tests. - 3.0: https://ci-cassandra.apache.org/view/branches/job/Cassandra-3.0/16/testReport/ - 3.11: https://ci-cassandra.apache.org/view/Cassandra%203.11/job/Cassandra-3.11/20/testReport/ - 4.0: https://ci-cassandra.apache.org/view/Cassandra%204.0/job/Cassandra-trunk/84/testReport/ Where were the CI runs before this was committed? was (Author: michaelsembwever): [~djoshi], [~jrwest], looks like this broke ~25 cqlsh tests. That's nearly half of the cqlsh tests. - 3.0: https://ci-cassandra.apache.org/view/branches/job/Cassandra-3.0/16/testReport/ - 3.11: https://ci-cassandra.apache.org/view/Cassandra%203.11/job/Cassandra-3.11/20/testReport/ - 4.0: https://ci-cassandra.apache.org/view/Cassandra%204.0/job/Cassandra-trunk/84/testReport/ Where were the CI runs before this was committed? > When running CQLSH with STDIN input, exit with error status code if script > fails > > > Key: CASSANDRA-15623 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15623 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools >Reporter: Jacob Becker >Assignee: Jacob Becker >Priority: Normal > Labels: pull-request-available > Fix For: 3.0.21, 3.11.7, 4.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Assuming CASSANDRA-6344 is in place for years and considering that scripts > submitted with the `-e` option behave in a similar fashion, it is very > surprising that scripts submitted to STDIN (i.e. piped in) always exit with a > zero code, regardless of errors. I believe this should be fixed. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-15623) When running CQLSH with STDIN input, exit with error status code if script fails
[ https://issues.apache.org/jira/browse/CASSANDRA-15623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17086308#comment-17086308 ] Dinesh Joshi edited comment on CASSANDRA-15623 at 4/18/20, 5:31 AM: Committed to 3.0, 3.11 and 4.0. Thanks for the patch [~plastikat]! was (Author: djoshi3): Committed. Thanks for the patch [~plastikat]! > When running CQLSH with STDIN input, exit with error status code if script > fails > > > Key: CASSANDRA-15623 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15623 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools >Reporter: Jacob Becker >Assignee: Jacob Becker >Priority: Normal > Labels: pull-request-available > Fix For: 3.0.21, 3.11.7, 4.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Assuming CASSANDRA-6344 is in place for years and considering that scripts > submitted with the `-e` option behave in a similar fashion, it is very > surprising that scripts submitted to STDIN (i.e. piped in) always exit with a > zero code, regardless of errors. I believe this should be fixed. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-15623) When running CQLSH with STDIN input, exit with error status code if script fails
[ https://issues.apache.org/jira/browse/CASSANDRA-15623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17077599#comment-17077599 ] Dinesh Joshi edited comment on CASSANDRA-15623 at 4/7/20, 9:53 PM: --- [~plastikat] it would also be preferable to add a test that will spot this regression. Could you please add one? [~jrwest] do we need to fix the other bug in this ticket or could I go ahead and commit this? was (Author: djoshi3): [~jrwest] do we need to fix the other bug in this ticket or could I go ahead and commit this? > When running CQLSH with STDIN input, exit with error status code if script > fails > > > Key: CASSANDRA-15623 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15623 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools >Reporter: Jacob Becker >Assignee: Jacob Becker >Priority: Normal > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > Assuming CASSANDRA-6344 is in place for years and considering that scripts > submitted with the `-e` option behave in a similar fashion, it is very > surprising that scripts submitted to STDIN (i.e. piped in) always exit with a > zero code, regardless of errors. I believe this should be fixed. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-15623) When running CQLSH with STDIN input, exit with error status code if script fails
[ https://issues.apache.org/jira/browse/CASSANDRA-15623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17076628#comment-17076628 ] Jordan West edited comment on CASSANDRA-15623 at 4/6/20, 8:15 PM: -- [~plastikat] thanks for reworking the patch for trunk. The changes LGTM. I verified the new behavior works as expected and the old behavior remains unchanged: {code} Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo 'select * from foo;' | ./bin/cqlsh :2:InvalidRequest: Error from server: code=2200 [Invalid query] message="No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename" Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo 'select * from;' | ./bin/cqlsh :2:SyntaxException: line 1:13 no viable alternative at input ';' (select * from[;]) Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ ./bin/cqlsh -e 'select;' :1:SyntaxException: line 1:6 no viable alternative at input ';' (select[;]) Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ ./bin/cqlsh -f testcql testcql:2:SyntaxException: line 1:6 no viable alternative at input ';' (select[;]) Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 {code} I did however notice a new bug that also exists on trunk (unrelated to this change) while testing. More to come on that. was (Author: jrwest): [~plastikat] thanks for reworking the patch for trunk. The changes LGTM. I verified the new behavior works as expected and the old behavior remains unchanged: ``` Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo 'select * from foo;' | ./bin/cqlsh :2:InvalidRequest: Error from server: code=2200 [Invalid query] message="No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename" Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo 'select * from;' | ./bin/cqlsh :2:SyntaxException: line 1:13 no viable alternative at input ';' (select * from[;]) Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ ./bin/cqlsh -e 'select;' :1:SyntaxException: line 1:6 no viable alternative at input ';' (select[;]) Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ ./bin/cqlsh -f testcql testcql:2:SyntaxException: line 1:6 no viable alternative at input ';' (select[;]) Jordans-MacBook-Pro-2:cassandra-15623-review jordanwest$ echo $? 2 ``` I did however notice a new bug that also exists on trunk (unrelated to this change) while testing. More to come on that. > When running CQLSH with STDIN input, exit with error status code if script > fails > > > Key: CASSANDRA-15623 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15623 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools >Reporter: Jacob Becker >Assignee: Jacob Becker >Priority: Normal > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > Assuming CASSANDRA-6344 is in place for years and considering that scripts > submitted with the `-e` option behave in a similar fashion, it is very > surprising that scripts submitted to STDIN (i.e. piped in) always exit with a > zero code, regardless of errors. I believe this should be fixed. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-15623) When running CQLSH with STDIN input, exit with error status code if script fails
[ https://issues.apache.org/jira/browse/CASSANDRA-15623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17056175#comment-17056175 ] Dinesh Joshi edited comment on CASSANDRA-15623 at 3/10/20, 5:42 PM: [~plastikat] thanks for your patch. I can take a look at it this week. BTW, I see you've submitted a patch against 3.11. 3.11 is in bugfix only mode so your patch should be against trunk. was (Author: djoshi3): [~plastikat] thanks for your patch. I can take a look at it this week. > When running CQLSH with STDIN input, exit with error status code if script > fails > > > Key: CASSANDRA-15623 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15623 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools >Reporter: Jacob Becker >Assignee: Jacob Becker >Priority: Normal > > Assuming CASSANDRA-6344 is in place for years and considering that scripts > submitted with the `-e` option behave in a similar fashion, it is very > surprising that scripts submitted to STDIN (i.e. piped in) always exit with a > zero code, regardless of errors. I believe this should be fixed. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-15623) When running CQLSH with STDIN input, exit with error status code if script fails
[ https://issues.apache.org/jira/browse/CASSANDRA-15623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17055687#comment-17055687 ] Jacob Becker edited comment on CASSANDRA-15623 at 3/10/20, 3:06 PM: [~jrwest], as discussed, here comes the patch: https://github.com/apache/cassandra/pull/467 I assume you do not do any (direct) merges at GitHub, but at least to be clear on the target branch, I think an MR there is still useful. In case you are fine with the changes, I guess I could *port* the fix to other branches (simply merging will not do. files are too different, even for neighboring branches) and create the respective PRs, though in this case I would expect you to tell me a list of branches you would like to port to. was (Author: plastikat): [~jrwest], as discussed, here comes the patch: https://github.com/apache/cassandra/pull/467 I assume you do not do any (direct) merges at GitHub, but at least to be clear on the target branch, I think an MR there is still useful. In case you are fine with the changes, I guess I could *port* the fix to other branches (simply merging will not do. files are too different, even for neighboring branches) and create the respective MRs, though in this case I would expect you to tell me a list of branches you would like to port to. > When running CQLSH with STDIN input, exit with error status code if script > fails > > > Key: CASSANDRA-15623 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15623 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools >Reporter: Jacob Becker >Priority: Normal > > Assuming CASSANDRA-6344 is in place for years and considering that scripts > submitted with the `-e` option behave in a similar fashion, it is very > surprising that scripts submitted to STDIN (i.e. piped in) always exit with a > zero code, regardless of errors. I believe this should be fixed. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org