Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--max option does not work to return all records #440

Open
stevekm opened this issue Jul 29, 2024 · 1 comment
Open

--max option does not work to return all records #440

stevekm opened this issue Jul 29, 2024 · 1 comment

Comments

@stevekm
Copy link

stevekm commented Jul 29, 2024

I want to return all the items from a query with tw, for example;

tw runs view --id 12345 --workspace 67890 tasks -c container --max 1000000000

In this case I set the --max value to some absurdly high value in order to retrieve all of the items (in this case, Run task entries).

however it gives the error;

 ERROR: Workflow tasks length parameter cannot be greater than 100 (current value=1000000000)

I have seen the same behavior in other tw commands.

It seems to be related to this;

So now if we want to allow a --no-max flag we need to implement the pagination at CLI side doing the multiple requests. This will take some time, so for the next release 0.6 I'm just going to remove the --no-max option because it is not working as expected. And I'm going to leave this issue open to support pagination at CLI side in a near future.

Originally posted by @jordeu in #220 (comment)

In fact, "--no-max" is the exact functionality I want, I want all of the records returned in a single result. And I do want the pagination to be resolved completely by tw.

This is especially difficult to deal with because, as far as I can tell , you cannot even see how many pages there are for a single query, or how many total records exist, in order to even do the pagination-navigation yourself. Unless I missed something? If so, please let me know.

Regardless, ultimately the --max arg should work the way it is described (returning the given number of max total records), and you should be able to use a single tw command to return all records from the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant