= bug description = It emits
16:06 < fedmsg-ask-stg> askbot.post.edit -- nirik suggested an answer to the question 'Does post_office work correctly now?' https://ask.fedoraproject.org/question/147/
The URL should be https://ask.stg....
= bug analysis = Could be a configuration thing, or a bug in the askbot fedmsg plugin. Not certain yet.
The bug is in this package:
https://github.com/fedora-infra/fedmsg_meta_fedora_infrastructure
If you grep in that package for "ask.fedoraproject" you'll find all the place that it is referenced.
All of the message types in that package produce the wrong link for staging. I'd be open to fixing it if someone wanted to take the time to go through and do it.
The package currently has 100% unit test coverage. So if we introduce code to handle staging links as well as production links, we would need to add test cases for all of those staging links as well.
Hi Ralph,
Thanks for the info. I'll try and look at it. I don't know if my python-fu is sufficient for the job, though. I'll let you know how it goes.
Thanks again,[[BR]] Warm regards,[[BR]] Ankur
Any news here? I think personally the 'fedmsg-stg' above tells me that it's staging and this isn't so important, but if so, feel free to work on it. ;)
This might be something someone new might want to look at. I am not sure how easy it will be, but marking it easyfix for new folks to look at at least.
Metadata Update from @kevin: - Issue tagged with: easyfix
May I take this?
I've ran on this repo grep -R ask.fedoraproject fedmsg_meta_fedora_infrastructure-develop And I got the following
fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/askbot.py: __link__ = "https://ask.fedoraproject.org" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/askbot.py: tmpl = "https://ask.fedoraproject.org/question/{pk}/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/fedoracollege.py: __link__ = "https://ask.fedoraproject.org" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: <https://ask.fedoraproject.org/questions>`_ changes tags. fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/2/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: <https://ask.fedoraproject.org/questions/>`_ question is updated. fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: question** to `Ask Fedora <https://ask.fedoraproject.org/questions/>`_. fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/3/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: an `Ask Fedora <https://ask.fedoraproject.org/questions/>`_ question. fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/1/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: <https://ask.fedoraproject.org/questions>`_ question or answer fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/2/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: <https://ask.fedoraproject.org/questions>`_ question or answer fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/2/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: `Ask Fedora <https://ask.fedoraproject.org/questions/>`_. fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/2/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: `Ask Fedora <https://ask.fedoraproject.org/questions/>`_. fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/3/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: <https://ask.fedoraproject.org/questions>`_. The example here is one fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/10/" fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: <https://ask.fedoraproject.org/questions>`_. The example here is one fedmsg_meta_fedora_infrastructure-develop/fedmsg_meta_fedora_infrastructure/tests/askbot.py: expected_link = "https://ask.fedoraproject.org/question/10/"
Should I replace in the repo ask.fedoraproject with ask.stg ?
I installed fedmsg on a VPS and published a question to ask.stg.fedora
[2017-04-07 07:59:19][ fedmsg INFO] {u'crypto': u'x509', u'i': 1, u'msg': {u'agent': u'metonymy', u'tags': [u'askfedora'], u'thread': {u'language_code': u'en', u'pk': 95, u'tagnames': [u'askfedora'], u'title': u'How do I ask a question?'}, u'timestamp': 1491551947.0, u'topmost_post_id': 237}, u'msg_id': u'2017-29232177-a6fe-40f1-a24a-16bc5c1c8a63', u'timestamp': 'Fri Apr 7 07:59:08 2017', u'topic': u'org.fedoraproject.stg.askbot.tag.update', u'username': u'apache'}
Now I need to figure how do print via askbot.py
Created a pull request https://github.com/fedora-infra/fedmsg_meta_fedora_infrastructure/pull/427
And it was merged in.
Excellent. Thanks much for working on this!
:thumbsup:
Metadata Update from @kevin: - Issue close_status updated to: Upstream - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.