#10 ask user to open URL manually because of Bodhi bug
Closed 3 years ago by frantisekz. Opened 4 years ago by kparal.

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)

This a clone of #7, because I removed my fork and the diff got wiped out. This is now rebased to current master.


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

Just to make sure everybody who finds this ticket is aware:

  • the linked bodhi issue should now be fixed,
  • I started to write "fedora-update-feedback" from scratch, using my rust bindings for the bodhi REST API, which already provides working update commenting and karma submissions today. once another bodhi bug is fixed, it will also allow submitting additional bug and testcase feedback karma.

the linked bodhi issue should now be fixed,

Is the fix deployed yet?

Hm. Looking at bodhi on GitHub, the commit isn't part of what's tagged 5.1.1 ... Also 5.1.1 is not deployed yet anyway :frowning: So I don't think the fix is live yet, unless it's included as a hotfix. Sorry for the false alarm.

I poked the upstream issue and asked abompard to actually deploy the fix :/ If that doesn't happen soon, I can probably actually work around the bug in the python-fedora library (probably in the downstream packages rather than upstream) until it is, so we can still sort this out ourselves if necessary.

Bodhi 5.2.1 has been deployed. We should figure out whether it contains the fix.

Bodhi 5.2.1 has been deployed. We should figure out whether it contains the fix.

Looks like it does [0]. Both according to git and real experience.

[0] https://github.com/fedora-infra/bodhi/commit/fc7b39f67e750e7cc7767c897951763c1f5b6d0b (see tags in the commit)

Pull-Request has been closed by frantisekz

3 years ago
Metadata