Skip to content

Conversation

huydhn
Copy link
Contributor

@huydhn huydhn commented Jan 24, 2024

This will be needed by ExecuTorch too. So, I think it's time to move this to test-infra as a generic GHA. The list includes:

Testing

Locally on PyTorch:

(py3.11) huydo@huydo-mbp pytorch % python ~/Storage/mine/test-infra/.github/scripts/fetch_latest_green_commit.py --requires '["pull", "trunk", "lint", "linux-binary"]'
Checking 41a56f782856b2717da4c45998bdd3d42c70fa1f
RED: Lint checks were not successful
Checking fc30c4d769a58b7b7b84f73ef7bcfe84ab9504f8
RED: Lint checks were not successful
Checking 5b671ce48650c1769e1daa92a7462ff2b592eab4
RED: linux-binary-manywheel checks were not successful
Checking b7b1affe9780fe4106a07376d44a9fab8cd10446
RED: linux-binary-manywheel checks were not successful
Checking c0732c8d5e23dc1b66d970d6a7f12308d59b3fa0
RED: pull checks were not successful
Checking cd084c4909017b71a520d15b45129dc7ccfd8dbf
RED: pull checks were not successful
Checking abd759d50d87fa56078de95a444fe658de2983f9
RED: pull checks were not successful
Checking b369888bec64d7ee80ff347f513cf57d3e73a34a
RED: pull checks were not successful
Checking 6ac284122bf58fe45433943eeaba2c6c095ba7eb
RED: pull checks were not successful
Checking c6930aad46e5751eae7504655532d170f39db47e
RED: trunk checks were not successful
Checking 13d2cdffa29803c73cf6a4282894d5c4ee42cf1b
RED: trunk checks were not successful
Checking 77705e74865c70cae940f34c59c0a31250ce4431
RED: trunk checks were not successful
Checking 58e7ec5843e63ee044e0a4f5aa2583a056a64078
RED: trunk checks were not successful
Checking 364728b27bfdb6316354da9c0ba15de09b7fc9b6
RED: trunk checks were not successful
Checking 5ec2d7959d1ef1e8eeacc5e59bbf0f8b2dda1ea6
GREEN
5ec2d7959d1ef1e8eeacc5e59bbf0f8b2dda1ea6

On PyTorch, pytorch/pytorch#118163 and manually dispatch the job https://github.com/pytorch/pytorch/actions/runs/7634906738/job/20799502532#step:2:15480

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 24, 2024
Copy link

vercel bot commented Jan 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
torchci ⬜️ Ignored (Inspect) Visit Preview Jan 25, 2024 0:55am

@huydhn huydhn marked this pull request as ready for review January 24, 2024 03:03
@huydhn huydhn requested a review from guangy10 January 24, 2024 21:22
@huydhn
Copy link
Contributor Author

huydhn commented Jan 24, 2024

cc @guangy10 FYI, this is the GitHub action that PyTorch is using to promote a main commit to viable/strict. Having this here will allow ExecuTorch to use it too, and I can use this to create the stable branch for ET, and subsequently nightly.

@huydhn huydhn removed the request for review from guangy10 January 24, 2024 21:31

def get_latest_green_commit(
commits: List[str], requires: List[str], results: List[Dict[str, Any]]
) -> Any:

Choose a reason for hiding this comment

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

nit: Would be Optional[str] better since the return type is either None or a str

Comment on lines +236 to +237
# HACK: Same commit were merged, reverted and landed again
# which creates a tracking problem

Choose a reason for hiding this comment

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

Curious to ask: What is the tracking problem? Would you mind elaborating more? I think viablestrict should never set to a commit that will be reverted (because it's not green), so why is tracking the reverted/re-landed hash matters

Copy link
Contributor Author

@huydhn huydhn Jan 24, 2024

Choose a reason for hiding this comment

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

Let me check this part from PyTorch for more historical context, the script is copied from there. One one hand, it's easier to keep the script as it is (which I think I will do). On the other hand, this definitely looks like some hacks to be removed (may be as a separate BE change).

Copy link
Contributor

@clee2000 clee2000 left a comment

Choose a reason for hiding this comment

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

I'm assuming this is pretty much just a copy paste of the one in pytorch/pytorch so it's fine.

I'm not a super big fan of the entire gitutils being copied, since I doubt updating viable/strict actually uses all of it

@huydhn
Copy link
Contributor Author

huydhn commented Jan 24, 2024

I'm not a super big fan of the entire gitutils being copied, since I doubt updating viable/strict actually uses all of it

Yup, but then I plan to eventually move the whole merge bot / revert bot here too, so I think it's ok because gitutils on PyTorch can be removed then. That will happen in few months time I think, but we rarely change gitutils nowadays, so it would be ok.

pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Jan 25, 2024
facebook-github-bot pushed a commit to pytorch/executorch that referenced this pull request Jan 31, 2024
Summary:
This is ready now after pytorch/test-infra#4905 lands.  I reuse the same convention from PyTorch here calling the stable branch `viable/strict`.

* I have already create the branch https://github.com/pytorch/executorch/tree/viable/strict as a protected one.  Only repo admin or the update bot can write into it.
* The update job is scheduled to run every 30m (copied from PyTorch)
* A commit can be promoted to viable/strict if all its pull and lint jobs pass.  The condition here can be extended to include trunk jobs too, but we need to get ET trunk into a healthy state before that.
  * My plan is to try to get lint and pull to a good state first, land this change, then fix trunk jobs, and add trunk signals too.

### Testing

https://github.com/pytorch/executorch/actions/runs/7648614817/job/20841686469?pr=1697#step:2:1270, no green commits was found because there are broken lint and pull jobs on main https://hud.pytorch.org/hud/pytorch/executorch/main

Pull Request resolved: #1697

Reviewed By: guangy10

Differential Revision: D53072054

Pulled By: huydhn

fbshipit-source-id: 31dd1aec3a5c77ae4ed3639e63c4c6620340773e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants