зеркало из https://github.com/mozilla/bugbug.git
Update all index URLs, removing the 'relman' string
Follow-up to 0ec86af61b
This commit is contained in:
Родитель
032fa4d30f
Коммит
c3c002002e
|
@ -16,7 +16,7 @@ from bugbug import db, utils
|
|||
BUGS_DB = "data/bugs.json"
|
||||
db.register(
|
||||
BUGS_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_bugs.latest/artifacts/public/bugs.json.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_bugs.latest/artifacts/public/bugs.json.zst",
|
||||
6,
|
||||
)
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ COMMITS_DB = "data/commits.json"
|
|||
COMMIT_EXPERIENCES_DB = "commit_experiences.lmdb.tar.zst"
|
||||
db.register(
|
||||
COMMITS_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/commits.json.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/commits.json.zst",
|
||||
14,
|
||||
[COMMIT_EXPERIENCES_DB],
|
||||
)
|
||||
|
|
|
@ -64,7 +64,7 @@ REPORTERS_TO_IGNORE = {"intermittent-bug-filer@mozilla.bugs", "wptsync@mozilla.b
|
|||
|
||||
def download_similarity_model(model_name):
|
||||
path = f"{model_name_to_class[model_name].__name__.lower()}.similaritymodel"
|
||||
url = f"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.train_similarity.latest/artifacts/public/{path}.zst"
|
||||
url = f"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.train_similarity.latest/artifacts/public/{path}.zst"
|
||||
|
||||
logger.info(f"Downloading similarity model from {url}...")
|
||||
updated = download_check_etag(url)
|
||||
|
|
|
@ -54,14 +54,14 @@ PAST_FAILURES_LABEL_DB = "past_failures_label.lmdb.tar.zst"
|
|||
FAILING_TOGETHER_LABEL_DB = "failing_together_label.lmdb.tar.zst"
|
||||
db.register(
|
||||
TEST_LABEL_SCHEDULING_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_test_label_scheduling_history.latest/artifacts/public/test_label_scheduling_history.pickle.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_test_label_scheduling_history.latest/artifacts/public/test_label_scheduling_history.pickle.zst",
|
||||
13,
|
||||
[PAST_FAILURES_LABEL_DB, FAILING_TOGETHER_LABEL_DB],
|
||||
)
|
||||
PUSH_DATA_LABEL_DB = "data/push_data_label.json"
|
||||
db.register(
|
||||
PUSH_DATA_LABEL_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_test_label_scheduling_history_push_data.latest/artifacts/public/push_data_label.json.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_test_label_scheduling_history_push_data.latest/artifacts/public/push_data_label.json.zst",
|
||||
1,
|
||||
)
|
||||
|
||||
|
@ -70,14 +70,14 @@ PAST_FAILURES_GROUP_DB = "past_failures_group.lmdb.tar.zst"
|
|||
TOUCHED_TOGETHER_DB = "touched_together.lmdb.tar.zst"
|
||||
db.register(
|
||||
TEST_GROUP_SCHEDULING_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_test_group_scheduling_history.latest/artifacts/public/test_group_scheduling_history.pickle.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_test_group_scheduling_history.latest/artifacts/public/test_group_scheduling_history.pickle.zst",
|
||||
1,
|
||||
[PAST_FAILURES_GROUP_DB, TOUCHED_TOGETHER_DB],
|
||||
)
|
||||
PUSH_DATA_GROUP_DB = "data/push_data_group.json"
|
||||
db.register(
|
||||
PUSH_DATA_GROUP_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_test_group_scheduling_history_push_data.latest/artifacts/public/push_data_group.json.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_test_group_scheduling_history_push_data.latest/artifacts/public/push_data_group.json.zst",
|
||||
1,
|
||||
)
|
||||
|
||||
|
@ -86,14 +86,14 @@ PAST_FAILURES_CONFIG_GROUP_DB = "past_failures_config_group.lmdb.tar.zst"
|
|||
FAILING_TOGETHER_CONFIG_GROUP_DB = "failing_together_config_group.lmdb.tar.zst"
|
||||
db.register(
|
||||
TEST_CONFIG_GROUP_SCHEDULING_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_test_config_group_scheduling_history.latest/artifacts/public/test_config_group_scheduling_history.pickle.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_test_config_group_scheduling_history.latest/artifacts/public/test_config_group_scheduling_history.pickle.zst",
|
||||
20,
|
||||
[PAST_FAILURES_CONFIG_GROUP_DB, FAILING_TOGETHER_CONFIG_GROUP_DB],
|
||||
)
|
||||
PUSH_DATA_CONFIG_GROUP_DB = "data/push_data_config_group.json"
|
||||
db.register(
|
||||
PUSH_DATA_CONFIG_GROUP_DB,
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_test_config_group_scheduling_history_push_data.latest/artifacts/public/push_data_config_group.json.zst",
|
||||
"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_test_config_group_scheduling_history_push_data.latest/artifacts/public/push_data_config_group.json.zst",
|
||||
1,
|
||||
)
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ def download_model(model_name):
|
|||
version = "latest"
|
||||
|
||||
path = f"{model_name}model"
|
||||
url = f"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.train_{model_name}.{version}/artifacts/public/{path}.zst"
|
||||
url = f"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.train_{model_name}.{version}/artifacts/public/{path}.zst"
|
||||
logger.info(f"Downloading {url}...")
|
||||
updated = download_check_etag(url)
|
||||
if updated:
|
||||
|
|
|
@ -87,7 +87,7 @@ def parse_metric_file(metric_file_path: Path) -> Tuple[datetime, str, Dict[str,
|
|||
# TODO: Might be better storing it in the file
|
||||
file_path_parts = metric_file_path.stem.split("_")
|
||||
|
||||
assert file_path_parts[:5] == ["metric", "project", "relman", "bugbug", "train"]
|
||||
assert file_path_parts[:5] == ["metric", "project", "bugbug", "train"]
|
||||
model_name = file_path_parts[5]
|
||||
assert file_path_parts[6:8] == ["per", "date"]
|
||||
date_parts = list(map(int, file_path_parts[8:14]))
|
||||
|
|
|
@ -32,7 +32,7 @@ def classify_bugs(model_name, classifier, bug_id):
|
|||
logger.info(f"{model_file_name} does not exist. Downloading the model....")
|
||||
try:
|
||||
download_check_etag(
|
||||
f"https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.train_{model_name}.latest/artifacts/public/{model_file_name}.zst"
|
||||
f"https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.train_{model_name}.latest/artifacts/public/{model_file_name}.zst"
|
||||
)
|
||||
except requests.HTTPError:
|
||||
logger.error(
|
||||
|
|
|
@ -19,7 +19,7 @@ LOGGER = logging.getLogger(__name__)
|
|||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
QUEUE_ROUTE_PATTERN = "index.project.relman.bugbug.train_*.per_date.*"
|
||||
QUEUE_ROUTE_PATTERN = "index.project.bugbug.train_*.per_date.*"
|
||||
|
||||
CURRENT_DIR = Path(__file__).resolve().parent
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ from bugbug.utils import (
|
|||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
|
||||
URL = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.train_{model_name}.latest/artifacts/public/{file_name}"
|
||||
PAST_BUGS_BY_FUNCTION_URL = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.past_bugs_by_function.latest/artifacts/public/past_bugs_by_function.pickle.zst"
|
||||
URL = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.train_{model_name}.latest/artifacts/public/{file_name}"
|
||||
PAST_BUGS_BY_FUNCTION_URL = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.past_bugs_by_function.latest/artifacts/public/past_bugs_by_function.pickle.zst"
|
||||
PHAB_PROD = "prod"
|
||||
PHAB_DEV = "dev"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ from bugbug.utils import get_taskcluster_options
|
|||
ROOT_URI = "train_{}.per_date"
|
||||
DATE_URI = "train_{}.per_date.{}"
|
||||
BASE_URL = "https://community-tc.services.mozilla.com/api/index/v1/task/{}/artifacts/public/metrics.json"
|
||||
NAMESPACE_URI = "project.relman.bugbug.{}"
|
||||
NAMESPACE_URI = "project.bugbug.{}"
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ from bugbug.utils import download_check_etag, zstd_decompress
|
|||
basicConfig(level=INFO)
|
||||
logger = getLogger(__name__)
|
||||
|
||||
URL = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.train_similarity.latest/artifacts/public/{}.zst"
|
||||
URL = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.train_similarity.latest/artifacts/public/{}.zst"
|
||||
|
||||
|
||||
def parse_args(args):
|
||||
|
|
|
@ -121,8 +121,8 @@ def test_exists_db(tmp_path):
|
|||
|
||||
|
||||
def test_download(tmp_path, mock_zst):
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
|
||||
db_path = tmp_path / "prova.json"
|
||||
db.register(db_path, url, 1)
|
||||
|
@ -157,8 +157,8 @@ def test_download(tmp_path, mock_zst):
|
|||
|
||||
|
||||
def test_download_missing(tmp_path, mock_zst):
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
|
||||
db_path = tmp_path / "prova.json"
|
||||
db.register(db_path, url, 1)
|
||||
|
@ -184,8 +184,8 @@ def test_download_missing(tmp_path, mock_zst):
|
|||
|
||||
|
||||
def test_download_old_schema(tmp_path, mock_zst):
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
|
||||
db_path = tmp_path / "prova.json"
|
||||
db.register(db_path, url, 2)
|
||||
|
@ -219,8 +219,8 @@ def test_download_old_schema(tmp_path, mock_zst):
|
|||
|
||||
|
||||
def test_download_same_schema_new_db(tmp_path, mock_zst):
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
|
||||
db_path = tmp_path / "prova.json"
|
||||
db.register(db_path, url, 1)
|
||||
|
@ -279,8 +279,8 @@ def test_download_same_schema_new_db(tmp_path, mock_zst):
|
|||
|
||||
|
||||
def test_download_support_file(tmp_path, mock_zst):
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
support_filename = "support.zst"
|
||||
url_support = urljoin(url, support_filename)
|
||||
|
||||
|
@ -317,8 +317,8 @@ def test_download_support_file(tmp_path, mock_zst):
|
|||
|
||||
|
||||
def test_download_with_support_files_too(tmp_path, mock_zst):
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
support_filename = "support.zst"
|
||||
url_support = urljoin(url, support_filename)
|
||||
|
||||
|
@ -368,8 +368,8 @@ def test_download_with_support_files_too(tmp_path, mock_zst):
|
|||
|
||||
|
||||
def test_download_support_file_missing(tmp_path, caplog):
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/commits.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/commits.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
support_filename = "support_mock.zst"
|
||||
url_support = urljoin(url, support_filename)
|
||||
|
||||
|
@ -399,8 +399,8 @@ def test_download_support_file_missing(tmp_path, caplog):
|
|||
|
||||
|
||||
def test_is_old_schema(tmp_path):
|
||||
url_zst = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
url_zst = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.zst"
|
||||
url_version = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_commits.latest/artifacts/public/prova.json.version"
|
||||
|
||||
db_path = tmp_path / "prova.json"
|
||||
db.register(db_path, url_zst, 1, support_files=[])
|
||||
|
|
|
@ -12,7 +12,7 @@ from scripts import trainer
|
|||
def test_trainer():
|
||||
# Pretend the DB was already downloaded and no new DB is available.
|
||||
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug.data_bugs.latest/artifacts/public/bugs.json"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.data_bugs.latest/artifacts/public/bugs.json"
|
||||
|
||||
responses.add(
|
||||
responses.GET,
|
||||
|
|
|
@ -93,7 +93,7 @@ def test_exp_queue():
|
|||
|
||||
|
||||
def test_download_check_etag():
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug/prova.txt"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug/prova.txt"
|
||||
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
@ -125,7 +125,7 @@ def test_download_check_etag():
|
|||
|
||||
|
||||
def test_download_check_etag_changed():
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug/prova.txt"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug/prova.txt"
|
||||
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
@ -167,7 +167,7 @@ def test_download_check_etag_changed():
|
|||
|
||||
|
||||
def test_download_check_etag_unchanged():
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug/prova.txt"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug/prova.txt"
|
||||
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
@ -209,7 +209,7 @@ def test_download_check_etag_unchanged():
|
|||
|
||||
|
||||
def test_download_check_missing():
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug/prova.txt"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug/prova.txt"
|
||||
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
@ -232,7 +232,7 @@ def test_download_check_missing():
|
|||
|
||||
|
||||
def test_get_last_modified():
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug/prova.txt"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug/prova.txt"
|
||||
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
@ -247,7 +247,7 @@ def test_get_last_modified():
|
|||
|
||||
|
||||
def test_get_last_modified_not_present():
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug/prova.txt"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug/prova.txt"
|
||||
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
@ -260,7 +260,7 @@ def test_get_last_modified_not_present():
|
|||
|
||||
|
||||
def test_get_last_modified_missing():
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.relman.bugbug/prova.txt"
|
||||
url = "https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug/prova.txt"
|
||||
|
||||
responses.add(
|
||||
responses.HEAD,
|
||||
|
|
Загрузка…
Ссылка в новой задаче