[jira] [Commented] (CASSANDRA-15739) dtests fix due to cqlsh behavior change
[ https://issues.apache.org/jira/browse/CASSANDRA-15739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17089257#comment-17089257 ] Jacob Becker commented on CASSANDRA-15739: -- [~djoshi] wrote: > They're related to UTF8 handling and are Python 2/3 compatibility related Ah, when I was looking at these changes, I was really wondering how could they be related to CASSANDRA-15623 changes... I wish I would have read all the comments here first! > dtests fix due to cqlsh behavior change > --- > > Key: CASSANDRA-15739 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15739 > Project: Cassandra > Issue Type: Bug > Components: Tool/cqlsh >Reporter: Dinesh Joshi >Assignee: Dinesh Joshi >Priority: Normal > Fix For: 4.0-alpha > > Attachments: 15623-pipeline.png > > > dtests are failing due to a behavior change in cqlsh that was introduced as > part of 15623. This patch fixes the issue. > ||tests|| > |[cassandra|https://github.com/dineshjoshi/cassandra/tree/15623-fix-tests]| > |[cassandra-dtests|https://github.com/dineshjoshi/cassandra-dtest-1/tree/15623-fix-tests]| > |[utests > dtests|https://circleci.com/workflow-run/65ae49dd-e52f-4af0-b310-7e09f2c204ea]| > !15623-pipeline.png! -- 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] [Commented] (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=17088278#comment-17088278 ] Jacob Becker commented on CASSANDRA-15623: -- [~djoshi], it was my pleasure. > 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] [Commented] (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=17082812#comment-17082812 ] Jacob Becker commented on CASSANDRA-15623: -- [~djoshi], sure, no problem, here are the respective PRs: * [For cassandra-3.11|https://github.com/apache/cassandra/pull/467] * [For cassandra-3.0|https://github.com/apache/cassandra/pull/536] The first one is the original PR I have initially submitted (as it was based off cassandra-3.11), I just rebased off upstream to include the latest changes and changed the PR description. The second one is new. > 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: 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] [Commented] (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=17078949#comment-17078949 ] Jacob Becker commented on CASSANDRA-15623: -- [~djoshi], as per your suggestion, I have started a [dev list thread|https://www.mail-archive.com/dev@cassandra.apache.org/msg14851.html] to get the consensus on backporting. Regarding the regression test, I agree it is best to have one. However, due to being quite busy, I am not sure if I will be able to do it soon. Meanwhile, in case anyone else would be willing to do it, it is perfectly fine with me. > 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] [Commented] (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=17056615#comment-17056615 ] Jacob Becker commented on CASSANDRA-15623: -- [~djoshi], [~jrwest], no problem submitting against trunk. Since my local (i.e. source) branches were named after the target branches, to avoid any possible confusion, I have created a *new* dedicated PR against trunk: https://github.com/apache/cassandra/pull/468 Please do your review using the [new PR|https://github.com/apache/cassandra/pull/468]. In case changes are accepted, the [original PR|https://github.com/apache/cassandra/pull/467] can serve as a backport to 3.11. To explain myself, I had initially submitted against 3.11 because: * I have been testing against that version; * I had assumed it was OK to submit against 3.11 since it was actually a bug fix; I will keep the clarified workflow in mind, thanks. > 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] [Commented] (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=17056048#comment-17056048 ] Jacob Becker commented on CASSANDRA-15623: -- [~jrwest], thanks, renamed both PR and commit message. It would be nice if this information was initially available to contributors in item 6 of the [following list|http://cassandra.apache.org/doc/latest/development/patches.html#creating-a-patch], because I personally have a habit to prefix commit messages with a ticket number, but I initially tried to closely follow the recommendations. > 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
[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
[jira] [Commented] (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=17055709#comment-17055709 ] Jacob Becker commented on CASSANDRA-15623: -- BTW, to make reviewing a bit easier for you, I can additionally tell that the original condition was quite redundant in the first place: at the [following line|https://github.com/apache/cassandra/blob/b7146676f68c0e0431faa825cc8b70c06fe31090/bin/cqlsh.py#L2283] of the `read_options` function we check certain options to disable a TTY, then the [original condition|https://github.com/apache/cassandra/blob/b7146676f68c0e0431faa825cc8b70c06fe31090/bin/cqlsh.py#L2433] was doing the inverse to see if we are in a "batch mode". > 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
[jira] [Commented] (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 commented on CASSANDRA-15623: -- [~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
[jira] [Commented] (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=17054803#comment-17054803 ] Jacob Becker commented on CASSANDRA-15623: -- [~jrwest], after taking a look at the code, I would say yes, I will provide a patch. I believe I can manage within a few days. As for the exit code being 1 or 2, it is debatable indeed as, AFAIK, there is no (generic) specification in this regard. What is truly important is that it is not 0 (and it is not), so I wasn't sure if the subject is even worth a new ticket. I personally can live just fine with 2, I mentioned it only because, from my experience, anything above 1 usually has some underlying reason (ideally - explained in documentation); from what I can tell, there is no such reason in this case (especially considering the script *never* exits with 1) and no mention in the documentation. > 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
[jira] [Commented] (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=17053120#comment-17053120 ] Jacob Becker commented on CASSANDRA-15623: -- Also, while this might not be a very proper place to ask this, but I do not really get *why* is the exit code for script errors is 2? Usually 2 is for incorrect arguments or other command syntax errors... To avoid surprises, it would be nice if this "exit code" subject would be documented. > 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
[jira] [Created] (CASSANDRA-15623) When running CQLSH with STDIN input, exit with error status code if script fails
Jacob Becker created CASSANDRA-15623: Summary: 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 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