#7 ask user to open URL manually because of Bodhi bug
Closed 4 years ago by kparal. Opened 4 years ago by kparal.
Unknown source feature/cantpost  into  bodhi4

file modified
+29 -18
@@ -698,24 +698,35 @@

                                                self.options.fas_username):

                          print("!!! already commented by you !!!")

                      try:

-                         karma = self.raw_input(

-                             PROMPT, default=self.options.default_karma,

-                             add_to_history=False)

-                         if karma in ["-1", "0", "1"]:

-                             comment = self.raw_input(

-                                 "Comment> ",

-                                 default=self.options.default_comment)

-                             if comment or not self.options.skip_empty_comment:

-                                 result = self.send_comment(bc, update, comment,

-                                                            karma)

-                                 if not result[0]:

-                                     self.warning("Comment not submitted: %s" %

-                                                  result[1])

-                             else:

-                                 print("skipped because of empty comment")

-                         elif karma == "i":

-                             ignored_updates.append(update.title)

-                             print("ignored as requested")

+                         while True:

+                             karma = self.raw_input(

+                                 PROMPT, default=self.options.default_karma,

+                                 add_to_history=False)

+                             if karma in ["-1", "0", "1"]:

+                                 # Disable this temporarily

+                                 # See: https://pagure.io/fedora-easy-karma/issue/6

+                                 # See: https://github.com/fedora-infra/bodhi/issues/3298

+                                 print("Posting karma to Bodhi unfortunatelly doesn't "

+                                     "work at the moment due to a Bodhi bug. Until it "

+                                     "is resolved, please open the URL shown above "

+                                     "manually and add a comment through the website, "

+                                     "thank you.")

+                                 continue

+                                 comment = self.raw_input(

+                                     "Comment> ",

+                                     default=self.options.default_comment)

+                                 if comment or not self.options.skip_empty_comment:

+                                     result = self.send_comment(bc, update, comment,

+                                                                karma)

+                                     if not result[0]:

+                                         self.warning("Comment not submitted: %s" %

+                                                      result[1])

+                                 else:

+                                     print("skipped because of empty comment")

+                             elif karma == "i":

+                                 ignored_updates.append(update.title)

+                                 print("ignored as requested")

+                             break

  

                      except EOFError:

                          ignored_updates.extend(previously_ignored_updates)

Because of [1] we can't add a comment from f-e-k. Until it is resolved,
ask the user to open the URL manually. This is very suboptimal, but it's
still better than be completely broken - at least the user is able to
figure out which updates he/she can comment on.

[1] https://github.com/fedora-infra/bodhi/issues/3298

I believe we need to merge this ASAP and push an update in Fedora, so that testers can at least have an idea which updates to give feedback on. The full functionality will need to wait for a proper fix from Bodhi side.

Am 1=2E Juli 2019 16:34:16 MESZ schrieb "Kamil P=C3=A1ral" pagure@pagure= =2Eio:

kparal opened a new pull-request against the project:
fedora-easy-karma that you are following:
ask user to open URL manually because of Bodhi bug

To reply, visit the link below or just reply to this email
https://pagure=2Eio/fedora-easy-karma/pull-request/7

Thank you, is it possible to call the bodhi cli to submit the comment? Unf=
ortunately I cannot work on this currently=2E

Thank you, is it possible to call the bodhi cli to submit the comment?

I just tried it, it's broken as well:
https://github.com/fedora-infra/bodhi/issues/3298#issuecomment-508004364

To anyone affected - can you try to rename your ~/.fedora/openidbaseclient-sessions.cache file and see whether it fixes sending bodhi comments? If it realiably works for multiple people, perhaps we can remove this session cache every time we run f-e-k, as a workaround.

CC @frantisekz

Here's a clarification - commenting from f-e-k works, if you remove openidbaseclient-sessions.cache AND send a comment through bodhi updates comment command, to create a new cache. F-e-k either can't ask for password interactively, or fails to create a proper new cache. So this workaround is impractical, because not only we would need to delete the cache file, but also ask the user to run a specific command (or execute this command in the background instead of using the bodhi API). That's too much hassle, in my opinion, and it's better to just ask the user to use the web browser before the bug is fixed.

A rebased PR is available as #10.

Pull-Request has been closed by kparal

4 years ago
Metadata