#2598 Fix showing PR when the source is gone and related changes
Merged by pingou. Opened by pingou.
fix_diff_refs  into  master

Download 2598.patch

The commits in this PR can be reviewed one by one, just beware that
the tests for 3c8b0959ad97900dacc12eaa3cb290e1f4b51311 are in fact
in ff9832170c80bc788b632221bfe74333c8856a1c.

If reviewer desires, I can adjust the order of the commits.

Perhaps a log statement would be more appropriate here.

What if commitid is not assigned due to a KeyError? Doesn't the rest of the code assumes it is set?

it's not even needed, let me just remove this

from my tests, you're right we should raise an exception here

2 new commits added

  • Raise an exception if no commit hash was found
  • Drop un-necessary print statement

Is there no programmatic way to determine if the worker completed the task?

There would be if we knew the task id but we don't here :(

Okay, in the setUp function, could you have a while loop that sleeps until the conditions you expect after the worker is done are present? If there is a particular thing you are waiting for, you could check if that is present before continuing on to the tests.

The sleep statement just seems fragile and if other systems that run these tests are slower than yours, I'm worried about tests failing and the developer not knowing why.

1 new commit added

  • Make the tests more robust using a while loop

8 new commits added

  • Make the tests more robust using a while loop
  • Raise an exception if no commit hash was found
  • Drop un-necessary print statement
  • Fix the check, requests always have a status but it's not always open
  • Create the reference directly when the PR is created
  • Couple of fixes in the in-code documentation
  • Drop doubled call to tasks.sync_pull_ref.delay()
  • Allow viewing a PR when its origin (fork or branch) is gone

8 new commits added

  • Make the tests more robust using a while loop
  • Raise an exception if no commit hash was found
  • Drop un-necessary print statement
  • Fix the check, requests always have a status but it's not always open
  • Create the reference directly when the PR is created
  • Couple of fixes in the in-code documentation
  • Drop doubled call to tasks.sync_pull_ref.delay()
  • Allow viewing a PR when its origin (fork or branch) is gone

+1 from me

1 new commit added

  • Fix the test suite

9 new commits added

  • Fix the test suite
  • Make the tests more robust using a while loop
  • Raise an exception if no commit hash was found
  • Drop un-necessary print statement
  • Fix the check, requests always have a status but it's not always open
  • Create the reference directly when the PR is created
  • Couple of fixes in the in-code documentation
  • Drop doubled call to tasks.sync_pull_ref.delay()
  • Allow viewing a PR when its origin (fork or branch) is gone

Thanks for your review! :)

Pull-Request has been merged by pingou

Metadata