Skip to content

Commit 2cd8240

Browse files
authored
Use official taskcluster config (#292)
1 parent e6bf2ca commit 2cd8240

File tree

7 files changed

+7
-126
lines changed

7 files changed

+7
-126
lines changed

backend/code_coverage_backend/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# This Source Code Form is subject to the terms of the Mozilla Public
33
# License, v. 2.0. If a copy of the MPL was not distributed with this
44
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5-
from code_coverage_tools.taskcluster import TaskclusterConfig
5+
from taskcluster.helper import TaskclusterConfig
66

7-
taskcluster = TaskclusterConfig()
7+
taskcluster = TaskclusterConfig("https://firefox-ci-tc.services.mozilla.com")

backend/code_coverage_backend/backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def create_app():
2020
taskcluster.auth()
2121
taskcluster.load_secrets(
2222
os.environ.get("TASKCLUSTER_SECRET"),
23-
code_coverage_backend.config.PROJECT_NAME,
23+
prefixes=["common", "backend", "code-coverage-backend"],
2424
required=["GOOGLE_CLOUD_STORAGE", "APP_CHANNEL"],
2525
existing={"REDIS_URL": os.environ.get("REDIS_URL", "redis://localhost:6379")},
2626
)

bot/code_coverage_bot/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# License, v. 2.0. If a copy of the MPL was not distributed with this
44
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
55

6-
PROJECT_NAME = "code-coverage-bot"
76
HG_BASE = "https://hg.mozilla.org/"
87
MOZILLA_CENTRAL_REPOSITORY = "{}mozilla-central".format(HG_BASE)
98
TRY_REPOSITORY = "{}try".format(HG_BASE)

bot/code_coverage_bot/secrets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# License, v. 2.0. If a copy of the MPL was not distributed with this
44
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
55

6-
from code_coverage_bot import config
76
from code_coverage_bot.taskcluster import taskcluster_config
87

98

@@ -19,7 +18,7 @@ class Secrets(dict):
1918
def load(self, taskcluster_secret):
2019
taskcluster_config.load_secrets(
2120
taskcluster_secret,
22-
config.PROJECT_NAME,
21+
prefixes=["common", "code-coverage-bot"],
2322
required=[
2423
Secrets.APP_CHANNEL,
2524
Secrets.BACKEND_HOST,

bot/code_coverage_bot/taskcluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
import requests
88
import structlog
99
import taskcluster
10+
from taskcluster.helper import TaskclusterConfig
1011

1112
from code_coverage_bot.utils import retry
12-
from code_coverage_tools.taskcluster import TaskclusterConfig
1313

1414
logger = structlog.getLogger(__name__)
15-
taskcluster_config = TaskclusterConfig()
15+
taskcluster_config = TaskclusterConfig("https://firefox-ci-tc.services.mozilla.com")
1616

1717

1818
def get_task(branch, revision, platform):

tools/code_coverage_tools/taskcluster.py

Lines changed: 0 additions & 117 deletions
This file was deleted.

tools/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
logbook
22
structlog
3-
taskcluster
3+
taskcluster==24.0.0
44
raven
55

66
# limit async-timeout version to avoid using the alpha 4.0.0a0

0 commit comments

Comments
 (0)