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

!st2 list executions is broken in chatops after API changes #3606

Closed
lakshmi-kannan opened this Issue Jul 25, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@lakshmi-kannan
Contributor

lakshmi-kannan commented Jul 25, 2017

While working on chatops changes, I found out that the "!st2 list executions" is broken.

st2.actions.python.St2ExecutionsListAction: DEBUG    Calling client method "query" with kwargs "{'limit': 10}"
Traceback (most recent call last):
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 259, in <module>
    obj.run()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 155, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/st2/actions/executions_list.py", line 40, in run
    format_func=format_result)
  File "/opt/stackstorm/packs/st2/actions/lib/action.py", line 103, in _run_client_method
    result = format_func(result, **format_kwargs or {})
  File "/opt/stackstorm/packs/st2/actions/executions_list.py", line 18, in format_result
    return format_client_list_result(result=result, exclude_attributes=EXCLUDE_ATTRIBUTES)
  File "/opt/stackstorm/packs/st2/actions/lib/formatters.py", line 13, in format_client_list_result
    value = item.to_dict(exclude_attributes=exclude_attributes)
AttributeError: 'list' object has no attribute 'to_dict'

From the traceback etc, it looks like our API changes might have broken it. Also, looking at the code, for whatever reason we are querying LiveAction as opposed to Execution. There is too much going on to debug this as part of chatops changes.

@Kami

This comment has been minimized.

Member

Kami commented Jul 25, 2017

I assume the fix will go into v2.3.3 / v2.4.0 since v2.3.2 process is already rolling?

That is if it requires st2 fix and not just a pack fix / change.

@Kami

This comment has been minimized.

Member

Kami commented Jul 25, 2017

I believe the CLI "print note if there are more results" change broke it because query method now return a tuple and previously it just returned a result.

I'm looking into a fix.

@Kami

This comment has been minimized.

Member

Kami commented Jul 25, 2017

@Kami Kami self-assigned this Jul 25, 2017

@lakshmi-kannan

This comment has been minimized.

Contributor

lakshmi-kannan commented Aug 1, 2017

There is also this #3616.

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