Revert "don't block CI on github status updates"
This reverts commit 0bb55aaa8dfe98dc81c993d647ba814ebd9df260.
This commit is contained in:
parent
f0f934bf11
commit
1153510b04
|
@ -17,14 +17,17 @@ from buildbot.www.auth import AuthBase
|
||||||
from buildbot.www.avatar import AvatarBase, AvatarGitHub
|
from buildbot.www.avatar import AvatarBase, AvatarGitHub
|
||||||
from buildbot.www.oauth2 import GitHubAuth
|
from buildbot.www.oauth2 import GitHubAuth
|
||||||
from twisted.internet import defer, threads
|
from twisted.internet import defer, threads
|
||||||
from twisted.internet.defer import ensureDeferred
|
|
||||||
from twisted.python import log
|
from twisted.python import log
|
||||||
from twisted.python.failure import Failure
|
from twisted.python.failure import Failure
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from buildbot.process.log import StreamLog
|
from buildbot.process.log import StreamLog
|
||||||
|
|
||||||
from .common import http_request, paginated_github_request, slugify_project_name
|
from .common import (
|
||||||
|
http_request,
|
||||||
|
paginated_github_request,
|
||||||
|
slugify_project_name,
|
||||||
|
)
|
||||||
from .projects import GitBackend, GitProject
|
from .projects import GitBackend, GitProject
|
||||||
from .secrets import read_secret_file
|
from .secrets import read_secret_file
|
||||||
|
|
||||||
|
@ -78,15 +81,6 @@ class GithubConfig:
|
||||||
return read_secret_file(self.token_secret_name)
|
return read_secret_file(self.token_secret_name)
|
||||||
|
|
||||||
|
|
||||||
class AsyncGitHubStatusPush(GitHubStatusPush):
|
|
||||||
@defer.inlineCallbacks
|
|
||||||
def sendMessage( # noqa: N802
|
|
||||||
self, reports: list[dict[str, Any]]
|
|
||||||
) -> Generator[Any, object, Any]:
|
|
||||||
# Don't block the CI on the GitHub status updates
|
|
||||||
yield ensureDeferred(super().sendMessage(reports))
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class GithubBackend(GitBackend):
|
class GithubBackend(GitBackend):
|
||||||
config: GithubConfig
|
config: GithubConfig
|
||||||
|
@ -109,7 +103,7 @@ class GithubBackend(GitBackend):
|
||||||
)
|
)
|
||||||
|
|
||||||
def create_reporter(self) -> ReporterBase:
|
def create_reporter(self) -> ReporterBase:
|
||||||
return AsyncGitHubStatusPush(
|
return GitHubStatusPush(
|
||||||
token=self.config.token(),
|
token=self.config.token(),
|
||||||
# Since we dynamically create build steps,
|
# Since we dynamically create build steps,
|
||||||
# we use `virtual_builder_name` in the webinterface
|
# we use `virtual_builder_name` in the webinterface
|
||||||
|
|
Loading…
Reference in a new issue