Skip to content

Conversation

@keyonghan
Copy link
Contributor

This PR prepares for frontend support to list commits w.r.t. different branches. Default lists are for master, otherwise it shows corresponding lists when branch parameter is specified.

Related issue: flutter/flutter#51807

Copy link
Contributor

@CaseyHillers CaseyHillers left a comment

Choose a reason for hiding this comment

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

Should we add support for the tree status to be based on branch too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Tests for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please refer to the last test in get_status_test.dart

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't have to be this PR due to the priority, but we should start moving some of the datastore logic we do to be tested in datastore_test.dart. datastore_test.dart doesn't even exist :)

Copy link
Contributor

Choose a reason for hiding this comment

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

What about a test for when branch isn't given?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the commit model to have branch with default value `master.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does the datastore data have all tasks currently set to master if they're null? Otherwise wouldn't the model get overwritten from that null in datastore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess you meant commit, rather than task. Yes, if null, master is the default value now. (just pushed the changes)

Copy link
Contributor

Choose a reason for hiding this comment

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

Was there an update to the http library?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

No longer needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed.

@CaseyHillers
Copy link
Contributor

Rebase with master, #670 should have fixed the issues LUCI is showing.

Copy link
Contributor

Choose a reason for hiding this comment

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

This will not create indexes for previous data. Is there a plan to create these indexes?

Explanation: https://stackoverflow.com/questions/35742786/how-to-add-a-composite-index-in-google-datastore

Copy link
Contributor

Choose a reason for hiding this comment

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

In the past we've just had the person who updated the yaml file run the gcloud command to create the index.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was follow up from an offline discussion Keyong and I had. This is in reference to that the composite index will only be created on task entities that are saved once this index is pushed. Older task entities would no longer be served unless there was a script that went ahead and resaved each one to have this index created for them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As talked about updating old data with 'master' below with Todd, this is of lower priority as long as those data is old enough, which actually is. I am gonna to merge this PR for now.

Created flutter/flutter#52066 to track.

@keyonghan
Copy link
Contributor Author

Rebase with master, #670 should have fixed the issues LUCI is showing.

Thanks for the fix!

Copy link
Contributor

Choose a reason for hiding this comment

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

Did we back-fill existing data to add 'master' as the branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet. Frontend is using latest 30 commits for status calculation. Unless people keep scrolling down the dashboard, we have enough data for status query at this moment (now we have 45 commits with master as the branch in datastore).

Do you have any suggestion to update old data efficiently? Didn't find any bunch update options. I am thinking about to write some scripts to walk through all records and update them sequentially.

Copy link
Contributor

Choose a reason for hiding this comment

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

I had written a debug handler for updating data at one point for this purpose, but never checked it in for security reasons...

As you say, it's lower priority if the affected rows are old enough to not show on the dashboard by default.

@keyonghan
Copy link
Contributor Author

Should we add support for the tree status to be based on branch too?

Yes, we should. I think we also need to update the cirrus/luci/devicelab test status logic to be based on branch as well. I updated flutter/flutter#51807 to track
/cc @godofredoc @tvolkert

This should be fixing flutter/flutter#51884
/cc @christopherfujino

@keyonghan keyonghan force-pushed the get_status_branch branch from a039365 to 4394a48 Compare March 5, 2020 23:53
@keyonghan keyonghan merged commit 20390b7 into flutter:master Mar 6, 2020
@keyonghan keyonghan deleted the get_status_branch branch March 13, 2024 20:16
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.

3 participants