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

ascli aoc intermittent issues when browsing or uploading #148

Open
prosergi opened this issue Jul 29, 2024 · 3 comments
Open

ascli aoc intermittent issues when browsing or uploading #148

prosergi opened this issue Jul 29, 2024 · 3 comments
Assignees

Comments

@prosergi
Copy link

prosergi commented Jul 29, 2024

Customer is complaining to have intermittent issues with ascli aoc on support case TS016745972.

Customer already tried with different ascli versions including version 4.18 including upload or browse.

It’s possible customer can use read_timeout option to avoid intermittence:

ascli aoc admin res package list --http-options=@json:‘{“read_timeout”:10.0}’

Last error reported:

Logs of support case:

D, [2024-07-26T19:28:42.740977 #3293] DEBUG -- : add_cmd_line_options:commands/arguments=["aoc", "files", "browse", "/int10/int10-data/dev-wads"],options=["--log-level=debug"]

D, [2024-07-26T19:28:44.116400 #3293] DEBUG -- : send request (retries=0)
D, [2024-07-26T19:28:44.116643 #3293] DEBUG -- : ignore cert? ["ats-aws-us-west-2", 443] -> false
D, [2024-07-26T19:28:44.525742 #3293] DEBUG -- : result: code=200 mime=application/json
D, [2024-07-26T19:28:44.526096 #3293] DEBUG -- : data (json)=
[
  {
    "id": "1",
    "name": "folder10",
    "type": "link",
    "modified_time": null,
    "access_levels": [
      "list",
      "read",
      "write",
      "delete",
      "mkdir",
      "rename",
      "preview"
    ],
    "access_level": "edit"
  },
  {
    "id": "5",
    "name": "test10",
    "type": "link",
    "modified_time": null,
    "access_levels": [
      "list",
      "read",
      "write",
      "delete",
      "mkdir",
      "rename",
      "preview"
    ],
    "access_level": "edit"
  }
]
D, [2024-07-26T19:28:44.526435 #3293] DEBUG -- : raise_on_error GET //files/21/files 200
D, [2024-07-26T19:28:44.526781 #3293] DEBUG -- : result={:http=>#<Net::HTTPOK 200 OK readbody=true>, :data=>[{"id"=>"1", "name"=>"folder10", "type"=>"link", "modified_time"=>nil, "access_levels"=>["list", "read", "write", "delete", "mkdir", "rename", "preview"], "access_level"=>"edit"}, {"id"=>"5", "name"=>"test10", "type"=>"link", "modified_time"=>nil, "access_levels"=>["list", "read", "write", "delete", "mkdir", "rename", "preview"], "access_level"=>"edit"}]}
D, [2024-07-26T19:28:44.527072 #3293] DEBUG -- : folder_contents (json)=
[
  {
    "id": "1",
    "name": "test10",
    "type": "link",
    "modified_time": null,
    "access_levels": [
      "list",
      "read",
      "write",
      "delete",
      "mkdir",
      "rename",
      "preview"
    ],
    "access_level": "edit"
  },
  {
    "id": "5",
    "name": "test10",
    "type": "link",
    "modified_time": null,
    "access_levels": [
      "list",
      "read",
      "write",
      "delete",
      "mkdir",
      "rename",
      "preview"
    ],
    "access_level": "edit"
  }
]
D, [2024-07-26T19:28:44.527342 #3293] DEBUG -- : process_folder_tree checking /folder10
D, [2024-07-26T19:28:44.527528 #3293] DEBUG -- : process_folder_tree checking /test10
ERROR: Other(Aspera::AssertError): assertion failed: expecting String, but have nil: /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/node.rb:160:in `node_id_to_node'
/usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/assert.rb:18:in `assert': assertion failed: expecting String, but have nil: /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/node.rb:160:in `node_id_to_node' (Aspera::AssertError)
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/assert.rb:25:in `assert_type'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/aoc.rb:306:in `node_api_from'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/node.rb:160:in `node_id_to_node'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/node.rb:203:in `block in process_folder_tree'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/node.rb:193:in `each'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/node.rb:193:in `process_folder_tree'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/api/node.rb:223:in `resolve_api_fid'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/cli/plugins/node.rb:484:in `execute_command_gen4'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/cli/plugins/aoc.rb:317:in `execute_nodegen4_command'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/cli/plugins/aoc.rb:759:in `execute_action'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/lib/aspera/cli/main.rb:300:in `process_command_line'
	from /usr/local/bundle/gems/aspera-cli-4.18.0/bin/ascli:24:in `<top (required)>'
	from /usr/local/bundle/bin/ascli:25:in `load'
	from /usr/local/bundle/bin/ascli:25:in `<main>'
Workspace: redacted
@laurent-martin
Copy link
Member

The problem is that when a folder entry returns a type link , it shall also return keys: target_node_id and target_id, but some some reason here, the node api does not include this information.
ascli cannot invent this.

@laurent-martin laurent-martin self-assigned this Jul 29, 2024
@laurent-martin laurent-martin added the customer request Request from end users label Jul 29, 2024
laurent-martin added a commit that referenced this issue Jul 29, 2024
@laurent-martin
Copy link
Member

I have put some additional logic: if the folder listing does not include link information, then link information is read specifically, (but if second time fails, then it fails for good).
Beta here: https://ibm.biz/aspera-cli-beta

@laurent-martin
Copy link
Member

Release 4.18.1 includes the fix.
I could not test it though.

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

No branches or pull requests

2 participants