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

Need document for changes of BaseAddon.post_update method #4896

Closed
1 task done
exzhawk opened this issue Nov 22, 2020 · 3 comments
Closed
1 task done

Need document for changes of BaseAddon.post_update method #4896

exzhawk opened this issue Nov 22, 2020 · 3 comments
Assignees
Labels
documentation Improvements or additions to the documentation.
Milestone

Comments

@exzhawk
Copy link
Contributor

exzhawk commented Nov 22, 2020

Describe the issue

BaseAddon.post_update method signature was changed by adding a skip_push param, but this change is not revealed in the documents.
Related commit: 11652c1

Could you please add a notice in version specific instructions to avoid addon outage? Thank you!

I already tried

Describe the steps you tried to solve the problem yourself.

  • I've read and searched the docs and did not find the answer there.
    If you didn’t try already, try to search there what you wrote above.

To Reproduce

Steps to reproduce the behavior:

  1. Write an addon and enable it in weblate 4.3.1
class MyAddon(BaseAddon):
    def post_update(self, main_component, previous_head):
        pass
  1. Upgrade site to weblate 4.3.2

Expected behavior

The addon works as expected

Screenshots

If applicable, add screenshots to help explain your problem.

Server configuration and status

docker-compose exec weblate weblate list_versions
 * Weblate: 4.3.2                 

Weblate deploy checks

Exception traceback

weblate_1   | uwsgi stderr | [2020-11-22 21:54:47,855: ERROR/19733] Internal Server Error: /addons/project/component/                                                                                           
weblate_1   | uwsgi stderr | Traceback (most recent call last):                                                                                                                                                                         
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/exception.py", line 47, in inner                                                                                                       
weblate_1   | uwsgi stderr |     response = get_response(request)                                                                                                                                                                       
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 179, in _get_response                                                                                                   
weblate_1   | uwsgi stderr |     response = wrapped_callback(request, *callback_args, **callback_kwargs)                                                                                                                                
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback                                                                              
weblate_1   | uwsgi stderr |     return callback(request, *args, **kwargs)                                                                                                                                                              
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/django/views/generic/base.py", line 70, in view                                                                                                             
weblate_1   | uwsgi stderr |     return self.dispatch(request, *args, **kwargs)                                                                                                                                                         
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/django/views/generic/base.py", line 98, in dispatch                                                                                                         
weblate_1   | uwsgi stderr |     return handler(request, *args, **kwargs)                                                                                                                                                               
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/weblate/addons/views.py", line 88, in post                                                                                                                  
weblate_1   | uwsgi stderr |     addon.create(component)                                                                                                                                                                                
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/weblate/addons/base.py", line 108, in create                                                                                                                
weblate_1   | uwsgi stderr |     result.post_configure()                                                                                                                                                                                
weblate_1   | uwsgi stderr |   File "/usr/local/lib/python3.7/dist-packages/weblate/addons/base.py", line 157, in post_configure                                                                                                        
weblate_1   | uwsgi stderr |     self.post_update(component, "", False)                                                                                                                                                                 
weblate_1   | uwsgi stderr | TypeError: post_update() takes 3 positional arguments but 4 were given                                                                                                                                     

Additional context

@exzhawk exzhawk added the question This is more a question for the support than an issue. label Nov 22, 2020
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!

@nijel
Copy link
Member

nijel commented Nov 22, 2020

Sorry, as there is currently no documentation on addons API, I didn't realize this needs to be documented...

@nijel nijel added documentation Improvements or additions to the documentation. and removed question This is more a question for the support than an issue. labels Nov 22, 2020
@nijel nijel added this to the 4.4 milestone Nov 22, 2020
@nijel nijel self-assigned this Nov 22, 2020
nijel added a commit that referenced this issue Nov 22, 2020
@nijel nijel closed this as completed in 9b34cd2 Nov 22, 2020
@github-actions
Copy link

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

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

No branches or pull requests

2 participants