Commit 3b7027b
committed
Work around GitHub API changes ("timeouts" waiting for workflows)
When GitGitGadget triggers a workflow, it wants to verify that said
workflow actually got started. Since the GitHub API to dispatch a
`workflow_dispatch` does not wait until the workflow has been created,
we are left with the unfortunate option to poll for the created
workflow.
To make this a little less painful, we list only the workflow runs
that have been started after the workflow dispatch has been dispatched.
This condition uses the operator `=>`. That used to work fine for many,
many years. The `=>` operator (where the equal sign comes _before_ the
greater-than sign) might not be canonical in C or JavaScript programs,
but that's what the documentation recommended to use, so use it we did.
However, recently we got a lot of errors in the server logs (not shown
to the user). They basically say that a 30 second timeout waiting for
the workflows to start has not been enough, and so it "timed out waiting
for the workflow". The real reason for the "timeout" was, of course,
that it did not find _any_ workflows. The list of workflow runs was
empty. Because GitHub no longer recognizes that form of the operator.
I'm unaware of any communication about this change, so it caught me by
surprise. Whatever the reason or absence of a heads-up: My tests show
that the GitHub API no longer accepts `=>` as the "greater or equal"
operator. Who knows what this construct is now interpreted as, the short
version is: What used to work no longer does.
In my tests, the operator `>=` _does_ actually work. So let's just
use that and move on, and immediately forget about this sad chapter in
GitGitGadget's life story.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 43da0f3 commit 3b7027b
File tree
2 files changed
+2
-2
lines changed- GitGitGadget
- __tests__
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments