Skip to content

Conversation

@armenzg
Copy link
Collaborator

@armenzg armenzg commented Jan 3, 2020

Using filter by "job field" instead of the searchStr (the latter would require either a hack or a small refactor):
image

@armenzg armenzg self-assigned this Jan 3, 2020
@armenzg armenzg temporarily deployed to treeherder-test-filteri-zf4stz January 3, 2020 19:18 Inactive
@armenzg armenzg temporarily deployed to treeherder-test-filteri-zf4stz January 3, 2020 19:35 Inactive
@armenzg armenzg force-pushed the test_filtering branch 3 times, most recently from cea1700 to 01593ab Compare January 8, 2020 20:43
@armenzg armenzg changed the title WIP Bug 1580893 - Filtering tasks by test path Bug 1580893 - Support filtering tasks by test path Jan 8, 2020
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 8, 2020 20:44 Inactive
@armenzg armenzg marked this pull request as ready for review January 8, 2020 20:46
@armenzg armenzg requested a review from camd January 8, 2020 20:46
@armenzg
Copy link
Collaborator Author

armenzg commented Jan 8, 2020

Hi @camd I will appreciate an initial quick pass before I spend a bunch of time on writing the tests for this. This works nicely.

I will look into fixing the Travis test failures.

I made a decision of not storing the data on the backend since retrieving the artifact directly from Taskcluster is very fast and I wrote the code in such a way to not impact the loading of jobs.

The commit message has more information about how the feature is implemented.

I have started a Heroku Review app and it should be usable within the hour when it has ingested pushes and tasks for autoland. It's easier to test this on a Heroku deployment than giving you set up steps for local development.

The screenshot shows jobs filtered by the devtools/client/inspector/changes/test/browser.ini test path.

image

@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 8, 2020 21:23 Inactive
@armenzg armenzg removed the request for review from camd January 9, 2020 16:46
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 9, 2020 16:54 Inactive
@armenzg armenzg changed the base branch from master to heroku_apps January 9, 2020 16:54
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 9, 2020 17:01 Inactive
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 9, 2020 17:13 Inactive
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 9, 2020 20:40 Inactive
Copy link
Collaborator

@camd camd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good to me. As I say, I'm concerned about performance. But if it can handle 50 pushes as well as we currently can, then I think we're ok. We should check the memory footprint as well. And check for new memory leaks, too.


