New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 902408 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

[Findit] Flake Analyzer + Flake Detector - Refactor issue_tracking_service.py and flake_report_util.py

Project Member Reported by lijeffrey@chromium.org, Nov 6

Issue description

There are 2 flake_report_util.py files: 1 under flake_detection and 1 under flake_analysis, and issue_tracking_services.py which actually contacts Monorail.

The 3 files are a mixed bag of various flake-related bug management operations, and should be reclassified:

1. A module for creating messages that are detected flakes only
2. A module for creating messages that are analyzed flakes only (which can optionally be combined into 1)
3. A module for communicating with monorail only with no concept of flaky tests (issue_tracking_service.py)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 13

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/e346a25e8e63d5bb2154a348047af4dab018632e

commit e346a25e8e63d5bb2154a348047af4dab018632e
Author: Jeffrey Li <lijeffrey@chromium.org>
Date: Tue Nov 13 19:14:40 2018

[Findit] Flake Analyzer / Flake Detection: Refactor bug management structure

Major refactoring/restructuring of where code lives in preparation for unified
bug management.

1. services/flake_failure/flake_report_util.py --> flake_bug_util.py:
   Module is now purely for deciding when to file/update a bug for Flake Analyzer. Eventually should
   be deprecated altogether once auto action layer is ready.
2. services/flake_detection/flake_report_util.py --> services/flake_report_util.py:
   Purely for deciding when to file/update a bug (although report flakes to FA is still in there
   to be moved once auto action layer is ready)
3. services/issue_tracking_service.py --> services/flake_reporting/monorail_util.py. Purely for
   interfacing with Monorail. Previously contained a mix of Flake Analyzer and Flake Detection
   specific logic, now is purely for talking to Monorail and has no knowledge of flakiness.
4. services/flake_reporting/issue_generator.py:
   Various classes for handling the contents that will eventually be what is logged in each bug.
   Still separate classes for FA and FD for now, as further refactoring is still needed here.

This is a pure refactoring CL. No functional/code changes.

Bug: 902408
Change-Id: I506dc2c532eca6a57a77a9c56a5251964f11c632
Reviewed-on: https://chromium-review.googlesource.com/c/1327284
Commit-Queue: Jeffrey Li <lijeffrey@chromium.org>
Reviewed-by: Chan Li <chanli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#18966}
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/handlers/flake/detection/test/detect_flakes_test.py
[add] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/issue_constants.py
[add] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/test/flake_issue_util_test.py
[add] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/flake_failure/flake_bug_util.py
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/pipelines/flake_failure/test/update_monorail_bug_pipeline_test.py
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/test/monorail_util_test.py
[delete] https://crrev.com/eaf13a69a74c0cd1443ef3b996a3ba00643b1abf/appengine/findit/services/flake_detection/flake_report_util.py
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/pipelines/flake_failure/test/create_bug_for_flake_pipeline_test.py
[add] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/test/issue_generator_test.py
[delete] https://crrev.com/eaf13a69a74c0cd1443ef3b996a3ba00643b1abf/appengine/findit/services/test/issue_tracking_service_test.py
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/handlers/flake/detection/detect_flakes.py
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/pipelines/flake_failure/update_monorail_bug_pipeline.py
[add] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/flake_failure/test/flake_bug_util_test.py
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/monorail_util.py
[add] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/issue_generator.py
[delete] https://crrev.com/eaf13a69a74c0cd1443ef3b996a3ba00643b1abf/appengine/findit/services/flake_failure/test/flake_report_util_test.py
[delete] https://crrev.com/eaf13a69a74c0cd1443ef3b996a3ba00643b1abf/appengine/findit/services/flake_detection/test/flake_report_util_test.py
[add] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/services/flake_issue_util.py
[delete] https://crrev.com/eaf13a69a74c0cd1443ef3b996a3ba00643b1abf/appengine/findit/services/flake_failure/flake_report_util.py
[modify] https://crrev.com/e346a25e8e63d5bb2154a348047af4dab018632e/appengine/findit/pipelines/flake_failure/create_bug_for_flake_pipeline.py
[delete] https://crrev.com/eaf13a69a74c0cd1443ef3b996a3ba00643b1abf/appengine/findit/services/issue_tracking_service.py

Sign in to add a comment