Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all "labels"-related code #782

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove label_index feature flag
It turns out this feature flag was never fully rolled out, and is part of ATS (automated test selection) which was also not fully launched.

This will now remove this feature flag, as a precursor to removing labels altogether.
  • Loading branch information
Swatinem committed Oct 14, 2024
commit fc29e8fdc2b65bfd1716f30c39b951d857604101
6 changes: 0 additions & 6 deletions rollouts/__init__.py
Original file line number Diff line number Diff line change
@@ -4,12 +4,6 @@
FLAKY_TEST_DETECTION = Feature("flaky_test_detection")
FLAKY_SHADOW_MODE = Feature("flaky_shadow_mode")

# Eventually we want all repos to use this
# This flag will just help us with the rollout process
USE_LABEL_INDEX_IN_REPORT_PROCESSING_BY_REPO_ID = Feature(
"use_label_index_in_report_processing"
)

PARALLEL_UPLOAD_PROCESSING_BY_REPO = Feature("parallel_upload_processing")

CARRYFORWARD_BASE_SEARCH_RANGE_BY_OWNER = Feature("carryforward_base_search_range")
23 changes: 7 additions & 16 deletions services/report/languages/pycoverage.py
Original file line number Diff line number Diff line change
@@ -28,22 +28,13 @@ def process(
] + [(COVERAGE_MISS, ln) for ln in file_coverage["missing_lines"]]
for cov, ln in lines_and_coverage:
if ln > 0:
label_list_of_lists: list[list[str]] | list[list[int]] = []
if report_builder_session.should_use_label_index:
label_list_of_lists = [
[single_id]
for single_id in labels_table._get_list_of_label_ids(
report_builder_session.label_index,
file_coverage.get("contexts", {}).get(str(ln), []),
)
]
else:
label_list_of_lists = [
[labels_table._normalize_label(testname)]
for testname in file_coverage.get("contexts", {}).get(
str(ln), []
)
]
# label_list_of_lists: list[list[str]] | list[list[int]] = []
label_list_of_lists = [
[labels_table._normalize_label(testname)]
for testname in file_coverage.get("contexts", {}).get(
str(ln), []
)
]
_file.append(
ln,
report_builder_session.create_coverage_line(
2 changes: 0 additions & 2 deletions services/report/languages/tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ def create_report_builder_session(
path_fixer: PathFixer | None = None,
filename: str = "filename",
current_yaml: dict | None = None,
should_use_label_index: bool = False,
) -> ReportBuilderSession:
def fixes(filename, bases_to_try=None):
return filename
@@ -16,6 +15,5 @@ def fixes(filename, bases_to_try=None):
ignored_lines={},
sessionid=0,
current_yaml=current_yaml,
should_use_label_index=should_use_label_index,
)
return report_builder.create_report_builder_session(filename)
Loading
Oops, something went wrong.