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

[Feature]: Changes in the upstream facade functions should be reported well #793

Open
cderici opened this issue Jan 18, 2023 · 1 comment
Labels
wishlisted requested feature

Comments

@cderici
Copy link
Member

cderici commented Jan 18, 2023

Description

Right now pylibjuju doesn't have a good way of reporting that something has changed in the facade schema from juju. For instance, the in one of the nightly edge builds we see this error message:

________________ test_wait_for_idle_with_exact_units_scale_down ________________
[gw0] linux -- Python 3.10.9 /home/runner/work/python-libjuju/python-libjuju/.tox/py3/bin/python
Traceback (most recent call last):
  File "/home/runner/work/python-libjuju/python-libjuju/tests/integration/test_model.py", line 854, in test_wait_for_idle_with_exact_units_scale_down
    await app.destroy_units(*two_units_to_remove)
  File "/home/runner/work/python-libjuju/python-libjuju/juju/application.py", line 219, in destroy_unit
    return await self.model.destroy_units(*unit_names)
  File "/home/runner/work/python-libjuju/python-libjuju/juju/model.py", line 2120, in destroy_unit
    return await app_facade.DestroyUnits(unit_names=list(unit_names))
  File "/home/runner/work/python-libjuju/python-libjuju/juju/client/facade.py", line 481, in wrapper
    reply = await f(*args, **kwargs)
  File "/home/runner/work/python-libjuju/python-libjuju/juju/client/_client15.py", line 1266, in DestroyUnits
    reply = await self.rpc(msg)
  File "/home/runner/work/python-libjuju/python-libjuju/juju/client/facade.py", line 654, in rpc
    result = await self.connection.rpc(msg, encoder=TypeEncoder)
  File "/home/runner/work/python-libjuju/python-libjuju/juju/client/connection.py", line 638, in rpc
    raise errors.JujuAPIError(result)
juju.errors.JujuAPIError: no such request - method Application(15).DestroyUnits is not implemented

This needs to be caught early and more useful error needs to be raised.

Urgency

Casually wishlisting

Code I'd Like to Run

That whole mess above is trying to say that 


The function `DestroyUnits` from `Application` Facade `v15` that we have been using was removed from Juju API. 
The pylibjuju code needs to be adapted and the schema and the clients need to be updated.
@cderici cderici added the wishlisted requested feature label Jan 18, 2023
@github-actions
Copy link

This issue is marked as incomplete because it has been open 30 days with no activity. Please remove incomplete label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the incomplete old issue, check if it's still valid label Jul 24, 2023
@cderici cderici removed the incomplete old issue, check if it's still valid label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishlisted requested feature
Projects
None yet
Development

No branches or pull requests

1 participant