const fetchTestManifestsArtifact = async (project, revision) => {
let taskNameToManifests = {};
const rootUrl = 'https://firefox-ci-tc.services.mozilla.com';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure this is just here for expediency during prototyping, but you would get this value from the repository object tc_root_url field.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can look into that but this only makes sense for Firefox test jobs since the artifact is only created for Hg repos.
I might want to prevent the unnecessary call for non-Firefox repos.

// when they don't care about the specific jobs and results.
if (!getAllUrlParams().has('nojobs')) {
this.fetchJobs();
await Promise.all([this.fetchJobs(), this.fetchTestManifests()]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very curious how this will perform. I'll admit it gives me pause. It seems like something that will only be used sometimes, but we will pay the performance cost every time. This seems like something that would cause a noticeable performance hit. But perhaps not.

Alternatively, we could only do this fetch when the use has chosen to filter by the test path.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we should test before and after this change with a load of 30-50 pushes in memory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 9, 2020 21:20 Inactive
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 14, 2020 16:31 Inactive
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 14, 2020 18:01 Inactive
@codecov-io
Copy link

codecov-io commented Jan 14, 2020

Codecov Report

Merging #5794 into master will increase coverage by 0.21%.
The diff coverage is 43.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5794      +/-   ##
==========================================
+ Coverage   41.23%   41.44%   +0.21%     
==========================================
  Files         209      209              
  Lines        6873     6944      +71     
  Branches     1473     1491      +18     
==========================================
+ Hits         2834     2878      +44     
- Misses       3717     3737      +20     
- Partials      322      329       +7
Impacted Files Coverage Δ
ui/push-health/TestMetric.jsx 0% <ø> (ø) ⬆️
ui/perfherder/graphs/TestDataModal.jsx 50.3% <ø> (ø) ⬆️
ui/push-health/ClassificationGroup.jsx 0% <ø> (ø) ⬆️
ui/perfherder/FilterControls.jsx 93.33% <ø> (ø) ⬆️
ui/push-health/Health.jsx 0% <0%> (ø) ⬆️
ui/push-health/helpers.js 100% <100%> (+100%) ⬆️
ui/push-health/GroupedTests.jsx 90% <100%> (+90%) ⬆️
ui/shared/InputFilter.jsx 82.35% <100%> (ø)
ui/test-view/ui/Groups.jsx 0% <0%> (ø) ⬆️
ui/job-view/pushes/PushActionMenu.jsx 47.36% <0%> (+1.07%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d49a931...22e041c. Read the comment docs.

@armenzg armenzg changed the base branch from heroku_apps to master January 14, 2020 19:06
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 23, 2020 20:31 Inactive
@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 24, 2020 16:38 Inactive
@armenzg
Copy link
Collaborator Author

armenzg commented Jan 24, 2020

There's one known bug to me.
If you append to the URL "&test_paths=foo" it will not apply properly; reloading the URL with "&test_paths=foo" will work.

I've filed this:
https://bugzilla.mozilla.org/show_bug.cgi?id=1611466

@armenzg armenzg temporarily deployed to treeherder-test-filteri-6vfcch January 24, 2020 20:02 Inactive
@armenzg armenzg merged commit 11e8e92 into master Jan 24, 2020
@armenzg armenzg deleted the test_filtering branch January 24, 2020 20:29
armenzg pushed a commit that referenced this pull request Jan 27, 2020
During [review time](#5794 (comment)) we introduced a small bug in the test filtering feature.

Reading `jobList` at the begining of the function instead of just before calling `mapPushJobs` almost guaranteed to start with an empty list which makes the call useless since it needs a non-empty list to work.

I also changed the code to call `this.setState` with a callback to `mapPushJobs` to guarantee that `jobTypeNameToManifests` is set in the state and not get an empty object.
armenzg pushed a commit that referenced this pull request Jan 27, 2020
During review time[1] we introduced a small bug in the test filtering feature.

Reading `jobList` at the begining of the function instead of just before calling `mapPushJobs` almost guaranteed to start with an empty list which makes the call useless since it needs a non-empty list to work.

I also changed the code to call `this.setState` with a callback to `mapPushJobs` to guarantee that `jobTypeNameToManifests` is set in the state and not get an empty object.

[1] #5794 (comment)
armenzg pushed a commit that referenced this pull request Jan 27, 2020
During review time[1] we introduced a small bug in the test filtering feature.

Reading `jobList` at the begining of the function instead of just before calling `mapPushJobs` almost guaranteed to start with an empty list which makes the call useless since it needs a non-empty list to work.

I also changed the code to call `this.setState` with a callback to `mapPushJobs` to guarantee that `jobTypeNameToManifests` is set in the state and not get an empty object.

[1] #5794 (comment)
armenzg added a commit that referenced this pull request Jan 27, 2020
During review time[1] we introduced a small bug in the test filtering feature.

Reading `jobList` at the begining of the function instead of just before calling `mapPushJobs` almost guaranteed to start with an empty list which makes the call useless since it needs a non-empty list to work.

I also changed the code to call `this.setState` with a callback to `mapPushJobs` to guarantee that `jobTypeNameToManifests` is set in the state and not get an empty object.

[1] #5794 (comment)
alexandru-io pushed a commit to alexandru-io/treeherder that referenced this pull request Feb 17, 2020
* Support filtering tasks by test path

For every push, it fetches the artifact `manifests-by-task.json` produced by the Gecko decision task. For every job it adds the `test_paths` property which allows the filtering.

Click on the "Filter by a job field" (the funnel icon), select "test path" from the
dropdown and you can insert a path like `devtools/client/inspector/changes/test/browser.ini` (You can use substrings).

* Use Django's json()
* Skip test that only times out on Travis
alexandru-io pushed a commit to alexandru-io/treeherder that referenced this pull request Feb 17, 2020
During review time[1] we introduced a small bug in the test filtering feature.

Reading `jobList` at the begining of the function instead of just before calling `mapPushJobs` almost guaranteed to start with an empty list which makes the call useless since it needs a non-empty list to work.

I also changed the code to call `this.setState` with a callback to `mapPushJobs` to guarantee that `jobTypeNameToManifests` is set in the state and not get an empty object.

[1] mozilla#5794 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants